Flatten PDF Form Fields with iTextSharp – Two Methods – ASP.NET

I will show two methods to flatten editable form fields in a PDF file. Method 1 is true form flattening and method 2 is just making the editable fields read only. Personally I was using method 1 for some time, however in some instances (more specifically when merging images into a PDF file and messing with the editable fields), this specific method would throw an error upon opening the PDF file in Adobe Reader stating that Acrobat may not display the page correctly, however I never noticed anything wrong with the PDF file, everything was being displayed correctly, but this “error” was kinda annoying, so I opted to change the code a bit to make all the fields Read Only instead of flattening the form.

Below is the code to perform both, flatten the form and make all the fields Read Only.

Read more

Share

How to Access ASP.NET Controls Inside An Outer And An Inner ASP Repeaters (Controls Inside Two ASP Repeaters)

Working with ASP.NET repeaters can be a little bit tricky if you do not fully understand them. In plain words, you have to find the outer repeater, then from here find the inner repeater, then from this inner repeater find the control(s). If I haven’t confused you enough, look at the examples, it will be clearer :)

Read more

Share
« Older Entries