pdf-generation

Add table into existing PDF using iTExtsharp

余生颓废 提交于 2019-12-12 08:00:54
问题 I have one PDF in that there is one table that table is dynamic and I want to add another table below to that table dynamically in my existing PDF. Is there any way to add the table in existing PDF at specific place that existing table(that is not at the end of document) is completed then I want to add my table. How can I add? Please suggest me some good way. As you can see below image. Thanks, 回答1: By far the easiest way to do this is to create a new PDF with the desired table at the desired

Interactive PDF Creation Alternatives to Acrobat?

给你一囗甜甜゛ 提交于 2019-12-12 07:59:40
问题 Are there any good alternatives to Adobe Acrobat for creating interactive PDFs? The terminology is a little fuzzy here - by interactive, I mean "able to be filled in", and not necessarily "scriptable". So this form would be for data collection, rather than report generation which seems to be the common scenario for pdf-related questions on SO. The trick is that they need to be fillable using Adobe Reader. For those who have not experienced the many frustrations of Acrobat - by default, Reader

Displaying SVG using XSLFO

一个人想着一个人 提交于 2019-12-12 07:59:07
问题 First question from me; I'm currently fixing a graphing service that uses XSLFO to convert our syntax to FO, and converting it to PDF in the end. Previously we've been using PNG graphs from the web in the PDF exports, but this creates really ugly results, so we've decided to go with SVG for PDF instead. However, the SVG doesn't seem to scale into the SVG canvas properly. Here is the syntax before run into XSLFO: <img src="someimage.svg"> And here is the XSLFO I'm using: <xsl:template match=

iText: PdfTable cell vertical alignment

最后都变了- 提交于 2019-12-12 07:31:13
问题 I'm trying to vertical align my headet cell text to be in the middle of the cell height. This is my code: PdfPCell c1 = new PdfPCell(cerate_phrase("" ,regular_bold )); c1.setHorizontalAlignment(Element.ALIGN_CENTER); c1.setVerticalAlignment(Element.ALIGN_MIDDLE); c1.setBackgroundColor(BaseColor.LIGHT_GRAY); table_.addCell(c1); but this does not work. setHorizontalAlignment is centered but not setVerticalAlignment . Am I doing something wrong? how can i vertically align it in the middle? Any

Executing Wkhtmltopdf via php throws error

折月煮酒 提交于 2019-12-12 06:51:46
问题 I use the class mentioned in the link How do I get WKHTMLTOPDF to execute via PHP? to convert html to pdf using wkhtmltopdf via PHP. require_once('WkHtmlToPdf.php'); $link = "https://www.google.co.in"; $pdf = new WkHtmlToPdf; $options = array( 'no-outline', // option without argument 'encoding' => 'UTF-8', // option with argument 'binPath' => '/usr/bin/wkhtmltopdf', // absolute actual file path ); $pdf->setOptions($options); $pdf->addPage($link); $pdf->send(); if (!$pdf->send('test.pdf')) {

How to move block of text in a PDF (using PDFBox)

孤人 提交于 2019-12-12 06:48:14
问题 I'm currently trying to generate PDF with PDFBox for some manual cover and I was wondering if it was possible to take a precise zone of text in my PDF and move it (to the left) depending on my manuel thickness (which will be determined by the number of pages my manual will have) I manage to create my PDF just fine, but I did not find a way to get only a block of text. Is it possible to do so with PDFBox? Note : I tried to search on the web and on other questions, but none of them were useful.

Current number page and document's number page

好久不见. 提交于 2019-12-12 06:46:47
问题 I'm trying to make a PDF document with iTextSharp. I don't know how to make a header with "currentPageNumber/documentsNumberOfPages" like that : Follow-up question For the moment, based on the original answers, I have this : public class StockComp : iTextSharp.text.pdf.PdfPageEventHelper { PdfTemplate templateNumPage; public string Header { get; set; } public override void OnOpenDocument(PdfWriter writer, Document document) { templateNumPage = writer.DirectContent.CreateTemplate(30, 250); }

How to set the cell width in itextsharp pdf creation in MVC4 Razor

蓝咒 提交于 2019-12-12 05:18:10
问题 Here im try to set a table cell width using itextsharp pdf creation but im facing trouble to make it since im using html table as string my code: public ActionResult FormSixteen(EmployeeFormSixteenModel objEmployeeFormSixteenModel) { string htmlTable = string.Empty; htmlTable = htmlTable + "<table><tr><td>S.no</td><td>Head Name</td>Amount<td></td></tr><tr><td>1</td><td>Gross Salary</td>xxxx<td></td></tr></table>"; Document document = new Document(); Response.ContentType = "application/pdf";

itextsharp - Cant Set Checkbox when PdfStamper in Append Mode

蹲街弑〆低调 提交于 2019-12-12 04:59:46
问题 I want to set some fields in a pdf but leave them open to be modified after they have been populated. My issue is that when I edit the pdf in append mode the checkboxes aren't getting set. The text fields work fine. string pdfTemplate = @"c:\test\fw4.pdf"; string newFile = @"c:\test\completed_fw4.pdf"; PdfReader pdfReader = new PdfReader(pdfTemplate); //PdfStamper pdfStamper = new PdfStamper(pdfReader, new System.IO.FileStream(newFile, System.IO.FileMode.Create), '\0', true); //doesn't set

iText PdfPTableEventForwarder not getting called when expected,

荒凉一梦 提交于 2019-12-12 04:47:07
问题 I will freely admit this is probably a duplicate of this, but there has been no answer there and I think I can add more info. Using iText 5.5.0 What I need: A zebra-striped table where there is not a top/bottom border between cells, but there is a bottom border to the table itself, or whenever the table is split over multiple pages. I have a small snip here from a test run using "lorem ipsum" and other arbitrary data. I partially cut off the footer that says "Page 1 of 2" but this table does