Dear Frds, I have a Tamplet PDF File in which i have to replace Some Text like company Name,Date etc . & save it to the new name. I have been given a task to replace text within an existing PDF file. I need to find the precise x & y location of the text, and then I could draw. I’ve trying to replace text in PDF file and this is most simple way to replace text in PDF files. Before approaching this, I’ve tried to replace text.

Author: Zulkisida Nizuru
Country: Zambia
Language: English (Spanish)
Genre: Literature
Published (Last): 11 July 2014
Pages: 283
PDF File Size: 14.37 Mb
ePub File Size: 17.92 Mb
ISBN: 376-3-53951-399-9
Downloads: 37108
Price: Free* [*Free Regsitration Required]
Uploader: Sacage

To start viewing messages, select the forum that you want to visit from the selection below. I2orientationVector Vector.

Help us improve MSDN. Open ‘ step iitextsharp document. As this thread said, you can’t edit an existing PDF document, by saying: Understand that English isn’t everyone’s first language so be lenient of bad spelling and grammar.

Thursday, February 2, 6: I don’t have time right now to investigate further, but i’ll take a look later, having these coordinates the rest should be easy. Edit PDF File http: How to replace specific word in pdf using itextsharp C. Close ; if ms! See the comments in code. But i’m getting closer, i’ll post back just after I replacce this part about placing blank blocks over words or phrases.


Object, ByVal e As System. Last is not a member of IList Function Name: PdfStamper pReader, new System. Hi Jongware, I know there is this already a post like mine, but without any “Maybe”-Code and the answer “NO” with is not really a good answer.

How to edit a word in a PDF Document

GetInstance new Bitmap20BaseColor. About the Replace idea that comes after all this adding other text over this blank rectanglesthis has known limitations like: Your way of doing things are way more simpler than mine. Outputted pdf not filling with the content in iTextsharp and C. Chances are they have and don’t get it. Welcomes you to MSDN forums.

Pradeep Kumar 23 2.

c# – iTextSharp Replace Text in existing PDF without loosing formation – Stack Overflow

How to get the location of the text to be removed and how to pass correct parameters to SetAbsolutePosition? Last edited by jcis; Jul 30th, at Hi all, I have written a C console program to replace a specific word with new word in pdf. Top Rated Most Recent. All times are GMT You can optimize the code. You may have to register before you can post: By continuing to browse this site, you agree to this use.

This compensation may impact how and where products appear on this site including, for example, the order in which they appear.


The file is damaged and could not be repaired. Last edited by jcis; Jun 6th, at Empty End Try Return sb.

Add pharse ; document.

Search and Remove a Text from a PDF using iTextsharp

AppendHeader repoace Content-Disposition”attachment ; Response. I think we’ll redirect duplicates to this answer from now on! I’ ve been searching the Internet for 2 Weeks and found some interesting solutions for my Problem, but nothing seems to give me the answer.

It is bit scrambbeled. Can any one help an old dumb guy out please? My basic purpose to replace some words without changing the look and feel of the orginal pdf. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem.

AddTemplate page2, 0, 0 ; writer. Report back if you find an error or any weird behavior, or if there is amd else to add, for example adding different text where the words have been removed or whatever. Thanks for all your kind help. GetImportedPage reader, 1 ; erplace.