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

Moderator: Rathinagiri

User avatar
bpd2000
Posts: 1144
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 243 times
Been thanked: 139 times

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

Post 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
BPD
Convert Dream into Reality through HMG

User avatar
esgici
Posts: 4529
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 406 times
Been thanked: 115 times
Contact:

Post by esgici »

This message make me crazy :mrgreen:
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 :mrgreen: 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 143 times
ErrorRpt.zip
Some humble suggestions to avoid such errors
(717 Bytes) Downloaded 144 times
Regards
Viva INTERNATIONAL HMG :D

User avatar
esgici
Posts: 4529
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 406 times
Been thanked: 115 times
Contact:

Post 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 :D

Screen shoot of HPdfDemo 2012.10.04
Screen shoot of HPdfDemo 2012.10.04
HPdfDemoCA04.PNG (104.49 KiB) Viewed 2731 times
HPdfDemoCA04.zip
Source files and test tables of HPdfDemo 2012.10.04
(104.38 KiB) Downloaded 198 times
Viva INTERNATIONAL HMG :D

User avatar
bpd2000
Posts: 1144
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 243 times
Been thanked: 139 times

Post by bpd2000 »

esgici wrote:Hi

A new version of HPdfDemo :)
HPdfDemoCA04.zip
Good
BPD
Convert Dream into Reality through HMG

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

Post 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 203 times
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
esgici
Posts: 4529
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 406 times
Been thanked: 115 times
Contact:

Post by esgici »

Thanks a lot Mr. Diamond :D

Best regards
Viva INTERNATIONAL HMG :D

User avatar
bpd2000
Posts: 1144
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 243 times
Been thanked: 139 times

Post 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
BPD
Convert Dream into Reality through HMG

User avatar
esgici
Posts: 4529
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 406 times
Been thanked: 115 times
Contact:

Post by esgici »

rathinagiri wrote:...Implemented Rounded Rectangle...
Tested, works perfect :arrow:

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
HMG PDF Rounded Rectangle and shadow effect
HPdfRRectangle.PNG (67.01 KiB) Viewed 2686 times
Happy HMG'ing :D
Viva INTERNATIONAL HMG :D

User avatar
esgici
Posts: 4529
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 406 times
Been thanked: 115 times
Contact:

Post by esgici »

Hi Dave
bpd2000 wrote:...following commands...
Apparently you are a good researcher :arrow:

So you can build a good documentation ( user guide ) for HMG_HPDF, I think ;)

Regards
Viva INTERNATIONAL HMG :D

User avatar
esgici
Posts: 4529
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 406 times
Been thanked: 115 times
Contact:

Post by esgici »

Hi

IMHO it's time to introduce national characters subject ;)

Regards
Viva INTERNATIONAL HMG :D

Post Reply