Printing - Page number paradox

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
bpd2000
Posts: 947
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 118 times
Been thanked: 42 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
Convert Dream into Reality through HMG

User avatar
dragancesu
Posts: 453
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 3 times
Been thanked: 64 times

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: 4058
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

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: 1943
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 117 times
Contact:

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: 5161
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 127 times
Been thanked: 128 times
Contact:

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: 1943
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 30 times
Been thanked: 117 times
Contact:

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: 39
Joined: Tue Mar 14, 2017 12:24 pm
DBs Used: DBF
Has thanked: 10 times
Been thanked: 2 times

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 **************************
WIN 10 64-bit, WIN 7 32-bit, HMG 3.4.4, 32-bit

User avatar
serge_girard
Posts: 1833
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 273 times
Been thanked: 63 times
Contact:

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

Thx Karl and welcome from Belgium!

Serge

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

Post by Pablo César » Wed Mar 29, 2017 5:44 pm

Hi Karl, have you be welcome to our community.

Sorry I did not understand you regarding button, pages.

I translated your short code but I did not understood.

Would you be so kind to prepare a workable short exemple of what you are talking ?

By preference to be a short demo in English that I can compile and would be perfect if you embrace your source code in CODE tags. (Here for CODE tags - Brief tutorial)

I am interested to know how you do. :)
 
srvet_claudio wrote:
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.
Claudio, have you already prepared a demo ?

I'm waiting for that. :)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

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

Post by srvet_claudio » Wed Mar 29, 2017 8:42 pm

Pablo César wrote:
Wed Mar 29, 2017 5:44 pm
Claudio, have you already prepared a demo ?

I'm waiting for that. :)
When I have time I will do
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

Post Reply