Questions tagged [pdfstamper]

106 questions
30
votes
1 answer

Getting PdfStamper to work with MemoryStreams (c#, itextsharp)

It came to me to rework old code which signs PDF files into new one, which signs MemoryStreams (byte arrays) that come and are sent by web services. Simple, right? Well, that was yesterday. Today I just can't get it to work. This is the old code,…
ADSMarko
  • 363
  • 1
  • 3
  • 8
11
votes
2 answers

Stamp on certain location of pdf using iText

I was trying to get the location using javascript and passed the coordinates to apply stamp on the stamp but it does not work properly. Below is the function I used to capture the coordinates of the mouse pointer. function divMove(e){ var div =…
6
votes
4 answers

Cannot access the file because it is being used by another process

My web method creates a pdf file in my %temp% folder and that works. I then want to add some custom fields (meta) to that file using the code below. The class PdfStamper generates an IOException, whether I use its .Close() method or the using block…
Wim Ombelets
  • 5,097
  • 3
  • 39
  • 55
3
votes
1 answer

PDF Form no longer editable after partly filled

I'm facing a problem with a Web API I have that receives a PDF document (PDF form) as a base64 encoded string, makes it into a file, fills in some of the fields (using iTextSharp PdfStamper class) and sends the result back as a base64 encoded…
Aidal
  • 799
  • 4
  • 8
  • 33
3
votes
1 answer

Java PDF Stamper writing below checkbox (text being covered by checkbox)

Im trying to write to an existing pdf using the java pdf stamper, but for some reason there is a certain checkbox in the pdf that the text appears to be drawn under. Code for Reading pdf: PdfReader reader = new PdfReader(Testing.getImagePath() +…
King
  • 59
  • 8
3
votes
1 answer

How to display "✔" when signature is valid with iTextSharp?

I need to do a signature in pdf like this when trusted certificate: When certificate is unknown origin then display a "?". I can do the signature, but not display "✔" or "?".
David
  • 923
  • 8
  • 19
3
votes
1 answer

How to convert pdfstamper to byte array

In my application, i need to read the existing pdf and add barcode to the existing PDF and pass it to output stream. here the existing pdf is like template. I am using iText jar for adding barcode. I want to know the possibilities of converting…
user1636102
  • 121
  • 4
  • 11
3
votes
0 answers

itext signing pdf

I'm currently developing an ERP application which uses iText for creating and signing PDF files. The idea is that the app can generate a PDF file with a bill, then use PdfStamper or any other class to sign it with a digital signature. Here's my…
user1892498
  • 31
  • 1
  • 2
3
votes
1 answer

How to insert a PdfPTable into an existing PDF template?

Update: After some discussion, we decided to go with TeX, specifically the windows compatible MiKTeX. We realised that even if we could get the dynamic lengthed table formatted by micromanaging the layout (which doesn't seem possible or is as…
Joe
  • 11,147
  • 7
  • 49
  • 60
2
votes
0 answers

How to implement print function support for chrome 77

I am using below code for print function. But it's not working in chrome 77. pdfStamper.addJavaScript("this.print({bUI: true,bSilent:false,bShrinkToFit: true});");
Arunprasath
  • 561
  • 2
  • 9
  • 25
2
votes
2 answers

GenerateAppearances = true; System.NullReferenceException

Got some legacy code using iTextSharp. All documents have GenerateAppearances set to true regardless. and now its triggering an exception. Took the basic code out and placed it into a Console app, same thing, Used a generic PDF…
2
votes
1 answer

Acrofields created with libre office are not code fillable unless I edit the pdf once

I am creating a form control in Libre office and am exporting the document to pdf. Trying to set the text of the control (a textbox) using itextsharp (in other words c# program) only empties the box. However, if I open the pdf using acrobat reader…
Anders Lindén
  • 6,839
  • 11
  • 56
  • 109
2
votes
1 answer

Errors adding images to pdf using itext 5.5.6 and FullCompression on pdfStamper

Last week we upgrade from itext 5.3.6 to 5.5.6 during our test we detect problems adding images on an existing pdf with full compression enabled. See the next code example: try { byte[] imageByte = IOUtils.toByteArray(new…
2
votes
1 answer

Add page number to pdf using pdfstamper(Itext)

I have this code protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); try{ …
Santino 'Sonny' Corleone
  • 1,735
  • 5
  • 25
  • 52
2
votes
1 answer

Converting Multiple Images into Multiple Pages PDF using itextsharp

I have requirement to convert images into PDF with a template. I'm able to create one page PDF using itextsharp. Assumption 1 image for 1 page PDF. The problem comes when I have multiple images. How I can create multiple pages PDF with predefined…
1
2 3 4 5 6 7 8