How Do I convert HTML to PDF with hot links in outputted PDF with ASP(.NET)? Preferably with ActivePDF WebGrabber

StackOverflow https://stackoverflow.com/questions/9122103

  •  22-04-2021
  •  | 
  •  

My company purchased ActivePDF WebGrabber a couple of years ago to convert a classic ASP created HTML page into a PDF form. The only drawback with the tool that we continually run into is that the outputted HTML links are not hot. Are there any tools that do include hot-links within the HTML to PDF output?

According to the ActivePDF FAQ for Does WebGrabber convert hyperlinks into usable links in the output PDF?, the answer is no. There is a phrase confusing me at the end of the answer:

"To implement links in the final PDF, the application would search for links prior to the Postscript generation, and append them once the PDF has been generated using Toolkit."

Does that mean this is how to achieve it, or is this their theoretical but not tested solution? If this is the solution, has anyone done this that might be able to post some sample (pseudo-)code?

Edit: I should mention that we're open to a different tool, and we need it to be accessible via classic ASP and ASP.NET. I would prefer a solution in which the links are automatically hot-linked during PDF generation.

有帮助吗?

解决方案

Looks like you can do it with the activepdf toolkit after the pdf is generated. I think this is what they are referring to.

Use the AddHyperlink function on the resultant pdf

AddHyperlink instructs Toolkit to add a hyperlink in the current output file that connects to a specified URL. When clicked, the URL opens in a new browser window.

edit It would be easier to get a tool that actually does this here are some links

Open Source HTML to PDF Renderer with Full CSS Support

https://stackoverflow.com/questions/3178448/list-of-html-to-pdf-converters

其他提示

In the old days, activePDF Server was the engine behind activePDF WebGrabber. activePDF Server is a Print-to-PDF program (hence the reference to Postscript) so the links were not live.

Beginning with the WebGrabber 2009 release, the dependancy on Server was removed and WebGrabber will now (versions 2009 & 2010) output intelligent PDFs that include hot-links within the HTML to PDF output.

If you can call into a web service then try the PDF Conversion Services. We are currently looking for beta testers for the html to pdf bit, just drop a line via the contact page.

I know it is an old question, but nowadays it should be sufficient to use

converter.PreserveLinks = true;

Where converter is a WebGrabber instance.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top