Printing - Page number paradox

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
bpd2000
Posts: 891
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 60 times
Been thanked: 12 times

Re: Printing - Page number paradox

Post by bpd2000 » Wed Oct 26, 2016 4:01 am

Pablo César wrote: Our C Guru.
+1
Rathinagiri wrote:That is unbelievable! :)
+1
BPD
HMG Convert Dream into Reality

User avatar
dragancesu
Posts: 383
Joined: Mon Jun 24, 2013 11:53 am
Location: Subotica, Serbia
Been thanked: 14 times

Re: Printing - Page number paradox

Post by dragancesu » Wed Oct 26, 2016 1:10 pm

Perfect,
yet to make search box in PREVIEW window
P.S. One was written to be

User avatar
Pablo César
Posts: 3793
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 78 times
Been thanked: 124 times

Printing - Page number paradox

Post by Pablo César » Wed Oct 26, 2016 1:44 pm

Nice idea Dragan.

Would be perfect for string search at metafiles... wow !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
srvet_claudio
Posts: 1864
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 67 times
Contact:

Re: Printing - Page number paradox

Post by srvet_claudio » Wed Oct 26, 2016 2:05 pm

dragancesu wrote:Perfect,
yet to make search box in PREVIEW window
P.S. One was written to be
It is possible to find and replace a text in a emf. I go to prepare a demo.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
Rathinagiri
Posts: 5025
Joined: Tue Jul 29, 2008 6:30 pm
Location: Sivakasi, India
Has thanked: 75 times
Been thanked: 83 times
Contact:

Re: Printing - Page number paradox

Post by Rathinagiri » Wed Oct 26, 2016 3:24 pm

If the printing option is without preview what will be the situation?

Even at that time EMF files are created?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
srvet_claudio
Posts: 1864
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 67 times
Contact:

Re: Printing - Page number paradox

Post by srvet_claudio » Wed Oct 26, 2016 10:04 pm

Rathinagiri wrote:If the printing option is without preview what will be the situation?

Even at that time EMF files are created?
EMF files are generated internally only in preview mode, but it could to force the generation of files in other modes.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

Karl
Posts: 1
Joined: Tue Mar 14, 2017 12:24 pm
Location: Germany
Has thanked: 1 time

Re: Printing - Page number paradox

Post by Karl » Thu Mar 16, 2017 10:29 pm

Hi Claudio,
Thanks for your fabulous code. Sorry, I´m a very new member in this forum. The problem with the pages has been occupying me for a long time. I work with RICHEDITBOX and there is no PRINTDOC or PRINTPAGE as you can see in the following code. But I found printing twice is a fine way and very fast. The second pass avoids the whole printer-dialog and you have only to push the leave-button (Icon "door)" after the first pass, if pages are greater than 1. Now I´m looking for a routine which will push this button automatically. Not knowing about the source code of the Preview window I need your help. It would be great.

Thanks in advance from Ulm-Germany :D
Karl

***************************** Beginn Auftrag-Druck *************************
FUNCTION AuftragDruck
PRIVATE page := 0, ;
pages := 1, ;
lSuccess := .F.

SELECT PRINTER DIALOG TO lSuccess PREVIEW
IF lSuccess
aSelRange := {0,-1}
PrintPageCodeBlock := {||page += 1, @ 0,0 PRINT AuftragsKopf()}
Form_81.Edit_1.RTFPrint (aSelRange, 13, 95, 10, 75, PrintPageCodeBlock)
pages := page
IF pages > 1
page := 0
aSelRange := {0,-1}
PrintPageCodeBlock := {||page += 1, @ 0,0 PRINT AuftragsKopf()}
Form_81.Edit_1.RTFPrint (aSelRange, 13, 95, 10, 75, PrintPageCodeBlock)
ENDIF
ELSE
MsgInfo('Drucker nicht bereit !')
ENDIF
RETURN NIL

PROCEDURE AuftragsKopf()
LOCAL b_Font := "Arial", ;
b_Size := 7, ;
c_Font := "Times New Roman", ;
c_Size := 12

@ 0,0 PRINT IMAGE 'versauf' ;
WIDTH 210 ;
HEIGHT 297

IF pages > 1
@ 28,70 PRINT 'Seite ' + STR(page, 3) + ' von ' + STR(pages, 3) FONT c_Font SIZE c_Size
ELSE
@ 28,70 PRINT 'Seite 1 von 1' FONT c_Font SIZE c_Size
ENDIF
@ 19.5,112 PRINT 'Kennzeichen' FONT b_Font SIZE b_Size
@ 22 ,112 PRINT ken1 + ' - ' + ken2 + ' ' + ken3 FONT c_Font SIZE c_Size
@ 19.5,158 PRINT 'Fahrg.-Nr.' FONT b_Font SIZE b_Size
@ 22 ,158 PRINT fgnr FONT c_Font SIZE c_Size
RETURN NIL[/size]
****************************** Ende Auftrag-Druck **************************

User avatar
serge_girard
Posts: 1521
Joined: Sun Nov 25, 2012 2:44 pm
Location: Belgium
Has thanked: 142 times
Been thanked: 21 times
Contact:

Re: Printing - Page number paradox

Post by serge_girard » Fri Mar 17, 2017 7:53 am

Thx Karl and welcome from Belgium!

Serge

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest