Here comes again a NEW version:
- pdf.zip
- (280.96 KiB) Downloaded 368 times
New Features in this release:
1. URL Linking
2. Page Linking
3. Tooltip
4. HMG_HPDF_PageCount()
5. Insert HPDFPage
6. Select HPDFPage
Let us see one by one:
1. URL Linking:
This is to link a Web URL/Mail ID inside the document. Optionally you can specify the font, size, color and alignment.
Syntax:
@ Row , Col HPDFURLLINK cTitle TO cLink [ FONT cFontName ] [ SIZE nFontSize ] [ COLOR aColor ] [ CENTER|RIGHT|JUSTIFY ]
Example:
@ 10, 10 HPDFURLLINK "Click here to go to HMGForum" TO '
http://www.hmgforum.com' SIZE 14 COLOR { 0, 0, 255 }
2. Page Linking:
This command is to cross link a page inside a document. This is an useful feature to create an index of the whole document and cross link between pages. You have to specify the respective number of page to create the link. Optionally you can specify font, size color, alignment and border. Border width is optional too and is valid only if the border clause is included.
Syntax:
@ Row, Col HPDFPAGELINK cLink TO nPage [ FONT cFontName ] [ SIZE nFontSize ] [ COLOR aColor ] [ CENTER|RIGHT|JUSTIFY ] [ BORDER ] [ WIDTH nwidth ]
Examples:
@ 10, 10 HPDFPAGELINK 'Go to Page 5' TO 5 size 12 color { 255, 0, 0 }
@ 10, 10 HPDFPAGELINK 'Go to Page 5' TO 5 size 12 color { 255, 0, 0 } BORDER
@ 10, 10 HPDFPAGELINK 'Go to Page 5' TO 5 size 12 color { 255, 0, 0 } BORDER WIDTH 0.5
@ 10, 10 HPDFPAGELINK 'Go to Page 5' TO 5 font 'Times-Roman' size 12 color { 255, 0, 0 }
3. Tooltip:
This command is used to show a tooltip when the mouse is hovered over the particular icon. You have to specify either one of the types of icon in the list below.
Syntax:
@ Row, Col HPDFTOOLTIP cToolTip ICON COMMENT|KEY|NOTE|HELP|NEW_PARAGRAPH|PARAGRAPH|INSERT
Examples:
@ 10, 10 HPDFTOOLTIP 'This is Comment Icon Tooltip' ICON COMMENT
@ 20, 10 HPDFTOOLTIP 'This is Key Icon Tooltip' ICON KEY
4. HMG_HPDF_PageCount() -> nPageCount
This function can be used to find out the total number of pages at any time in the currently selected HPDFDOC.
5. Insert HPDFPage
This command is used to insert a page before a specified page. This is useful to create an index page after all the pages are designed or you can insert any page any time in between.
Syntax:
INSERT HPDFPAGE BEFORE PAGE nPage
Example:
INSERT HPDFPAGE BEFORE PAGE 1
Note: There should not be any page active before calling this command. Please use END HPDFPAGE before using this command. After this command the inserted page will be the current page of the document. So, before using ADD/INSERT HPDFPAGE again, please use END HPDFPAGE.
6. Select HPDFPage
This command is useful to select any page previously added/inserted by referencing its number. This is useful to add page numbers at the end of the document after designing the whole document.
Syntax:
SELECT HPDFPAGE nPage
Example:
Code: Select all
For i := 1 to HMG_HPDF_PageCount()
SELECT HPDFPAGE i
@ 10, 210 HPDFPRINT 'Page No. ' + alltrim( str( i ) ) RIGHT
END HPDFPAGE
Next i
Note: There should not be any page active before calling this command. Please use END HPDFPAGE before using this command. After this command the selected page will be the current page of the document. So, before using ADD/INSERT HPDFPAGE please use END HPDFPAGE.
I think I have covered most of the features offered by LibHaru/HPDF. I have to write a decent sample now.
Please check for errors/bugs and give your valuable comments.