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

Moderator: Rathinagiri

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 »

Super! I think now we can integrate PDF with HMG officially.
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 »

esgici wrote:...I hope a new version of HMG_3...
and ... it will be very good if BosTaurus too will be an integral part of HMG, I think...

Best regards
Viva INTERNATIONAL HMG :D
PeteWG
Posts: 176
Joined: Sun Mar 21, 2010 5:45 pm

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

Post by PeteWG »

Roberto Lopez wrote:Hi All,
This is the final version of modified HPDF (I've applied changes to its current version now).
Hi Roberto,

Indeed the HPDF component is very interesting/useful !

Now, I don't know if am doing something badly wrong , but I've had problem when I tried to load/use .TTF fonts.
So, while this line:

Code: Select all

PRINT 'This is in Courier font' font 'Courier' size 18 
works ok, (because it uses the Base14 fonts that are built-in to PDF)

unfortunately this line (which tries to load a *.TTF font file):

Code: Select all

PRINT 'This is in Courier font' font 'Cour.ttf' size 18 
fails.. Actually it yields an exception error.

If my observation is correct and HPDF is really un-able to load fonts, this is a very serious limitation because Base14 fonts are able to display ONLY the latin1 character set, which in fact is of no use for other languages sets -not to mention that Base14 is limited to only three font families (courier, helvetica, times).

However, I have managed to isolate the problem inside hmg_hpdf.prg (lines 235 to 270), and have prepared a function to overcome the problem.
In case you (or anyone else) is interested i could post a working sample here.
On the other hand, if there is no problem at all in your current implementation, it would be very appreciated to enlighten me about the correct way to use .TTF fonts.

best regards,


---
Pete
User avatar
CarlosRD
Posts: 63
Joined: Thu Jan 31, 2013 9:20 pm
Location: Orizaba, México

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

Post by CarlosRD »

rathinagiri wrote:For the latest version please download from here.

Dear friends,

I have fixed some major bugs ( especially in LandScape mode and Center/Right alignment )

I have added Grid Printing sample in a separate file. Hope it will be useful.

Now, I am ready to add a GridToolBar (which can be attached to any grid) with four functionalities: :)

1. Grid to Text file
2. Grid to CSV file
3. Grid to Print Directly
4. Grid to PDF export.
pdf.zip
GridPDF.zip
hi all, again problems with my modem.

rathinagiri, congratulations.

Sometimes there are no words to say THANKS to people of good will

i will test it. surelly it will be very usefull. regards.
Todo en el Nombre de Jesus / All in the name of Jesus
Carlos RD
User avatar
CarlosRD
Posts: 63
Joined: Thu Jan 31, 2013 9:20 pm
Location: Orizaba, México

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

Post by CarlosRD »

rathinagiri wrote:Super! I think now we can integrate PDF with HMG officially.
hi all:

I've been show one part of my aplication to owners company where i work, and they say it is very good and they say TANKS to me.
It has not been possible without HMG and without the help i've been get here in this forum.

So, I want to extend those congratulations of my bosses, to all the people who work here with their wisdom and knowledge.

Thanks to all.

**********************

Hola a todos:

he mostrado parte de mi aplicación a mis jefes en mi trabajo y les ha gustado mucho. me felicitaron. Esto no hubiera sido posible sin la ayuda de HMG y sin la ayuda desinteresada que he conseguido aqui.

De tal manera, quiero extender esas felicitaciones, a todas las personas que aqui trabajan o colaboran con su sabiduria y conocimientos.

gracias a todos.
Todo en el Nombre de Jesus / All in the name of Jesus
Carlos RD
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 »

PeteWG wrote:
Roberto Lopez wrote:Hi All,
This is the final version of modified HPDF (I've applied changes to its current version now).
Hi Roberto,

Indeed the HPDF component is very interesting/useful !

Now, I don't know if am doing something badly wrong , but I've had problem when I tried to load/use .TTF fonts.
So, while this line:

Code: Select all

PRINT 'This is in Courier font' font 'Courier' size 18 
works ok, (because it uses the Base14 fonts that are built-in to PDF)

unfortunately this line (which tries to load a *.TTF font file):

Code: Select all

PRINT 'This is in Courier font' font 'Cour.ttf' size 18 
fails.. Actually it yields an exception error.

If my observation is correct and HPDF is really un-able to load fonts, this is a very serious limitation because Base14 fonts are able to display ONLY the latin1 character set, which in fact is of no use for other languages sets -not to mention that Base14 is limited to only three font families (courier, helvetica, times).

However, I have managed to isolate the problem inside hmg_hpdf.prg (lines 235 to 270), and have prepared a function to overcome the problem.
In case you (or anyone else) is interested i could post a working sample here.
On the other hand, if there is no problem at all in your current implementation, it would be very appreciated to enlighten me about the correct way to use .TTF fonts.

best regards,


---
Pete
Hi Pete,

Please post your fix. That will be definitely useful.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
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 »

Carlos,

Congratulations. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
majkll_ns
Posts: 16
Joined: Sun Oct 24, 2010 12:50 pm

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

Post by majkll_ns »

I try this with HMG 3.1.1 and have some questions:

1. what are restrictions comparing it to default print system ? (eg. I succed to load only .png image)
2. can I use .ttf font, for example Arial Narrow? I need it for reports.
3. in one program, can I use both - default print system and pdf printing?

For now, I use combination HMG 3.1.1 with print system (with all national caracters) and "Bullzip PDF Printer" (install as printer and send output to .pdf - you can find it at http://www.bullzip.com/products/pdf/info.php /FREE for personal and commercial use up to 10 users/ )
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Implements in HMG_HPdf

Post by Pablo César »

Please Rathinagiri and Claudio, please note updated demo.Prg file for next release.

This file was updated URL and added some comments about error handling.

It was included euro sign in demo2.prg.

And also please actualize file HMG_HPDF_Doc.pdf at C:\HMG.3.2.1\hfcl\Doc

Thanks in advanced.
Attachments
hfcl_Doc.rar
(286.84 KiB) Downloaded 424 times
samples_hmghpdf.rar
(914 Bytes) Downloaded 377 times
hfcl_source.rar
(9.81 KiB) Downloaded 382 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Italia1
Posts: 60
Joined: Mon Mar 24, 2014 10:55 am
Location: Italia

HMG_HPDF - Unify commands (Regular print vs Hmg_HPDF)

Post by Italia1 »

Pablo César wrote:
mustafa wrote:Aportado por Pablo César ----> SET HPDFDOC ENCODING TO "WinAnsiEncoding"
No, no Mustafa. Yo no hé aportado en ese comando. Apenas esclareci, porque estaban utilizando el mismo comando para HMG_HPDF que el de MiniPrint. Este comando fué adicionado por Rathinagiri donde muestra la tabla en:

viewtopic.php?p=22008#p22008

Lo que fué presentado en octubre de 2012.
In the same thread Roberto Lopez initially here and finally here modified HMG_HPDF with new command PRINT in Sat Feb 09, 2013 10:30 pm. or I did not understand anything? :shock: :oops: ?
Roberto Lopez wrote:Perhaps, we should found some mechanism to make possible to use a syntax more like standard HMG print system.
I mean, instead @ <Row> , <Col> HPDFPRINT, use @ <Row> , <Col> PRINT.
I see the command is the same. Use _HMG_HPDF_SetEncoding( <cEncoding> ). Is only a #xcommand. Or not :? I'm very confused sorry.
I use the great HMG3.2(stable). Have i nice international HMG to everyone!
Post Reply