Forum | | | | - Page 1 - |
| Thomas Freier | found I had of Andreas: CompileMarkSeparation $I Profalt.inc
'################################
'Drucken mit dem Richedit-Control
'################################
DEF StartDoc(2) ! "gdi32","StartDocA"
DEF StartPage(1) ! "gdi32","StartPage"
DEF EndPage(1) ! "gdi32","EndPage"
DEF EndDoc(1) ! "gdi32","EndDoc"
DEF CreateDC(4) ! "gdi32","CreateDCA"
DEF DeleteDC(1) ! "gdi32","DeleteDC"
DEF GetDeviceCaps(2) ! "gdi32","GetDeviceCaps"
DEF PrintDlg(1) ! "comdlg32","PrintDlgA"
Declare Richedit&,RichDLL&,Ende&,Print&,Exit&,FileName$,Driver$,Printer$
Declare Horzres&,Vertres&,PixelsX&,PixelsY&,iWidthTwips&,iHeightTwips&
Declare iTextOut&,iTextLength&,DocName$
Declare PrinterDC&
Declare FormatRange#,PrintDLG#,cRect#
Declare DocInfo#
Dim FormatRange#,48
Dim DocInfo#,12
Clear DocInfo#
Dim PrintDLG#,66
Clear PrintDLG#
Dim cRect#,16
SetTrueColor 1
Window 0,0-640,480
CLS RGB(196,196,196)
Print& = CreateButton(%hwnd,"Drucken",500,40,80,24)
Exit& = CreateButton(%hwnd,"Ende",500,70,80,24)
RichEdit& = Create("RichEdit",%hwnd,"",0,2,460,430)
FileName$ = LoadFile$("Als RTF öffnen","*.RTF")
If FileName$ <> ""
RTF("LoadRTF",Richedit&,Filename$)
EndIf
DocName$ = "Profan-RTFPrinter"
Whilenot Ende&
Waitinput
If GetFocus(Exit&)
Ende& = 1
ElseIf GetFocus(Print&)
Long PrintDLG#,0 = 66
Long PrintDLG#,4 = %hwnd
Long PrintDLG#,20 = $0140'PD_RETURNDC,PD_PRINTSETUP
PrintDlg(PrintDLG#)
PrinterDC& = Long(PrintDLG#,16)
If PrinterDC&
HorzRes& = GetDeviceCaps(PrinterDC&,8)
VertRes& = GetDeviceCaps(PrinterDC&,10)
PixelsX& = GetDeviceCaps(PrinterDC&,88)
PixelsY& = GetDeviceCaps(PrinterDC&,90)
iWidthTwips& = Int((HorzRes&/PixelsX&))*1440
iHeightTwips& = Int((VertRes&/PixelsY&))*1440
Long cRect#,0 = 0
Long cRect#,4 = 0
Long cRect#,8 = iWidthTwips&
Long cRect#,12 = iHeightTwips&
Long DocInfo#,0 = 12
Long DocInfo#,4 = ADDR(Docname$)
Long FormatRange#,0 = PrinterDC&'HDC
Long FormatRange#,4 = PrinterDC&'TargetHDC
Long FormatRange#,8 = 0'linker Rand in Twips
Long FormatRange#,12 = 0'oberer Rand in Twips
Long FormatRange#,16 = iWidthTwips&'rechter Rand in Twips
Long FormatRange#,20 = iHeightTwips&'unterer Rand in Twips
Long FormatRange#,24 = 0'linker Rand in Twips
Long FormatRange#,28 = 0'oberer Rand in Twips
Long FormatRange#,32 = iWidthTwips&'rechter Rand in Twips
Long FormatRange#,36 = iHeightTwips&'unterer Rand in Twips
Long FormatRange#,40 = 0'CharRange-MIN
Long FormatRange#,44 = -1'CharRange MAX ( -1 = alles )
iTextOut& = 0
iTextLength& = SendMessage(RichEdit&, 14, 0, 0)- SendMessage(RichEdit&,186,0,0)
StartDoc(PrinterDC&,DocInfo#)
Whilenot OR(iTextOut& >= iTextLength&,itextOut& = -1)
StartPage(PrinterDC&)
Long FormatRange#,44 = -1
iTextOut& = SendMessage(RichEdit&, 1081, 1, FormatRange#)
Long FormatRange#,40 = iTextOut&
SendMessage(RichEdit&,1075,0,cRect#)
EndPage(PrinterDC&)
Wend
EndDoc(PrinterDC&)
SendMessage(RichEdit&, 1081, 1, 0)
Endif
Endif
EndWhile
Dispose FormatRange#
Dispose DocInfo#
Dispose PrintDLG#
DeleteDCon>PrinterDC&)
End
unfortunately end the pressure to 3 pages. WordPad druckt everything. How geht's with XProfan? |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/06/10 ▲ |
| |
| | « this Posting watts as Solution marked. » | | Uwe ''Pascal'' Niemeier | Hi Thomas!
apparently becomes from the FORMATRANGE-structure not only the To bedruckende area read, separate to the Print too the objectively genutzte area hinterlegt (or something like in the manner). therefore must the betroffene cut offed the structure each Schleifendurchlauf new equips go.
SeeYou Pascal |
| | | | | |
| | | and by me (win7) attend The Images first not at all:
. |
| | | | |
| | Thomas Freier | Sorry! In my example I had The RTFHandling.pcu uses: [...] slopes The important pieces on and the geänderte Script: CompileMarkSeparation $U RTFHandling.pcu = R_'TRF-PCU einbinden
$U objects.pcu = R_
$I Profalt.inc
'################################
'Drucken mit dem Richedit-Control
'################################
DEF StartDoc(2) ! "gdi32","StartDocA"
DEF StartPage(1) ! "gdi32","StartPage"
DEF EndPage(1) ! "gdi32","EndPage"
DEF EndDoc(1) ! "gdi32","EndDoc"
DEF CreateDC(4) ! "gdi32","CreateDCA"
DEF DeleteDC(1) ! "gdi32","DeleteDC"
DEF GetDeviceCaps(2) ! "gdi32","GetDeviceCaps"
DEF PrintDlg(1) ! "comdlg32","PrintDlgA"
Declare Richedit&,RichDLL&,Ende&,Print&,Exit&,FileName$,Driver$,Printer$,Print_PCU&
Declare Horzres&,Vertres&,PixelsX&,PixelsY&,iWidthTwips&,iHeightTwips&
Declare iTextOut&,iTextLength&,DocName$
Declare PrinterDC&
Declare FormatRange#,PrintDLG#,cRect#
Declare DocInfo#
Dim FormatRange#,48
Dim DocInfo#,12
Clear DocInfo#
Dim PrintDLG#,66
Clear PrintDLG#
Dim cRect#,16
SetTrueColor 1
Window 0,0-1040,480
CLS RGB(196,196,196)
Print_PCU& = CreateButton(%hwnd,"Druck PCU",900,40,120,24)
Print& = CreateButton(%hwnd,"Druck direkt",900,80,120,24)
Exit& = CreateButton(%hwnd,"Ende",900,120,120,24)
Declare rtf_dll&,rtf_hdc&
rtf_dll& = R_INTITFORCREATERTF()'DLL laden mit PCU
RichEdit& = R_CREATERICHEDIT(%hWnd,"",0,0,810,420)' Richedit erstellen mit PCU
rtf_hdc& = R_PREPAREFORLINEBREAK(RichEdit&)' Device Context erzeugen mit PCU
R_Init_object(RichEdit&)'Zum Bildempfang vorbereiten
FileName$ = R_RTFLOAD(RichEdit&)
DocName$ = "Profan-RTFPrinter"
Whilenot Ende&
Waitinput
If GetFocus(Exit&)
Ende& = 1
ElseIf GetFocus(Print_PCU&)
R_RTFPrint(RichEdit&,0,0,0)' Print über die PCU
ElseIf GetFocus(Print&)
Long PrintDLG#,0 = 66
Long PrintDLG#,4 = %hwnd
Long PrintDLG#,20 = $0140'PD_RETURNDC,PD_PRINTSETUP
PrintDlg(PrintDLG#)
PrinterDC& = Long(PrintDLG#,16)
If PrinterDC&
HorzRes& = GetDeviceCaps(PrinterDC&,8)
VertRes& = GetDeviceCaps(PrinterDC&,10)
PixelsX& = GetDeviceCaps(PrinterDC&,88)
PixelsY& = GetDeviceCaps(PrinterDC&,90)
' iWidthTwips& = Int((HorzRes&/PixelsX&))*1440 ' Original
' iHeightTwips& = Int((VertRes&/PixelsY&))*1440 ' Original
iWidthTwips& = Int((HorzRes&/PixelsX&))*1450' geändert, nun ohne Umbruch in Zeile 1
iHeightTwips& = Int((VertRes&/PixelsY&))*1240' geändert, nun alle Bilder gedruckt
' Bei weiteren Seiten werden dann allerdings nicht mehr alle gedruckt??
Long cRect#,0 = 0
Long cRect#,4 = 0
Long cRect#,8 = iWidthTwips&
Long cRect#,12 = iHeightTwips&
Long DocInfo#,0 = 12
Long DocInfo#,4 = ADDR(Docname$)
Long FormatRange#,0 = PrinterDC&'HDC
Long FormatRange#,4 = PrinterDC&'TargetHDC
Long FormatRange#,8 = 0'linker Rand in Twips
Long FormatRange#,12 = 0'oberer Rand in Twips
Long FormatRange#,16 = iWidthTwips&'rechter Rand in Twips
Long FormatRange#,20 = iHeightTwips&'unterer Rand in Twips
Long FormatRange#,24 = 0'linker Rand in Twips
Long FormatRange#,28 = 0'oberer Rand in Twips
Long FormatRange#,32 = iWidthTwips&'rechter Rand in Twips
Long FormatRange#,36 = iHeightTwips&'unterer Rand in Twips
Long FormatRange#,40 = 0'CharRange-MIN
Long FormatRange#,44 = -1'CharRange MAX ( -1 = alles )
iTextOut& = 0
iTextLength& = SendMessage(RichEdit&, 14, 0, 0)- SendMessage(RichEdit&,186,0,0)
StartDoc(PrinterDC&,DocInfo#)
Whilenot OR(iTextOut& >= iTextLength&,itextOut& = -1)
StartPage(PrinterDC&)
Long FormatRange#,44 = -1
iTextOut& = SendMessage(RichEdit&, 1081, 1, FormatRange#)
Long FormatRange#,40 = iTextOut&
SendMessage(RichEdit&,1075,0,cRect#)
EndPage(PrinterDC&)
Wend
EndDoc(PrinterDC&)
SendMessage(RichEdit&, 1081, 1, 0)
Endif
Endif
EndWhile
R_DEINITRTF(RichEdit&,rtf_hdc&,rtf_dll&)'RTF-Aufräumen
R_DeInit_object()'RTF-Aufräumen
Dispose FormatRange#
Dispose DocInfo#
Dispose PrintDLG#
DeleteDC=s2>(PrinterDC&)
End
at that pressure be I something moreover, but not wiklich happy. 3 pages pattern without edge supra ok. ex 5 pages old Error. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/06/10 ▲ |
| |
| | | for the rtfhandling.pcu could I The .def-File from the Originalpaket [...] entnehmen, for objects.pcu have I but no found.
by me print both Options To T.Radke on 3 pages but not the word "Ende.".
Perhaps. ought to to the everything first on a (everywhere-same-) working Base reduce or vlt. lying the trouble end the Dokumentes. ^^
too ifs with the trouble "RTF-Ausdrucken" not plenty To do has so ists end vlt. plainer simply self To print or. self The pages/ Images To produce. ^^
let itself HTML plainer print? |
| | | | |
| | Thomas Freier | resolve not The task, that the document moreover given go should, derjenige it even with Word or WordPad open and Edit can should. simply from the Program print isn't the trouble and it should still How with WordPad too over XProfan possible his. Dieter becomes these Lines indeed reading and Perhaps after a Solution search.
Nachtrag: a 26 seitige RTF with reinem Text is free from problems To print. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/06/10 ▲ |
| |
| | | Irgendwas Have I Schonmal found [...] ^^ |
| | | | |
| | Thomas Freier | Jo! The Page [...] have I already long as Lesezeichen in the Browser lying. can but only little for want of Programmier- and Englischkenntnissen verwerten. with reinen Textseiten runs the pressure gesteuert over CompileMarkSeparation tidy ex. has The RTF but only Images, is correct the Dokumentenende not any more. The pressure end already before. with something Spielerei CompileMarkSeparation could I it so steer, that The To expected seven pages with pictures any ausgedruckt get. having but too with To hohem x% up to 12.000 additional Leerseiten. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/08/10 ▲ |
| |
| | | And if You time PrinterDC too per Schleifendurchgang new beget?
Nachtrag: sooner balderdash there PrinterDC& = Long(PrintDLG#,16) |
| | | | |
| | | I mean I Have what, must yet verifizzeln... |
| | | | |
| | | withal absolutem chaos-Garbage do I you the on because the by me any pages druckt until end: |
| | | | |
| | Thomas Freier | in the momentum come I lest moreover. Erststart the Text99.exe with printer freePDF watts The 1. Page printed. as printer whom Epson select --> no reaction. as printer whom Destiller chosen --> no reaction. again freePDF chosen --> now too no reaction More. will be me on the evening The Text99.xprf distinguished and try To Druckergebnissen To come. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 10/08/10 ▲ |
| |
| | |
| | | | |
|
AnswerTopic-Options | 17.069 Views |
Themeninformationenthis Topic has 3 subscriber: |