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
5
votes
3 answers

Alternative to wkhtmltopdf

I need to convert html text to pdf. Most answers here recommend to use pdfkit and wkhtmltopdf (https://wkhtmltopdf.org/). However, me company doesn't allow me to install wkhtmltopdf (it is also blocked by admin). There was an option to build from…
PoonLamy
  • 101
  • 1
  • 2
  • 4
5
votes
3 answers

Images not showing up on PDF created from HTML

I want to create PDF dynamically. That means I am taking files from Google Drive and then putting them in a HTML code and trying to create PDF out of it. Everything is working fine , except images are not showing up. What I am doing right now is…
5
votes
2 answers

Keeping CSS in Html to PDF export using Javascript

I am trying to generate PDF using JavaScript but I am unable to generate on with CSS. I am currently using jsPDF. The issue with jsPDF is that it takes away all the formatting. I don't need styles or colors but I need to have multiple divs side by…
Hamza
  • 1,593
  • 2
  • 19
  • 31
5
votes
4 answers

Create PDF from HTML using TheArtOfDev.HtmlRenderer.PdfSharp

I need to convert a well-formatted HTML string to a PDF document. I found this DLL that should do what I need, but it isn't working fine on formatting. That's the HTML code I'm trying to convert, and viewing it on browser works fine (I've used…
Michele Ietri
  • 184
  • 1
  • 4
  • 16
5
votes
2 answers

wkhtmltopdf: show content on footer, for example page number

I expected this command to show 1/1 at the bootom of the generated pdf but no... any idea? wkhtmltopdf --footer-center [page]/[topage] www.google.com /tmp/foobar.pdf Version: 0.12.2.4 on Linux
tirenweb
  • 30,963
  • 73
  • 183
  • 303
5
votes
1 answer

How to convert url of html page to pdf in java using iText & flying saucer?

I've just downloaded xhtmlrenderer and iText jar files. I can make pdf files by using these jars. What I exactly want is: I need to create pdf if I give one valid URL (say "https://xhtmlrenderer.dev.java.net/news.html") in the place of "inputFile".…
Vinothkumar Arputharaj
  • 4,567
  • 4
  • 29
  • 36
5
votes
1 answer

UIPrintPageRenderer / HTML to PDF issue : extra blank space added in rendered PDF

We have an issue using UIPrintPageRenderer while rendering an HTML in UIWebview to PDF page. The HTML contains a table with multiple rows (....) whose heights are known. The UIWebView well renders that HTML but once transformed in PDF through…
momomonet
  • 51
  • 2
5
votes
1 answer

Itextsharp set font for IElement

var htmlarraylist = HTMLWorker.ParseToList(new StringReader(htmlText), styles); document.Open(); BaseFont Vn_Helvetica = BaseFont.CreateFont(@"C:\Windows\Fonts\arial.ttf", "Identity-H", BaseFont.EMBEDDED); Font fontNormal = new…
Alex
  • 8,908
  • 28
  • 103
  • 157
4
votes
1 answer

Convert html to pdf in landscape mode using iText

I'm trying to convert html to pdf using iText. Here is the simple code that is working fine : ByteArrayOutputStream pdfStream = new ByteArrayOutputStream(); HtmlConverter.convertToPdf(htmlAsStringToConvert, pdfStream) Now, I want to convert the pdf…
Kimo_do
  • 568
  • 5
  • 12
4
votes
2 answers

React native html to pdf

I am using this code and it works fine in simulator as I am getting a location and can get pdf file from there async createPDF() { let options = { html: '

PDF TEST

', fileName: 'test', directory: 'Documents', …
Rover
  • 661
  • 2
  • 18
  • 39
4
votes
2 answers

Boxes are displayed instead of text in pdfkit - Python3

I am trying to convert an HTML file to pdf using pdfkit python library. I followed the documentation from here. Currently, I am trying to convert plain texts to PDF instead of whole html document. Everything is working fine but instead of text, I am…
Nandan Bhat
  • 1,573
  • 2
  • 9
  • 21
4
votes
2 answers

iText 7 accessible PDFs from HTML: how do I avoid table tag when using display: table;

I am working on an ASP.NET MVC project which converts a view to a PDF. Previously, Rotavia was used, but then a new client requirement is that the PDF be accessible/508-compliant. For layout purposes, the previous developer had a whole header…
Tamer Rifai
  • 169
  • 2
  • 14
4
votes
1 answer

Html2Canvas issue with persian language

I need to use html2canvas to convert HTML to image. The problem is that it can't show the Persian(Farsi) text correctly. I wonder if someone can help me to solve it ! #target { width: 160px; height: 50px; background: blue; color:…
4
votes
1 answer

How to export html table into pdf or excel in angularjs?

I have tried many methods but either they have limitation of Number of columns in pdf or they have height limitation. And for excel, when I open in MAC, it shows HTML. Can anyone suggest any way from which I can export pdf with More than 4 columns…
4
votes
1 answer

convert angular template.html to pdf in angular2 using jspdf

I am new to angular 2 and need functionality to export my html component in angular 2 to pdf using jspdf. I need to convert dynamically generated HTML which is tabular format in to pdf using jspdf. sample code and plunker link is as following:…
Munish Sharma
  • 151
  • 3
  • 7
1 2
3
42 43