pdf-generation

How to convert Android View to PDF

孤街醉人 提交于 2019-12-18 05:42:20
问题 I have created an Android Invoice app. The generated invoice is standard Android layout with nested views. I am looking for a library that I can use to convert this view to an pdf document. I am surprised there is no straight forward option coming up in my search or Perhaps I have the done the first thing last. Or perhaps what I am looking for is not possible. Would someone please help point me to a tool that will help me convert or generate a PDF from an Android view. I am open to free and

Zend Framework Render Barcodes Into PDF Pages

别来无恙 提交于 2019-12-18 05:18:05
问题 I'm trying to create PDF pages with barcodes that have correct margins to be printed on sheets of labels (If you have another idea of how to print barcodes onto labels without PDF generation, I'd love to hear it). Below is what I have currently for code: $pdf = new Zend_Pdf(); for($i = 1; $i <= $numberOfPages; $i++) { $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4); $page->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 20); $pdf->pages[] = $page; } foreach($pdf->pages

iTextSharp creation of a pdf from a list of byte arrays

安稳与你 提交于 2019-12-18 03:17:16
问题 I've got a list of byte[] which i'd like to concatenate into one byte[] which will be the final PDf. On the "page = copy.GetImportedPage(new PdfReader(p), i); " i'm getting an "object reference not set to an instance error. I've got no clue of what's going on, i've already checked every object and there's no null. Any ideas on this, or another piece of code that could make the trick?! I've got this method: EDIT public static byte[] concatAndAddContent(List<byte[]> pdf) { byte [] todos; using

HTML to PDF conversion using Chrome pdfium

我是研究僧i 提交于 2019-12-17 23:27:46
问题 Can anyone suggest how to convert HTML to PDF using chrome pdfium. Since, I tried pdf.js and few other, but It is not giving me a proper result. I think chrome pdfium handle them properly. So, I would like to give a try to pdfium for generating PDF file from HTML source. Thanks. 回答1: PDFium (and PDF.js) are merely PDF Viewers, you cannot convert HTML to PDF with them. The actual PDF generation in Chrome is done by the printing component using Blink (the rendering engine) and Skia (the graphic

pdfkit does not style pdfs

痞子三分冷 提交于 2019-12-17 22:39:41
问题 I have a rails 3.1 app that creates pdf documents using pdfkit, and everything works as specified, except for the fact that the generated pdfs don't have any styling. I am assuming that wkhtmltopdf doesn't have access to my stylesheets and that it is not a larger issue than that. Would anyone have a clue as to how you would allow access to these stylesheets? I have basically followed railscast #220 on the subject, however I have had to create a new initializer to get pdfkit to work with rails

Converting MS Word Documents to PDF in ASP.NET [closed]

寵の児 提交于 2019-12-17 22:33:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Similar questions have been asked, but nothing exactly like mine, so here goes. We have a collection of Microsoft Word documents on an ASP.NET web server with merge fields whose values are filled in as a result of user form submissions. After the field merge, the server must convert the document to PDF and

Compare these products for PDF generation with Java given requirements inside: iText, Apache PDFBox or FOP? [closed]

余生长醉 提交于 2019-12-17 22:30:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . There were questions on that but not recently and technology must have gone ahead since then. Requirements: generating pdf documents based on predefined template (I can use either pdf forms or xsl-fo) being able to fill textual data being able to fill graphical data (generated bar codes) being able to alter pdf

Convert PDF to PNG using ImageMagick

纵然是瞬间 提交于 2019-12-17 22:04:40
问题 using ImageMagick, what command should i use to convert a PDF to PNG? I need highest quality, smallest file size. this is what I have so far (very slow by the way): convert -density 300 -depth 8 -quality 85 a.pdf a.png Looking at what Gmail does when a user "view" a PDF, the quality is awesome and the file size very minimal. The DPI is just 96 (I have to set a density of 300 to get anything decent). Anyone know how GMail does it? Thanks. 回答1: when you set the density to 96, doesn't it look

HTML to PDF using iText : How can produce a checkbox

我的未来我决定 提交于 2019-12-17 21:59:40
问题 I have a simple HTML page, iText is able to produce a PDF from it. It's fine but the checkbox is ignored. What can I do about it ? import java.io.FileOutputStream; import java.io.StringReader; import com.itextpdf.text.Document; import com.itextpdf.text.PageSize; import com.itextpdf.text.html.simpleparser.HTMLWorker; import com.itextpdf.text.pdf.PdfWriter; public class HtmlToPDF { public static void main(String ... args ) { try { Document document = new Document(PageSize.LETTER); PdfWriter

Does FOP 2.1 support ViewerPreferences?

北慕城南 提交于 2019-12-17 20:52:40
问题 I'm using FOP 2.1 and am trying to set ViewerPreferences, e.g. DisplayDocTitle -> true. I'm trying (from this question <fo:declarations> <pdf:dictionary type="Catalog" xmlns:pdf="http://xmlgraphics.apache/org/fop/extensions/pdf"> <pdf:dictionary type="normal" key="ViewerPreferences"> <pdf:entry key="DisplayDocTitle" type="boolean">true</pdf:entry> </pdf:dictionary> </pdf:dictionary> <x:xmpmeta xmlns:x="adobe:ns:meta/"> ... but getting Jul 13, 2016 11:18:31 AM org.apache.fop.events