pdf-generation

iTextSharp for PDF - how add file attachments?

拥有回忆 提交于 2019-11-29 10:55:05
I am using iTextSharp to create a PDF document in C#. I would like to attach another file to the PDF. I'm having just loads of trouble trying to do so. The examples here show some annotations, which apparently attachments are. This is what I've tried: writer.AddAnnotation(its.pdf.PdfAnnotation.CreateFileAttachment(writer, new iTextSharp.text.Rectangle(100,100,100,100), "File Attachment", its.pdf.PdfFileSpecification.FileExtern(writer, "C:\\test.xml"))); Well, what happens is it does add an annotation on the PDF (appears as a little comment voice balloon), which i don't want. test.xml is shown

Convert Doc file to PDF in VB.Net

…衆ロ難τιáo~ 提交于 2019-11-29 10:28:44
问题 I have an situation where i need to convert Doc file into PDF file. I am devepoing windows application in vb.net. and also i don't want to user third party dll if possible. so can anyone give me some more idea ? 回答1: You can use Office Interop for this. But it is better to use some managed library like Aspose using Microsoft.Office.Interop.Word; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; ... // Create a new Microsoft Word application

Can FullCalendar be printed to PDF?

谁说胖子不能爱 提交于 2019-11-29 10:25:58
问题 I have tried printing FullCalendar.js rendered calendars to PDF, however none of the generators available seem to work: Aspose PDF does not allow JavaScript, and straight up just doesn't support absolutely positioned elements PrinceXML has known issues where it throws TypeError exceptions when processing JavaScript that are not reproducible in IE, Chrome or Firefox. My minimal repro example for PrinceXML failure is the examples on Adam Shaw's FullCalendar site. Even when I save the generated

ITextSharp PdfCopy use examples

萝らか妹 提交于 2019-11-29 10:11:33
I am trying to use PdfSmartCopy from ItextSharp but I cannot find any relevant examples in c#. The ideea is that I have a pdf containing form fields and the fields add 700kb to the size of the pdf document. The original document without form fields was 100kb . Any other sugestions are welcome, especially o reduce the pdf size consistently. (I optimised the generated PDF with adobe acrobat, and it reduced it to 44kb . So there must be a glitch somewhere.) Is there any way to reduce the PDF size? Edit: FormFlatenning doesn't help. The pdf template file contains only text, lines and tables, no

how to read .doc, .docx, .xls files in android [duplicate]

[亡魂溺海] 提交于 2019-11-29 10:03:34
This question already has an answer here: Convert Word doc to HTML programmatically in Java 11 answers I am trying to show the PDF & .DOC files in android. I am able to show PDF files, but I have problem to show the .DOC, .DOCX, .PPT and .xls files . With the help of WORD-EXTRACTOR we can fetch the text of the doc file but the problem is it only gives text not images from .doc file. I searched to convert the doc file to PDF file but didn't succeed. Is it possible to convert the .doc files to PDF on device ? If we want to show the .doc or .docx document in the android devices so which library

Pandoc: Long tablerows in Markdown->PDF documents do not get linewrap

会有一股神秘感。 提交于 2019-11-29 10:00:37
I am using Pandoc to generate markdown->DOCX documents with a lot of tables but would like better control over the layout. I am now trying to output markdown->PDF as well, but have run into problems with table output. In DOCX, long rows with text are simply broken up into multiple lines. In the PDF document this does not happen; a row is always a single line that do not wrap at the right margin but continue outside of the page. Normal paragraph text flows according to the right margin, so the problem is probably not the page size. Example Markdown: This is text that flows according to the page

XSL-FO fop. Long text flows into adjacent cells/block, obscuring stuff there

被刻印的时光 ゝ 提交于 2019-11-29 09:30:19
Could anyone suggest me a way to make long words (like serial numbers) to be wrapped? I tried some commercial software and there is no such issue. Is it a fop bug or probably there is a solution available? I can't insert zero length space after each character of every word in document. This solution sounds insane for me. You can specify the wrap-option attribute in your fo:block like so: <fo:block wrap-option="wrap"> ... stuff </fo:block> Here's the XSL-FO specification for this attribute: XSL Definition: Value : no-wrap | wrap | inherit Initial : wrap Applies to : fo:block, fo:inline, fo:page

How to convert Android View to PDF

北城以北 提交于 2019-11-29 09:23:32
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 modest paid option. Or let me know is if what I am looking for is not possible. Marco Dufal Take a

HTML to PDF vs. Programmatically creating PDF via PHP

守給你的承諾、 提交于 2019-11-29 09:12:54
问题 I have a PHP application that needs to generate some PDF invoices and PDF timesheets with nice headers/footers. Some Stackoverflow users recommend using TCPDF to create the PDF documents. In my research, I discovered two approaches to generating PDFs: 1) Programmatically formatting the PDF like so: $tcpdf->SetFillColor(255, 0, 0); $tcpdf->SetTextColor(255); $tcpdf->SetDrawColor(128, 0, 0); $tcpdf->SetLineWidth(0.3); $tcpdf->SetFont('', 'B'); 2) Converting HTML to PDF How do I decide which I

Zend Framework Render Barcodes Into PDF Pages

北城余情 提交于 2019-11-29 08:28:22
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 as $id => $page) { if($equipmentCount > 10) { $barcodesOnThisPage = 10; $equipmentCount =