PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Block print and Hyperlinks.  (Read 915 times)

dlocke

  • Member
  • **
  • Posts: 17
    • View Profile
Block print and Hyperlinks.
« on: November 28, 2023, 10:59:11 AM »
Hi

Is it possible when block printing to a pdf with "*TEXT" to have email addresses appear as a hyperlink when viewing the pdf file ?

Don Locke
Event Software

michaelgreer

  • Diamond Member
  • *****
  • Posts: 129
    • View Profile
Re: Block print and Hyperlinks.
« Reply #1 on: November 28, 2023, 04:35:47 PM »
I'm not sure what you mean by "*TEXT", but I think you want this, which can be found in the online manual: (https://manual.pvxplus.com/PXPLUS/file_handling/~pdf~.htm)

Hyperlinks
Text Hyperlinks

A hyperlink can be outputted to a PDF document by printing using the 'TEXT' mnemonic with the <URL> attribute where URL is the destination of the hyperlink. The text will be underlined and displayed in blue to distinguish it as hyperlink text unless the style=inherit option was specified with the URL. In that case, the current font and foreground color will determine the look of the hyperlink text.

Example:

print (pdf_chan)'text'(240,420,"Google","C<http://www.google.com>")

(Support for text hyperlinks was added in PxPlus 2018.)
(The style=inherit option was added in PxPlus 2019.)

Picture Hyperlinks

A picture can be created as a hyperlink that can be outputted to a PDF document by using the 'PICTURE' mnemonic with the <URL> attribute where URL is the destination of the hyperlink.

Example:

open (pdf_chan)"*PDF*;file=C:\my_app\abc\report.pdf"
print (pdf_chan)'picture'(1,1,100,100,"C:\my_app\abc\resources\mylogo.png,<https://www.mycompany.com>",2)
print (pdf_chan)'picture'(500,800,700,880,"C:\my_app\resources\mapbutton.png,<file:///c:/my_app/abc/map.pdf>")
close (pdf_chan)

(Support for picture hyperlinks was added in PxPlus 2019.)

Rectangle Hyperlinks

A rectangle can be created as a hyperlink that can be outputted to a PDF document by using the 'RECTANGLE' mnemonic with the <URL> attribute where URL is the destination of the hyperlink. This can also be used to create an arbitrary region in the PDF that is a hyperlink. By setting 'PEN' to 0, the rectangle will not be drawn; however, the hyperlink will be created.

Example:

open (pdf_chan)"*PDF*;file=C:\my_app\abc\report.pdf"
print (pdf_chan)'pen'(1,3,8),'fill'(2,6)
print (pdf_chan)'rectangle'(200,200,600,600,0,"<https://www.pvxplus.com>")
print (pdf_chan)'pen'(0,0,0)
print (pdf_chan)'rectangle'(800,100,900,400,0,"<file:///C:/my_app/abc/map.pdf>")
close (pdf_chan)

(Support for rectangle hyperlinks was added in PxPlus 2019.)