Page 3 of 16
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Wed Oct 03, 2012 6:35 pm
by bpd2000
Request to add border option for Image object
Dear Rathi,
Add following line
@ 17, 07 HPDFPRINT rectangle to 129, 153 penwidth 2 color { 0, 0, 255 }
after / before code for IMAGE 'peacock.png' it looks nice
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Wed Oct 03, 2012 8:58 pm
by esgici
This message make me crazy
xxx.exe stopped !
Windows can search a solution to this problem.
> Search online help
> Close program
Problem is : if you have an image to add to .pdf, the image file must be exist;
otherwise Window will make you crazy

until you find the source of error.
By the way, some (probably all) function of hbhpdf library returns pointers, no objects.
- ExcptErr.zip
- Exception error log
- (1.39 KiB) Downloaded 382 times
- ErrorRpt.zip
- Some humble suggestions to avoid such errors
- (717 Bytes) Downloaded 355 times
Regards
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Thu Oct 04, 2012 10:22 am
by esgici
Hi
A new version of HPdfDemo
Added:
- - a table : COMPANY ( hard coded company info removed )
- an option : WayBill
- VAT
- Multiple pages
Changed : some cosmetics
Pleas note that hmg_hpdf.Prg is slightly different than original.
Enjoy

- Screen shoot of HPdfDemo 2012.10.04
- HPdfDemoCA04.PNG (104.49 KiB) Viewed 7922 times
- HPdfDemoCA04.zip
- Source files and test tables of HPdfDemo 2012.10.04
- (104.38 KiB) Downloaded 430 times
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Thu Oct 04, 2012 11:09 am
by bpd2000
esgici wrote:Hi
A new version of HPdfDemo
HPdfDemoCA04.zip
Good
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Thu Oct 04, 2012 11:20 am
by Rathinagiri
I have attached herewith a new version of HMG_HPDF.
Change Log:
1. Error checking and avoiding (Thanks to Esgici). Image file is tested for existence now.
2. Implemented Rounded Rectangle. Now we can set the curve length also. Please see the sample.
3. "Set HPDFDOC PERMISSION to" and "Set HPDFDOC PageMode to" commands. I don't know what these commands do. Please see the hmg_hpdf.ch file for details.
- pdf.zip
- (582.43 KiB) Downloaded 447 times
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Thu Oct 04, 2012 11:36 am
by esgici
Thanks a lot Mr. Diamond
Best regards
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Thu Oct 04, 2012 1:35 pm
by bpd2000
rathinagiri wrote:I have attached herewith a new version of HMG_HPDF.
Change Log:
3. "Set HPDFDOC PERMISSION to" and "Set HPDFDOC PageMode to" commands. I don't know what these commands do. Please see the hmg_hpdf.ch file for details.
pdf.zip
PDF created by following command
"
SET HPDFDOC PASSWORD OWNER 'owner' USER 'user'"
PDF opened by user password user can do all function like view, copy print, edit PDF
Command "
SET HPDFDOC PERMISSION TO READ" will permit to user to read file only
[Mainly this type of file use to send password to user by mail etc.]
Command "
SET HPDFDOC PERMISSION TO PRINT" will permit to user to PRINT PDF file
Command "
SET HPDFDOC PERMISSION TO COPY" will permit to user to copy PDF content
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Thu Oct 04, 2012 10:33 pm
by esgici
rathinagiri wrote:...Implemented Rounded Rectangle...
Tested, works perfect
Again, thanks a lot
Also tried a shadow effect by adding (by courtesy of author) two new HPDFPRINT commands :
Code: Select all
#xcommand @ <Row>, <Col> HPDFPRINT ERASE TO <ToRow> , <ToCol> ;
=> ;
_HMG_HPDF_RECTANGLE ( <Row> , <Col> , <ToRow> , <ToCol> , , 255, 255 , 255 , .F. , .T. , .T. )
#xcommand @ <Row>, <Col> HPDFPRINT ERASE TO <ToRow> , <ToCol> ROUNDED;
=> ;
_HMG_HPDF_ROUNDRECTANGLE ( <Row> , <Col> , <ToRow> , <ToCol> , , 255, 255 , 255 , .F. , .T. , .T. )
This implementation assume that back-color is WHITE.
Does we can define and query back-color ?
My method for ( rounded ) shadow effect is :
Code: Select all
@ nRow + 1, nCol + 1 HPDFPRINT RECTANGLE ;
TO ( nRow + 36 ), ( nCol + 111 ) ;
FILLED COLOR LIGHTGRAY ;
ROUNDED
@ nRow, nCol HPDFPRINT ERASE TO nRow + 35, nCol + 110 ROUNDED
@ nRow, nCol HPDFPRINT RECTANGLE ;
TO nRow + 35, nCol + 110 ;
ROUNDED
In HPdfDemo.prg, add this two line at beginning of
WriteCompany procedure, after deleting
Code: Select all
@ nRow + 1, nCol + 1 HPDFPRINT RECTANGLE ; ...
command.

- HMG PDF Rounded Rectangle and shadow effect
- HPdfRRectangle.PNG (67.01 KiB) Viewed 7877 times
Happy HMG'ing

Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Thu Oct 04, 2012 10:37 pm
by esgici
Hi Dave
bpd2000 wrote:...following commands...
Apparently you are a good researcher
So you can build a good documentation ( user guide ) for HMG_HPDF, I think
Regards
Re: HMG_HPDF - Export to PDF made easy... (New Version)
Posted: Fri Oct 05, 2012 1:16 am
by esgici
Hi
IMHO it's time to introduce
national characters subject
Regards