HMG_HPDF - Export to PDF made easy... (New Version)

Moderator: Rathinagiri

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

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by bpd2000 »

Now it is time to create utility, than can convert code of print to hmg_hpdf version by one click

or have some idea
BPD
Convert Dream into Reality through HMG
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: HMG_HPDF - Export to PDF made easy... (New Version)

Post by Rathinagiri »

The simple way is find+replace in notepad++. I did it for GridPrint and got it successful in minutes.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by esgici »

rathinagiri wrote:...
I can't fully understand your proposition. Can you please explain using a small sample/template program as to how do you want?
I mean something like this :

Code: Select all

aLinesToPrint :=  {  'This is sample Line 1" ,;         // An array contains lines to print
                             'This is sample Line 2",;
                             'This is sample Line 3" }

         SET HPDFPAGE LINESPACING TO 10

         START HPDFPAGE 

              HPDFPRINT SetRowTo 10   // <= New command; Move write-cursor to row 10      ( Like SetPos() )
              HPDFPRINT SetColTo 10   // <= New command; Move write-cursor to col 10

              FOR nLineNo := 1 TO LEN( aLinesToPrint )
                      
                    HPDFPRINT PRINT_TEXT aLinesToPrint[ nLineNo ]  <...> // <= New command 
                                     // <...> : other PRINT options, is same as @ ... PRINT command

              NEXT nLineNo    

         END HPDFPAGE

/*

In this case this command not required; because SET HPDFPAGE LINESPACING TO works internally after each HPDFPRINT PRINT_TEXT 

                   HPDFPRINT MoveRowTo 10    // <= New command; Move write-cursor 10 mm down from current  row; 
                                                              //  also accept values less than 0 ( negative) for moving up

This command also meaniless for now

                   HPDFPRINT MoveColTo  10   // <= New command; Move write-cursor 10 mm right from current  col
                                                              //  also accept values less than 0 ( negative) for moving left     

*/



instead of

Code: Select all

         
aLinesToPrint :=  {  'This is sample Line 1" ,;         // An array contains lines to print
                             'This is sample Line 2",;
                             'This is sample Line 3" }

        START HPDFPAGE 

              nLineRow := 10

              FOR nLineNo := 1 TO LEN( aLinesToPrint )
                      
                    @  nLineRow, 20 HPDFPRINT aLinesToPrint[ nLineNo ]

                     nLineRow += 10
 
               NEXT nLineNo    

         END HPDFPAGE
Viva INTERNATIONAL HMG :D
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by mol »

rathinagiri wrote:
Is it possible to set liespacing in normal printing?
IMHO, it is. Since all the printing is done using @ row, col we can fix the line spacing as we require. Isn't it?

Please consider this:

Code: Select all

....
nLineSpacing := 5 // line spacing is 5 mm
nFirstRow := 10 // first row starts at 10 mm
nLastRow := 280 // last row is set at 280 mm
nCurrentRow := nFirstRow
lReportContinue := .t.
do while lReportContinue
   @ nCurrentRow, 10 HPDFPRINT cData
   nCurrentRow := nCurrentRow + nLineSpacing
   cData := CurrentRecord()
   if LastRecord() 
      lReportContinue := .f.
   endif
   if nCurrentRow > nLastRow
      END HPDFPAGE
      START HPDFPAGE
      nCurrentRow := nFirstRow
   endif
enddo
.....
Does line-spacing determined by <nRow> value of @ ... command ?

If we have 'print' without @ ... command; between such commands :

HPDF_PRINT BEGIN TEXT
.
HPDF_PRINT PRINT ...
.
HPDF_PRINT END TEXT
Hi Esgici,

I can't fully understand your proposition. Can you please explain using a small sample/template program as to how do you want?
I've mentioned normal printing printing text in rectangular area, not creating .pdf with command
@ x1,y1 PRINT TO x2,y2
User avatar
IMATECH
Posts: 188
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by IMATECH »

Direct Pdf Print:


Instead of viewing PDF file, you can print PDF file directly to selected printer :)



Use following command:

Code: Select all

ShellExecute(0, "Printto", CHR( 34 ) + cPdfFileToPrint + CHR( 34 ), CHR( 34 ) + cPrinterName + CHR( 34 ), 0, 0)
The PrintTo Shell Command
Some applications support the 'printto' action. PrintTo can be used to specify the name of the printer used for the print action. Printer is determined by 3 parameter: printer name, drive name and port.


Regards
M., Ronaldo

By: IMATECH

Imation Tecnologia
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by sudip »

Thanks a lot to all of you. Back after long time. I shall download and test it.
With best regards.
Sudip
With best regards,
Sudip
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by sudip »

Thanks a looooot :D :D :D
It's fantastic !!!
Thanks Esgici, for telling me about this :D :D :D
With best regards,
Sudip
claudiotedesco
Posts: 132
Joined: Thu Jul 31, 2008 12:05 pm

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by claudiotedesco »

Hola Gente

No saben porque cuando compilo me da el siguiente error?
Hay que compilarlo en alguna carpeta determinada?
Gracias
Claudio


hbmk2: Processing configuration: C:\hmg\harbour\bin\hbmk.cfg
hbmk2: Processing: pdf.hbc
hbmk2: Linking... pdf.exe
c:/hmg/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot find -lpng
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe .hbmk\win\mingw\main.o .hbmk\win\mingw\hmg_hpdf.o .hbmk\win\mingw\_hbmkaut.o _temp.o -mwindows -Wl,--start-group -lpng -lhmg -lhbmysql -lmysql -lcrypt -ledit -leditex -lgraph -lini -lreport -lhbwin -lhbziparc -lhbmzip -lmsvfw32 -lvfw32 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbvpdf -lhbmemio -lhbsqlit3 -lsqlite3 -lhbfimage -lhbpgsql -lpq -lhbtip -lhbct -lhbmisc -lhbnetio -lxhb -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -opdf.exe -LC:/hmg/harbour/lib -LC:/hmg//lib -LC:/hmg/SAMPLES/pdf/
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by bpd2000 »

claudiotedesco wrote:Hola Gente

No saben porque cuando compilo me da el siguiente error?
Hay que compilarlo en alguna carpeta determinada?
Gracias
Claudio [/color]
Add following in c:\hmg\hmg.hbc

libs=libhpdf
libs=png

Section : # harbour contrib libs
BPD
Convert Dream into Reality through HMG
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG_HPDF - Export to PDF made easy... (New Version)

Post by esgici »

rathinagiri wrote: ... a small documentation for HMG_HPDF using HMG_HPDF. :)
A small offer as an extension to your "small" documentation : HMG-HPDF doc.
Screen shoot of HMG_HPDF_Fonts prg
Screen shoot of HMG_HPDF_Fonts prg
HMG-HPDF_Fonts.PNG (75.18 KiB) Viewed 5665 times
HPDF_Fonts.zip
Source files of HMG_HPDF_Fonts prg
(15.7 KiB) Downloaded 394 times
Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
Post Reply