Printing - Page number paradox

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Printing - Page number paradox

Post by bpd2000 »

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: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Printing - Page number paradox

Post by dragancesu »

Perfect,
yet to make search box in PREVIEW window
P.S. One was written to be
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Printing - Page number paradox

Post by Pablo César »

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: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Printing - Page number paradox

Post by srvet_claudio »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Printing - Page number paradox

Post by Rathinagiri »

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: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Printing - Page number paradox

Post by srvet_claudio »

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

Re: Printing - Page number paradox

Post by Karl »

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: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Printing - Page number paradox

Post by serge_girard »

Thx Karl and welcome from Belgium!

Serge
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Printing - Page number paradox

Post by Pablo César »

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: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Printing - Page number paradox

Post by srvet_claudio »

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