Forum | | | | - Page 1 - |
| Thomas Freier | any Eigenversuche hit[ed] fehl. has of/ one a suggestion, How two RTFs fester Size and a Dritte discretionary long ausgedruckt go can. Analog one Example of Uwe 'Pascal' becomes here only a Page printed. but How geht's moreover? CompileMarkSeparation $H Windows.ph
$H RichEdit.ph
$U RTFHandling.pcu = R_'RTF-PCU einbinden
$U objects.pcu = R_
proc DrawRichText2'---------------------------------------------------------DrawRichText2
parameters RTF&,PosX%,PosY%,MaxX%,MaxY%'--Position + Grösse in Pixeln!
declare PrinterDpiX%,PrinterDpiY%
declare WindowDpiX%,WindowDpiY%
declare fx!,fy!
if %printing'--Bei Druck: %HDC2 = %HDC = &PDC
~SetMapMode(%hdc2,1)
~SetWindowExtEx(%hdc2,1,1,0)
~SetViewPortExtEx(%hdc2,1,1,0)
PosX%=PosX%+30'--Korrektur ???
PosY%=PosY%+30'--Korrektur ???
endif
PrinterDpiX%=~GetDeviceCaps(%hdc2,~LOGPIXELSX)'--dpi X des Druckers
PrinterDpiY%=~GetDeviceCaps(%hdc2,~LOGPIXELSY)'--dpi X des Druckers
WindowDpiX%=~GetDeviceCaps(~GetDC(%hwnd),~LOGPIXELSX)'--dpi X des Bildschirms (!)
WindowDpiY%=~GetDeviceCaps(~GetDC(%hwnd),~LOGPIXELSY)'--dpi Y des Bildschirms (!)
PosX%=int(PosX%/WindowDpiX%*1440)
PosY%=int(PosY%/WindowDpiX%*1440)
MaxX%=int(MaxX%/WindowDpiX%*1440)
MaxY%=int(MaxY%/WindowDpiX%*1440)
declare Range#
dim Range#,48
clear Range#
long Range#, 0=%hdc2,%hdc2
long Range#, 8=PosX%,PosY%,PosX%+MaxX%,PosY%+MaxY%
long Range#,24=PosX%,PosY%,PosX%+MaxX%,PosY%+MaxY%
long Range#,44=-1
sendmessage(RTF&,~EM_FORMATRANGE,1,Range#)
if %printing
fx!=~GetDeviceCaps(%hdc2,~LOGPIXELSX)/300
fy!=~GetDeviceCaps(%hdc2,~LOGPIXELSY)/300
~SetMapMode(%hdc2,~MM_ANISOTROPIC)
~SetWindowExtEx(%hdc2,6400,9600,0)
~SetViewPortExtEx(%hdc2,int(2200*fx!),int(3300*fy!),0)
endif
dispose Range#
casenot %printing:repaint
endproc'---------------------------------------------------------------------------------
window 0,0-%maxX,800
var rtf_dll& = R_INTITFORCREATERTF()'DLL laden mit PCU
var _RichEdit& = R_CREATERICHEDIT(%hwnd,"",70,0,350,100,9000)' Richedit erstellen mit PCU
RTF("LoadRTF",_RichEdit&,"Bootsplatz.rtf")
var __RichEdit& = R_CREATERICHEDIT(%hwnd,"",480,0,280,100,9000)' Richedit erstellen mit PCU
RTF("LoadRTF",__RichEdit&,"Label 105x42.rtf")
var RichEdit& = R_CREATERICHEDIT(%hwnd,"",0,102,800,400,9000)' Richedit erstellen mit PCU
var rtf_hdc& = R_PREPAREFORLINEBREAK(RichEdit&)' Device Context erzeugen mit PCU
R_Init_object(RichEdit&)'Zum Bildempfang vorbereiten
RTF("LoadRTF",RichEdit&,"Bilder-Album.rtf")
startprint "*xx"
DrawRichText2 _RichEdit&,80,10,400,150
DrawRichText2 __RichEdit&,500,10,250,150
DrawRichText2 RichEdit&,0,150,800,14900
endprint
waitkey
R_DEINITRTF(RichEdit&,rtf_hdc&,rtf_dll&)'RTF-Aufräumen
R_DEINITRTF(_RichEdit&,rtf_hdc&,rtf_dll&)
R_DEINITRTF(__RichEdit&,rtf_hdc&,rtf_dll&)
R_DeInit_object()'RTF-Aufräumen<
End
remainder in the zipper. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/12/10 ▲ |
| |
| | « this Posting watts as Solution marked. » | | Uwe ''Pascal'' Niemeier | Hi Thomas!
means is "RTF in RTF by OLE" für's Print out already time OK? and it fails on it, that the eingebetteten RTFs (The together Yes so 'ne manner Briefkopf form) not machine go can, if no Word present is?
have with the the Print time getestet; though only MS Image Writer, because I momentarily none "echten" printer available have. sees exakt so from How by Wordpad ausgedruckt. ought to means useable his. See attachment.
with the Edit without Word: time see...
another word to the code at the beginning this Threads: The watts original develops, for a Image during the Druckens into document without OLE-Support einzublenden. therefore find itself therein different APIs to Größenanpassung, The to that Print reiner documents (with OLE) not necessary are (hope I at least).
SeeYou Pascal |
| | | | | |
| | | Hello Thomas,
functions The Solution from this Thread [...] with you circa a complete RTF to print and helps you these? |
| | | | |
| | Thomas Freier | Hello iF,
in the momentum not. Manipulationen for may part were erfolglos and What is with meant: "hilft you these?" . too with the Solution from the Thread be I not yet happy. by me are to the pressure The Lines zerstückelt. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/12/10 ▲ |
| |
| | | Image print-end.jpg shows well the a To little wide staid is - thatswhy Better get going everything so to left gefercht.
Perhaps. should we first the pure normal simple RTF-Print out "sauber" and "überall" hinbekommen and hereon aufbauend then such Specials as here in the Thread treat.
i'd say back to the middle-aged Thread if the program there not does what it should and then vlt. hereon set up.
your obigen code can I me first today evening correctly. standing and testing. |
| | | | |
| | Thomas Freier | Yes, see so did i so. These Umbrüche are but too with the Text99. strange but too, if The File before the pressure stored and thereafter anew loaded becomes, stay The Changes consist are but so not in the gespeicherten File. The attempt The gespeicherte File to that pressure into To this tack erstelltes CompileMarkSeparation To lay, end always with Schutzverletzung (RTF.pcu). time see How I the behebe. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/12/10 ▲ |
| |
| | | OK understand, too ifs ichs not yet überschaue. ^^ |
| | | | |
| | | Druckt this code because at least The first Page half-way correctly? CompileMarkSeparation'{$cleq}
'{$pushkeyword R_*}
$H Windows.ph
$H RichEdit.ph
$U RTFHandling.pcu = R_'RTF-PCU einbinden
$U objects.pcu = R_
proc DrawRichText2'---------------------------------------------------------DrawRichText2
parameters RTF&,PosX%,PosY%,MaxX%,MaxY%'--Position + Grösse in Pixeln!
declare PrinterDpiX%,PrinterDpiY%
declare WindowDpiX%,WindowDpiY%
declare fx!,fy!
if %printing'--Bei Druck: %HDC2 = %HDC = &PDC
~SetMapMode(%hdc2,1)
~SetWindowExtEx(%hdc2,1,1,0)
~SetViewPortExtEx(%hdc2,1,1,0)
endif
PrinterDpiX%=~GetDeviceCaps(%hdc2,~LOGPIXELSX)'--dpi X des Druckers
PrinterDpiY%=~GetDeviceCaps(%hdc2,~LOGPIXELSY)'--dpi X des Druckers
WindowDpiX%=~GetDeviceCaps(~GetDC(%hwnd),~LOGPIXELSX)'--dpi X des Bildschirms (!)
WindowDpiY%=~GetDeviceCaps(~GetDC(%hwnd),~LOGPIXELSY)'--dpi Y des Bildschirms (!)
PosX%=int(PosX%/WindowDpiX%*1440)
PosY%=int(PosY%/WindowDpiX%*1440)
MaxX%=int(MaxX%/WindowDpiX%*1440)
MaxY%=int(MaxY%/WindowDpiX%*1440)
declare Range#
dim Range#,48
clear Range#
long Range#, 0=%hdc2,%hdc2
long Range#, 8=PosX%,PosY%,PosX%+MaxX%,PosY%+MaxY%
long Range#,24=PosX%,PosY%,PosX%+MaxX%,PosY%+MaxY%
long Range#,44=-1
sendmessage(RTF&,~EM_FORMATRANGE,1,Range#)
if %printing
fx!=~GetDeviceCaps(%hdc2,~LOGPIXELSX)/300
fy!=~GetDeviceCaps(%hdc2,~LOGPIXELSY)/300
~SetMapMode(%hdc2,~MM_ANISOTROPIC)
~SetWindowExtEx(%hdc2,6400,9600,0)
~SetViewPortExtEx(%hdc2,int(2200*fx!),int(3300*fy!),0)
endif
dispose Range#
casenot %printing:repaint
endproc'---------------------------------------------------------------------------------
window 0,0-%maxx,%maxy
var rtf_dll& = R_INTITFORCREATERTF()'DLL laden mit PCU
var _RichEdit& = R_CREATERICHEDIT(%hwnd,"",10000,0,350,100,9000)' Richedit erstellen mit PCU
RTF("LoadRTF",_RichEdit&,"Bootsplatz.rtf")
var __RichEdit& = R_CREATERICHEDIT(%hwnd,"",10000,0,280,100,9000)' Richedit erstellen mit PCU
RTF("LoadRTF",__RichEdit&,"Label 105x42.rtf")
var RichEdit& = R_CREATERICHEDIT(%hwnd,"",10000,102,800,400,9000)' Richedit erstellen mit PCU
var rtf_hdc& = R_PREPAREFORLINEBREAK(RichEdit&)' Device Context erzeugen mit PCU
R_Init_object(RichEdit&)'Zum Bildempfang vorbereiten
RTF("LoadRTF",RichEdit&,"Bilder-Album.rtf")
startprint "*xx"
DrawRichText2 _RichEdit&,70,0,350,100
DrawRichText2 __RichEdit&,480,0,280,100
DrawRichText2 RichEdit&,70,100,640,960
endprint
waitinput
external("kernel32","ExitProcess",0)
R_DEINITRTF(RichEdit&,rtf_hdc&,rtf_dll&)'RTF-Aufräumen
R_DEINITRTF(_RichEdit&,rtf_hdc&,rtf_dll&)
R_DEINITRTF(__RichEdit&,rtf_hdc&,rtf_dll&)
R_DeInit_object()'RTF-Aufräumen >
End
|
| | | | |
| | Thomas Freier | | | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/13/10 ▲ |
| |
| | | Juhu very, means works still Schonmal 3 RTFs...
remaining only spare from the Images-RTF ex 2. Page To print?! |
| | | | |
| | Thomas Freier | | | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/13/10 ▲ |
| |
| | | too again whom 2 RTF's in the head or ex 2. Page without? |
| | | | |
| | Thomas Freier | Folgeseiten without 1. and 2. RTF. background is, if MS Word on the System is, can man further RTFs into master-RTF einbetten and too Edit and then too everything print. in the others drop should I The three RTFs separated print without, that to pressure the 1. and 2. RTF one Seitenvorschub results. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/13/10 ▲ |
| |
|
AnswerTopic-Options | 10.345 Views |
Themeninformationenthis Topic has 3 subscriber: |