[ /Rect [ 78 98 128 114 ]
/Border [ 0 0 0 ]
/Action << /Subtype /URI /URI (./scripts/example.pl.pdf) >>
/Subtype /Link
/ANN pdfmark
After the conversion to PDF the link is shown as something like http://./scripts/example.pl.pdf
If you klick on this link, Acrobat Reader tries to open the file within Mozilla (or IE)
instead of Acrobat Reader.
It would be more suitable for PDF files if the PostScript would contain something like
[ /Rect [ 78 98 128 114 ]
/Border [ 0 0 0 ]
/Action /Launch
/File (./scripts/example.pl.pdf)
/Subtype /Link
/ANN pdfmark
in order to use Acrobat Reader directly to launch other PDF files
digraph G {
label="Workflow example" fontsize=10 fontname="Helvetica"
MAIN [style=filled,color=".7 .3 1.0",fontsize=10,fontname="Helvetica",height=0.2,width=0.4]
END [style=filled,color=".7 .3 1.0",fontsize=10,fontname="Helvetica",height=0.2,width=0.4]
example [label="example",shape=box,style=filled,color=".1 .5 1.0", URL="./scripts/example.pl.pdf",fontsize=10,fontname="Helvetica",height=0.2,width=0.4]
example -> END [label="NEXT",fontsize=8,fontname="Helvetica",height=0.2,width=0.4]
MAIN -> example [label="BEGIN",fontsize=8,fontname="Helvetica",height=0.2,width=0.4]
MAIN -> END [color=red,label="ERROR",fontsize=8,fontname="Helvetica",height=0.2,width=0.4]
END [color=red,style=filled,fontsize=10,fontname="Helvetica",height=0.2,width=0.4]
}
Fix:
else if (Output_lang == POSTSCRIPT || Output_lang == PDF)
{
if (IsPdfFile (url))
{
fprintf(Output_file,"[ /Rect [ %d %d %d %d ]n"
" /Border [ 0 0 0 ]n"
" /Action /Launchn"
" /File (%s)"
" /Subtype /Linkn"
"/ANN pdfmarkn",
pp1.x,pp1.y,pp2.x,pp2.y,
ps_string(url));
}
else
{
fprintf(Output_file,"[ /Rect [ %d %d %d %d ]n"
" /Border [ 0 0 0 ]n"
" /Action << /Subtype /URI /URI %s >>n"
" /Subtype /Linkn"
"/ANN pdfmarkn",
pp1.x,pp1.y,pp2.x,pp2.y,
ps_string(url));
}
}