PDF converter for HTML - vb.net

I am searching for a product that converts HTML to PDF in VB. I have searched alot for the products, but most of them are very expensive or doesn't work very well. Can anyone suggest me of a good quality, working product?
Thanks

Try using mPDF. mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. Its free and works very good.
http://www.mpdf1.com/mpdf/index.php

See WKHTMLPDF.
I have checked quality and used this tool. This is the good one and Opensource. This is shell utility to convert html to pdf using the webkit rendering engine, and qt.

I use htmldoc
Don't know if it fits your definition of "works very well", but for me, it does the trick.
A different approach is to install a print-to-pdf printer driver (such as freepdf), and print from the browser.

Related

Sphinx documentation: Include svg images in PDFs via latex

I'm doing an internship for an IT company which needs a document application for its firmware docs (md files).
The request was to maintain these md files and to convert them to rst format (I used pandoc). So now I have a configured Sphinx application with only rst files. The problem now is that some rst have links to SVG images, and I have to use the latex builder of Sphinx to convert them to PDFs.
I've searched around and I found this solution from 2 years ago, which was essentially what I was looking for: https://sites.google.com/site/nickfolse/home/sphinx-latexpdf-output-with-svg-images. I tried to implement it but I'm not an expert with GNU makefiles and I don't know if the current version of Sphinx allows it or if it is out there an easy workaround, so the thing didn't succeed.
Does someone have a viable solution for this?
At this time, SVG is still not supported. I work around it in Pyramid docs by exporting the original file (OmniGraffle) to both SVG and PNG.
In docs/narr/router.rst:
.. image:: ../_static/pyramid_request_processing.*
And we place images in docs/_static.
The HTML uses SVG and the PDF uses PNG.
There is available the Sphinx SVG to PDF converter extension to automatically convert from SVG to PDF.

How to save a template as PDF in symfony

I am using Symfony1.4 with doctrine. I want to save a invoice template to PDF. How can i do this.
I use for this sfTCPDFPlugin
For converting HTML to PDF, I get the best results with Wkhtmltopdf. Because it uses the Webkit rendering engine (the same used in Chrome and Safari for example), the results are exactly the way you can see the HTML rendered in those browsers.
It is in fact just a binary you can run from the command-line, but an example PHP wrapper class is available from the website. I also did not find it very hard to write a wrapper class myself with some added functionality.

How to read a pdf file by using HTML5?

I want to create html file by which i could read any PDF file by providing the source of that PDF file. How can i do this by using only html5?
For example i want read a pdf file which is available in C drive so scr="http://virdir/mypdf.pdf".
I want something like this.
You want to use the developing HTML 5 File API. Mozilla has a good explanation, and you can also refer directly to the spec.
Since PDF is a binary format, you will probably want to use FileReader.readAsBinaryString().
Parsing and rendering (e.g. to a canvas) a PDF in JavaScript is possible, but it would be very challenging.
Here is an open source pdf reader written in javascript.
https://github.com/mozilla/pdf.js
There are APIs available to play with. It comes built into Firefox browser and has good support from Mozilla community.

Jekyll documentation to PDF with TOC

I would like to write documentation using Jekyll with HTML and PDF outputs. Html can have a navigation but the PDF should have table of contents. Is there a free and easy way to do that?
The HTML part is easy but I would like to use #media print CSS for making the PDF file.
I have a few ideas how to do this.
Use PrinceXML, unfortunately this is commercial product with a nasty price tag ~$500
Use WKHTMLTOPDF
Use Maruku, since it is possible to do a PDF conversion using it
I would like to have multiple pages HTML and single page PDF with a TOC. Any suggestions?
Btw. Buildr has solved this problem using PrinceXML.
If 'free' is your most important criterion, than wkhtmltopdf is your best bet. It supports things like covers, toc, headers, footers and sections. Depending on how exotic the layout of your document will be, you most likely will run into some page-break issues, but with a bit of tinkering you should be fine.
I've been using wkhtmltopdf for a bit now, with some quite complicated documents (with javascript charts, tables, svg images, etc.) and have not run into too many issues.
Make sure you use the static version of wkhtmltopdf, as it is the only version which supports rendering of a TOC page.
You can use the PDFKit gem, which uses wkhtmltopdf behind the scenes. Then you can put your PDF logic in a Jekyll plugin as a generator or converter.
For generating a table of contents using Jekyll, you can use the {:toc} macro offered by markdown, or write your own textile table of contents filter if you prefer to use textile..
For generating a PDF from Html and CSS, I have found weasyprint to be a good solution. Since they do not rely upon an external engine for rendering, they do not depend upon foreign project's roadmaps for implementing relevant features such as CSS generated content or #page CSS-declarations. (But in contrast to wkhtmltopdf, weasyprint does not parse javascript).
You could also use a browser extension called Awesome Screenshot to create JPEG/PDF from a page. The extension allows you to create a full-page image or export it to PDF. With this tool, you can export all pages really quickly (and/or later combine all PDFs together to create a single document).
I am aware this is a quick & dirty solution (not perfect). E.g: while using images instead of text, the full-text search will not work. Additionally, it may require some manual work, but it does the job when you just want to read it.

How to get number of pages in a PDF document regardless of version ? Some scripting language

How I can get the number of pages in a PDF document ? The document can have images too, and text in different font size. It should work with different PDF document versions.
The answer can be in any scripting language, I will port them later to Ruby.
Using pyPdf:
from pyPdf import PdfFileReader
pdf = PdfFileReader(file("document.pdf", "rb"))
print pdf.getNumPages()
I think there must be a similar library with similar functionality for Ruby.
I can think of a band-aid solution which might just work. I am going to assume that you are developing a web application/web page which needs this information. In that case, let the adobe reader plugin for the browser load the pdf document. Then, use the plugin to attach/execute some 'Javascript for pdf' to the loaded document which will return the number of pages. The DOM for that function call can be found here:
http://www.adobe.com/devnet/acrobat/pdfs/js%5Fapi%5Freference.pdf
Further, you must also collect this information and get it back. You may also find this guide helpful:
http://www.adobe.com/devnet/acrobat/pdfs/Acro6JSGuide.pdf