html-pdf

page-break not working in html-pdf coverter in nodejs

纵饮孤独 提交于 2021-02-19 08:18:05
问题 I am using html-pdf 2.2.0 module to convert my html in pdf. I am using table with multiple rows so I want to use page-break so then a single row does not divide in two pages but its not working when converting it to pdf. Below is the code sample <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <style> table tbody tr { height

iText 5 HTML+CSS to PDF/A-2 : Helvetica font not embedded error

最后都变了- 提交于 2019-12-27 12:07:31
问题 The following code is being used for converting HTML file with CSS to PDF/A-2 using iText5 (this code is from the example provided online): public static final String HTML = "D:\\PDFA2\\html\\sample.html"; public static final String CSS = "D:\\PDFA2\\html\\sample.css"; public static final String DEST = "D:\\PDFA2\\html\\sample.pdf"; public void createPdf(String file) throws IOException, DocumentException { Document document = new Document(); PdfAWriter writer = PdfAWriter.getInstance(document

CSS issues with html-pdf

泪湿孤枕 提交于 2019-12-24 22:53:52
问题 I want to use html-pdf to save a quote made with sails , .ejs , and angular into a pdf to send it to the customer. An .ejs file (view folder) and its assign .js controller (assets folder) allows the user to create the quote, select the customer, add products, and finally calculate the total of the quote. All the data are bound with angular. I use bootstrap.min.css and importer.css files for my CSS and mostly the Bootstrap grid for my display. When to quote is ready, I have a 'save as PDF'

Convert Html to pdf with images

落花浮王杯 提交于 2019-12-13 09:47:02
问题 I'm trying to convert HTML to PDF so i used TCPDF its PHP plugin. that is the official site for it TCPDF it was working well but its so limited tool and it has limited fonts And it cant convert images to PDF so how can i convert full HTML page with images to PDF file, it dose not matter if it JS or PHP plugin , i just want active solution to convert the whole HTML page with Css to PDF file and maybe i will save it or print it 回答1: $('#showPdf').click(function() { var pdf = new jsPDF(); pdf

iText 5 HTML+CSS to PDF/A-2 : Helvetica font not embedded error

匆匆过客 提交于 2019-11-26 18:01:40
The following code is being used for converting HTML file with CSS to PDF/A-2 using iText5 (this code is from the example provided online): public static final String HTML = "D:\\PDFA2\\html\\sample.html"; public static final String CSS = "D:\\PDFA2\\html\\sample.css"; public static final String DEST = "D:\\PDFA2\\html\\sample.pdf"; public void createPdf(String file) throws IOException, DocumentException { Document document = new Document(); PdfAWriter writer = PdfAWriter.getInstance(document, new FileOutputStream(file),PdfAConformanceLevel.PDF_A_2A); writer.setInitialLeading(12.5f); document