Click here to Skip to main content
15,888,218 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to manipulate an already created javascripted PDF file. There are text field values that I need to set before printing. I cannot find an example so for.

I need to read the file, set the values then print. I am using C# and itextsharp to do this.

Thank you for your help in this.

What I have tried:

Searching and can't find a working example.
Posted
Updated 17-Sep-16 12:05pm

1 solution

Without more details the way you should do this is use placeholder labels in your PDF so that way you can search the text for those labels.

The labels you add to your PDF would be white as to not be seen when the PDF is printed.

If you cannot use labels then you need to use Itextsharps PDF stamper functionality to add image/text to your PDF and then use .SetAbsolutePosition on to position what it is you are trying to place into the correct spot on your document.

Here are some links to better guide you. There are tons of things on itextsharp and given the little amount about your issue that you described, what you are doing has been done by plenty others so a google search will return tons of results for what you need to do.

c# - ITextSharp insert text to an existing pdf - Stack Overflow[^]

Google[^]

iTextSharp — few C# examples. | Simple .Net Solutions[^]

If you would like to give your problem a shot and then come back with some code samples and clearly define your issue, I am sure you will get better assistance.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900