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

Moderator: Rathinagiri

User avatar
bpd2000
Posts: 1062
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 193 times
Been thanked: 89 times

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

Post by bpd2000 » Wed Oct 03, 2012 6:35 pm

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: 4502
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 373 times
Been thanked: 111 times
Contact:

Post by esgici » Wed Oct 03, 2012 8:58 pm

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 117 times
ErrorRpt.zip
Some humble suggestions to avoid such errors
(717 Bytes) Downloaded 120 times
Regards
Viva INTERNATIONAL HMG :D

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

Post by esgici » Thu Oct 04, 2012 10:22 am

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

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

User avatar
bpd2000
Posts: 1062
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 193 times
Been thanked: 89 times

Post by bpd2000 » Thu Oct 04, 2012 11:09 am

esgici wrote:Hi

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

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

Post by Rathinagiri » Thu Oct 04, 2012 11:20 am

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

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

Post by esgici » Thu Oct 04, 2012 11:36 am

Thanks a lot Mr. Diamond :D

Best regards
Viva INTERNATIONAL HMG :D

User avatar
bpd2000
Posts: 1062
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 193 times
Been thanked: 89 times

Post by bpd2000 » Thu Oct 04, 2012 1:35 pm

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: 4502
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 373 times
Been thanked: 111 times
Contact:

Post by esgici » Thu Oct 04, 2012 10:33 pm

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

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

Post by esgici » Thu Oct 04, 2012 10:37 pm

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: 4502
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 373 times
Been thanked: 111 times
Contact:

Post by esgici » Fri Oct 05, 2012 1:16 am

Hi

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

Regards
Viva INTERNATIONAL HMG :D

Post Reply