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

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

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

Post by Roberto Lopez » Sat Feb 09, 2013 1:26 pm

Roberto Lopez wrote:
Roberto Lopez wrote: It is simple, easy an inline with the HMG philosophy... it is PERFECT!
And... IMHO, it should be an integral part of HMG.

Perhaps, we should found some mechanism to make possible to use a syntax more like standard HMG print system.
This is my humble proposition:

In hmg.ch the following should be added:

Code: Select all

#xcommand SET PRINTSYSTEM PDF ;
=>;
#include "hmg_hpdf.ch"
Then, the hmg_hpdf.ch file should be changed to make its commands more like standard print system, ie, changing all the HPDFPRINT by PRINT.

Finally, in your application, you should add the following:

Code: Select all

SET PRINTSYSTEM PDF
Thats all.

Attached is my proposed hmg_hpdf.ch file.
Attachments
hmg_hpdf.ch.zip
(4.1 KiB) Downloaded 80 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Roberto Lopez
HMG Founder
Posts: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Sat Feb 09, 2013 1:38 pm

Hi All,

Attached is the complete sample with proposed modifications.
Attachments
pdf.zip
(245.18 KiB) Downloaded 92 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Rathinagiri
Posts: 5173
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 136 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Sat Feb 09, 2013 1:49 pm

Roberto Lopez wrote:
Roberto Lopez wrote: It is simple, easy an inline with the HMG philosophy... it is PERFECT!
And... IMHO, it should be an integral part of HMG.

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 guess that could be done using a #define and then an #ifdef, so, we could have similar commands as standard print system.

From now, I'll base all my new developments printing on HPDF.

Thanks again.
I am very glad you like HMGHPDF.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Rathinagiri
Posts: 5173
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 136 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Sat Feb 09, 2013 1:50 pm

Roberto Lopez wrote:Hi All,

Attached is the complete sample with proposed modifications.
Wow! Your work is very impressive, simple and we need not change our existing application source code also! :D
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Roberto Lopez
HMG Founder
Posts: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Sat Feb 09, 2013 2:51 pm

rathinagiri wrote:
Roberto Lopez wrote:Hi All,

Attached is the complete sample with proposed modifications.
Wow! Your work is very impressive, simple and we need not change our existing application source code also! :D
That was my thinking, since PDF documents are a world wide standard that works in ANY device and can be easily sent by mail or any other means.

Besides that, opening the document after generate file, gives you a print preview with advanced features, so it is a perfect solution for printing.

I'll convert some of my applications to use it, instead the standard print system.

Again, you've done an amazing job. I hope it to see it fully integrated to HMG in the next versions.

Thanks!
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Rathinagiri
Posts: 5173
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 136 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Sat Feb 09, 2013 2:59 pm

Yes. Thanks a lot Roberto.

Apart from this, we can have the liberty of having 2000 x 2000 mm as the maximum paper size. :) The user when he prints (if he wants to) the pdf can reduce the size as he wishes. In one way, it had reduced the use of papers in my office.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Roberto Lopez
HMG Founder
Posts: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Sat Feb 09, 2013 4:42 pm

rathinagiri wrote:Yes. Thanks a lot Roberto.

Apart from this, we can have the liberty of having 2000 x 2000 mm as the maximum paper size. :) The user when he prints (if he wants to) the pdf can reduce the size as he wishes. In one way, it had reduced the use of papers in my office.
I've finished yesterday the first version of a 'real world' reporting application made with HMGSCRIPT 035 (Harbour server version) using DBF files for data, shared with an HMG desktop application.

The next days I'll work on server side PDF reports generation for it, and HPDF will save me, many many hours of hard work.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Roberto Lopez
HMG Founder
Posts: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Sat Feb 09, 2013 9:30 pm

Hi All,

This is a new version with constants prefix changed to PRINTER, PREVIEW added to SELECT PRINTER, and a new command: OPEN FILE (alias for EXECUTE FILE).
Attachments
pdf.zip
(245.6 KiB) Downloaded 140 times
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Roberto Lopez
HMG Founder
Posts: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Sat Feb 09, 2013 10:35 pm

And... IMHO, _gridpdf should be integrated in HMG core, as a new method (export) for grid control.

It is great too.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Roberto Lopez
HMG Founder
Posts: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Sat Feb 09, 2013 10:37 pm

Roberto Lopez wrote:And... IMHO, _gridpdf should be integrated in HMG core, as a new method (export) for grid control.

It is great too.
And a question about it:

How to determine which columns to print at function calling (not interactively)?

TIA.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

Post Reply