Questions tagged [pdfstamper]

106 questions
0
votes
1 answer

iTextSharp PdfStamper puts barcode into an existing PDF according to the latest matrix

I have an existing PDF, that has this as the last matrix transformation: q 0.70711 0.70711 -0.70711 0.70711 141.73 274.96 cm 1 0 0 1 -141.73 -274.96 cm (which is 45 deg rotation and some transition) I use PdfStamper to insert an image into…
Nytmo
  • 71
  • 1
  • 12
0
votes
1 answer

itextsharp change from pdfwriter to pdfstamper to keep bookmarks in PDF

I am using iTextSharp to merge PDF documents together. My problem is I am trying to merge a large PDF which contains bookmarks. My current function is using PdfWriter to merge the documents. I know PdfStamper will work, but I cannot figure out how…
JohnnyM
  • 43
  • 1
  • 6
0
votes
1 answer

IText Stamper undeline specific text

I'm trying to do a report from a java swing application, I tried jasper reports and other tools, but I don't understand how to use them properly. I gave a try to itext, and I actually have something like this. public void createPDF(){ …
0
votes
0 answers

PDF Merging is not working properly by Java iText, Blank Forms are Merged into Final PDF

We have two PDFs, we have updated the form fields of these two PDFs using below code snipet PdfReader reader = new PdfReader("Test.pdf"); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("Test_1.pdf")); AcroFields form =…
0
votes
1 answer

How do I delete file created by FileOutputStream

I need to delete file right before exiting method: String holdInFdfFile = "myPDF1"; this.holdModifiedPDFDir = "C:\\pdfs\\Jobs\\"; String tempString = this.holdModifiedPDFDir + "\\" + holdInFdfFile; //Create Flattened PDF PdfReader…
Angelina
  • 2,175
  • 10
  • 42
  • 82
0
votes
2 answers

Copy Response.OutputStream to MemoryStream

How can I copy Response.Outputstream to MemoryStream? The error is: Stream does not support reading. And here is the code: string pdfTemplate = Server.MapPath(@"~\Pdf\132331.pdf"); Response.ContentType =…
Joseph
  • 653
  • 1
  • 12
  • 28
0
votes
1 answer

How to add an image to a pdf file in APPEND mode using PdfStamper?

I'm using the iTextSharp library version 5.5.6.0. This file contains customizable text fields and it's necessary to keep an interactive text form fields: https://yadi.sk/i/yoUvDI9EmtVhc . But I can't adding an image in PdfTemplate object. …
Kseniya Yudina
  • 137
  • 1
  • 11
0
votes
0 answers

Opening generated PDF in a browser using iText

I am using PDFStamper to generate a PDF file and then I want to pass it to be opened in a Browser. My code is in a JSP file. My code to actually generate a PDF to Desktop works but not to route to a browser. Below is my code. PdfReader reader = new…
SamiFekadu
  • 3
  • 1
  • 4
0
votes
1 answer

Trying to use PdfStamper and MemoryStream to add data to existing PDF then email it

Here is my chunk of code. It compiles fine and when I fire off the event I get the email, but I then get this error Email attachment ERROR on Adobe while opening(Acrobat could not open 'Att00002.pdf' because it is either not a supported file type or…
user1566783
  • 399
  • 1
  • 4
  • 18
0
votes
0 answers

iTextSharp/PdfStamper - some pages are shifted down and right

iTextSharp V5.0.2. This code works perfectly 95% of the time. But some landscape pdfs that clients load come in shifted down and to the left. I can see the amount in the Rectangle properties .Left and .Bottom, but I have no idea how to fix this. …
Steven B
  • 19
  • 4
0
votes
1 answer

how to email pdf created with itext

I just started using text for an app I am working on to further my android knowledge. However what I cannot figure out is how to get the pdf which was filled and then email it using the intent. I have been googling and researching everywhere but I…
Aria
  • 389
  • 3
  • 7
  • 25
0
votes
1 answer

Add named destinations to an existing PDF document with iText

I have a PDF previously created with FOP, and I need to add some named destinations to it so later another program can open and navigate the document with the Adobe PDF open parameters, namely the #namedest=destination_name parameter. I don't need…
gioefex
  • 1
  • 3
0
votes
0 answers

Why will iTextSharp PdfStamper not write the PDF to disk?

I don't know if I'm missing something (I'm no iTextSharp expert by any means), but everything I've read about iTextSharp's PdfStamper class says that upon calling of the Close() method, it should write whatever stream (so a FileStream should then…
KSwift87
  • 1,843
  • 5
  • 23
  • 40
0
votes
2 answers

itextsharp setting the stamper FormFlatttening=true results in no output

Using itextsharp v5.5.5.0 in VS2010 Setting the stamper FormFlattening = true no filed data is written to the output pdf. If set false the data is all present & correct but still editable (which I don't want) PdfReader pdfTemplate = new…
JayC
  • 49
  • 2
0
votes
1 answer

Add multiple attachments in a pdf using itext pdf stamper

I want to add multiple attachments to a pdf file. When I go into the loop it only attaches the last attachment. sample code PdfReader reader = new PdfReader(FILE); PdfStamper stamper = new PdfStamper(reader, new…
iamP
  • 307
  • 1
  • 3
  • 13