开发者

How to set target on url action in PDFLib, php function PDF_create_action

I've added URL's to a PDF created with PHP's built in functions. I have not been able to figure out how to have the links open in a new window, ie target="_new". I've been looking for the available options for PDF_create_action and PDF_create_annotation but have not found much written on either. Following is the code I use:

$url = PDF_create_action($p, "URI", "url {" . $myUrl . "}");
PDF_create_annotation ($p, $x, $x, ($x + 50), ($开发者_开发知识库x + 10), "Link", "linewidth=0 action {activate $url}");  

Thanks


I don't think PDFs have the notion of target="_blank", after all, they are not generated via HTML (even if your PDF library supports that).

Also, PDFs aren't always viewed in a browser, so having them open in a new window is semantically meaningless if the PDF viewer must load the user's browser anyway.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜