Questions tagged [html-to-pdf]

For questions related to conversion of HTML pages to PDF files

Questions related to conversion of HTML pages to PDF files

638 questions
65
votes
9 answers

ITextSharp HTML to PDF?

I'd like to know if ITextSharp has the capability of converting HTML to PDF. Everything I will convert will just be plain text but unfortunately there is very little to no documentation on ITextSharp so I can't determine if that will be a viable…
Kyle
  • 10,839
  • 17
  • 53
  • 63
32
votes
1 answer

Convert HTML to PDF using HtmlRenderer

I am looking to use HtmlRenderer to convert an HTML file to a PDF file. I have seen it being mentioned on several sites that it is possible. However, I don't seem to be able to find any basic sample code to do this. I have added the following NuGet…
slayernoah
  • 4,382
  • 11
  • 42
  • 73
21
votes
6 answers

iText – HTML to PDF - Image is not displayed in PDF

I have a html page with text, image and I am parsing the HTML content to iText to generate the PDF. In the generated PDF,Included images are not getting displayed and , only the text is getting displayed. If I pass the absolute path like…
Deiva
  • 295
  • 2
  • 4
  • 5
19
votes
3 answers

wkhtmltopdf wait for condition before printing

We are using wkhtmltopdf to convert dynamic html pages to pdf. We need to wait until all the ajax requests are finished. Is there a possibility to delay the printing by a condition?
Levi
  • 657
  • 2
  • 6
  • 14
18
votes
5 answers

HTML to PDF - page break with HtmlRenderer

I try to convert HTML to PDF using HtmlRenderer. This is part of code: private byte[] CreateHtmlContent() { string htmlContent = File.ReadAllText(@"htmlExample.txt"); using (MemoryStream ms = new MemoryStream()) { PdfDocument…
kiriz
  • 655
  • 1
  • 7
  • 24
18
votes
9 answers

Convert HTML to PDF in MVC with iTextSharp in MVC Razor

I am trying to convert HTML to PDF with iTextSharp in MVC Razor, but everything I have tried has not worked. Does anyone know how to accomplish this?
Ravi
  • 233
  • 1
  • 3
  • 9
15
votes
4 answers

Uncaught Mpdf\MpdfException: The HTML code size is larger than pcre.backtrack_limit 1000000

I am developing code to generate PDF from HTML code using library MPDF. For HTML Code I am reading from external HTML file. But its not working for larger HTML code size. Is there any way to fix it or do we have any other library which supports my…
Satya Mahesh
  • 339
  • 1
  • 3
  • 14
14
votes
1 answer

Google App Engine PDF converter

I'm looking for a good, open source, PDF generator/library that will convert html (with styling etc.) into a PDF file. Requirement: Must be Java or Python and run on Google App Engine. Must be Free, open-source. Must be easy to use/consume. Yes…
Dewiniaeth
  • 1,123
  • 3
  • 18
  • 30
12
votes
3 answers

Puppeteer Generate PDF from multiple HTML strings

I am using Puppeteer to generate PDF files from HTML strings. Reading the documentation, I found two ways of generating the PDF files: First, passing an url and call the goto method as follows: page.goto('https://example.com'); page.pdf({format:…
Juan Rivillas
  • 897
  • 2
  • 9
  • 23
10
votes
4 answers

Python3 Django -> HTML to PDF

There are a lot of different ways of generating pdfs from a django webpage in python2. The most clean, probably, is pisa and reportlab. These do not work for python3 though. So far, the only method I've had success with is to render the template,…
Eldamir
  • 9,888
  • 6
  • 52
  • 73
10
votes
2 answers

Convert leaflet map snippet to image

I need to export a page that contain leaflet map to pdf. I tried to convert the map container to image but thats not working perfectly. The code I used is here http://jsfiddle.net/Sq7hg/2/ html2canvas([document.getElementById('mydiv')],…
I'm nidhin
  • 2,592
  • 6
  • 36
  • 62
9
votes
1 answer

HTML string trailing off page with jsPDF

I am using jsPDF to generate PDF documents from concatenated HMTL Strings. I need to use this method rather than getElementById() as I am pulling the HTML dynamically using TypeScript. I have been able to generate the PDF document from the HTML…
engage_roll
  • 143
  • 1
  • 13
9
votes
4 answers

.NET version or port of Flying Saucer

Is there any open source .NET project (or port) similar to the Flying Saucer project which renders HTML to PDF using iText?
Tawani
  • 11,067
  • 20
  • 82
  • 106
8
votes
5 answers

DinkToPdf Net Core not able to load DLL files

I am trying to generate PDFs from HTML SQL server database using DinkToPdf library. In the startup file I have added: var context = new CustomAssemblyLoadContext(); context.LoadUnmanagedLibrary(Path.Combine(Directory.GetCurrentDirectory(),…
Joseph Wambura
  • 2,732
  • 2
  • 21
  • 24
8
votes
1 answer

pdf file generated using python pdfkit has no clickable links?

The html file looks like
Phone: +00-0000000
E-mail: zsameem@gmail.com Github:
1
2 3
42 43