Page 12 of 16

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

Posted: Sat Feb 09, 2013 1:26 pm
by Roberto Lopez
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.

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

Posted: Sat Feb 09, 2013 1:38 pm
by Roberto Lopez
Hi All,

Attached is the complete sample with proposed modifications.

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

Posted: Sat Feb 09, 2013 1:49 pm
by Rathinagiri
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.

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

Posted: Sat Feb 09, 2013 1:50 pm
by Rathinagiri
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

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

Posted: Sat Feb 09, 2013 2:51 pm
by Roberto Lopez
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!

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

Posted: Sat Feb 09, 2013 2:59 pm
by Rathinagiri
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.

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

Posted: Sat Feb 09, 2013 4:42 pm
by Roberto Lopez
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.

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

Posted: Sat Feb 09, 2013 9:30 pm
by Roberto Lopez
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).

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

Posted: Sat Feb 09, 2013 10:35 pm
by Roberto Lopez
And... IMHO, _gridpdf should be integrated in HMG core, as a new method (export) for grid control.

It is great too.

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

Posted: Sat Feb 09, 2013 10:37 pm
by Roberto Lopez
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.