Re: Text removal

2015-03-24 Thread Maruan Sahyoun
, then I found that it's not an easy task. By the way, if you know how to do that, I'd so much appreciate it because I need that for replacing text with another text and for that the new text must be encoded the same way as the original! Back to the text removal, I am able to find the text

Re: Text removal

2015-03-24 Thread Maruan Sahyoun
as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore but I still see it when I open the file. My first assumption was that there must be some

Re: Text removal

2015-03-24 Thread Maruan Sahyoun
as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore but I still see it when I open the file. My first assumption was that there must

Re: Text removal

2015-03-24 Thread Maruan Sahyoun
the same way as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore but I still see it when I open the file. My first assumption was that there must

Re: Text removal

2015-03-24 Thread a7med shre3y
that it's not an easy task. By the way, if you know how to do that, I'd so much appreciate it because I need that for replacing text with another text and for that the new text must be encoded the same way as the original! Back to the text removal, I am able to find the text and also

Re: Text removal

2015-03-24 Thread a7med shre3y
in the currently used font, then I found that it's not an easy task. By the way, if you know how to do that, I'd so much appreciate it because I need that for replacing text with another text and for that the new text must be encoded the same way as the original! Back to the text

Re: Text removal

2015-03-24 Thread Maruan Sahyoun
and for that the new text must be encoded the same way as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore but I still see it when I open the file. My

Re: Text removal

2015-03-24 Thread a7med shre3y
text with another text and for that the new text must be encoded the same way as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore but I

Re: Text removal

2015-03-24 Thread a7med shre3y
way as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore but I still see it when I open the file. My first assumption was that there must be some

Re: Text removal

2015-03-24 Thread Andreas Lehmkühler
Hi, a7med shre3y a7med.shr...@gmail.com hat am 23. März 2015 um 15:03 geschrieben: Hi all, Currently I am facing a strange problem removing text from the some PDFs. My program is able to find the text and remove it by calling the COSString.reset() method. The problem is, when I open

Re: Text removal

2015-03-24 Thread Maruan Sahyoun
that for replacing text with another text and for that the new text must be encoded the same way as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore

Re: Text removal

2015-03-24 Thread a7med shre3y
way as the original! Back to the text removal, I am able to find the text and also remove it by calling reset, as I mentioned in my first email, when I print the output content I don't find the text anymore but I still see it when I open the file. My first assumption was that there must

Re: Text removal

2015-03-24 Thread a7med shre3y
Hi, Here's how I do it: 1. I use the following method to encode the text: String encode(String text, PDFont font) throws Exception { StringBuilder builder = new StringBuilder(); byte[] stringBytes = text.getBytes(); int codeLength = 1; for(int i = 0; i

Re: Text removal

2015-03-24 Thread Maruan Sahyoun
Hi, Am 24.03.2015 um 08:14 schrieb a7med shre3y a7med.shr...@gmail.com: Hi, Here's how I do it: 1. I use the following method to encode the text: String encode(String text, PDFont font) throws Exception { StringBuilder builder = new StringBuilder(); byte[] stringBytes

Re: Text removal

2015-03-23 Thread Maruan Sahyoun
Dear a7mad, removing text from a PDF is not an easy task as - text which might visually appear as a single item might consistent of individual parts within the PDF itself e.g. each character or groups of characters are place individually in different COSStrings - text might be drawn using

Text removal

2015-03-23 Thread a7med shre3y
Hi all, Currently I am facing a strange problem removing text from the some PDFs. My program is able to find the text and remove it by calling the COSString.reset() method. The problem is, when I open the output PDF file, I still see the text but not selectable (I mean when I try to highlight it

Re: Text removal

2015-03-23 Thread Maruan Sahyoun
Hi, your text is encoded so within the show text operator Tj the string is 7R %H $SSURYHG You wrote that you encode your string to find it - what do you get? BR Maruan Am 23.03.2015 um 22:01 schrieb a7med shre3y a7med.shr...@gmail.com: Hi Maruan, Here's a link from where you can

Re: Text removal

2015-03-23 Thread Maruan Sahyoun
Hi, you need to upload it to a public location as the mailing list doesn't support attachments. BR Maruan Am 23.03.2015 um 19:18 schrieb a7med shre3y a7med.shr...@gmail.com: Dear Maruan, Thank you very much for the information. Please find herewith attached the PDF to reproduce the

Re: Text removal

2015-03-23 Thread a7med shre3y
Hi Maruan, Here's a link from where you can download the PDF. https://drive.google.com/file/d/0B5Kxacm1mej-bm82NzNvUXFPSmMtUjc0ZFVjVVlrODZnRzdn/view?usp=sharing Kind Regards, a7mad On Mon, Mar 23, 2015 at 8:57 PM, Maruan Sahyoun sahy...@fileaffairs.de wrote: Hi, you need to upload it to a

Re: Text removal

2015-03-23 Thread a7med shre3y
Dear Maruan, Thank you very much for the information. Please find herewith attached the PDF to reproduce the problem. The text to remove is: To Be Approved. The text has a multi-byte encoding, so I call first to encode it in order to find it then remove it. Best Regards, a7mad On Mon, Mar 23,