Re: [iText-questions] Company stationery

2011-01-20 Thread 1T3XT BVBA
Op 20/01/2011 11:40, Patrick Dürsteler schreef: At the moment I do it like this: PRStream toChange = (PRStream)obj; String content = new String(PdfReader.getStreamBytes((PRStream)obj)); content = content.replace("1 1 1 rg\n0 792 m\n612 792 l\n612 0 l\n0 0 l\n0 792 l\nh\nf",""); toChange.setData

Re: [iText-questions] Company stationery

2011-01-20 Thread 1T3XT BVBA
Op 20/01/2011 11:28, Patrick Dürsteler schreef: > Hello > > Thanks for your help! My Question was more if there is an function in > iText to remove a such a pattern. I'm really new to iText and Java. > I'm more common with PostScript and PDF Syntax. Wow, that changes everything! If you're familiar

Re: [iText-questions] Company stationery

2011-01-20 Thread Patrick Dürsteler
At the moment I do it like this: PRStream toChange = (PRStream)obj; String content = new String(PdfReader.getStreamBytes((PRStream)obj)); content = content.replace("1 1 1 rg\n0 792 m\n612 792 l\n612 0 l\n0 0 l\n0 792 l\nh\nf",""); toChange.setData(content.getBytes()); On Thu, Jan 20, 2011 at 11:2

Re: [iText-questions] Company stationery

2011-01-20 Thread 1T3XT BVBA
Op 20/01/2011 9:17, Patrick Dürsteler schreef: > Hello > > I've chosen the first option, but I need some help: > > I've found the object, but it's the one with the text in it! Is there > also a option to remove the white are in this case? (See attached pdf, > obj 2) As far as I understand, you've

Re: [iText-questions] Company stationery

2011-01-19 Thread 1T3XT BVBA
Op 19/01/2011 17:23, Patrick Dürsteler schreef: Hello The Position is correct,I've verified with getOverContent and the content get to the right position! Thanks for checking this. Then the problem is indeed caused by a white rectangle. Especially documents form google docs make problems, so n

Re: [iText-questions] Company stationery

2011-01-19 Thread Patrick Dürsteler
Hello schreef The Position is correct,I've verified with getOverContent and the content get to the right position! Especially documents form google docs make problems, so no scanns! And I think this PDF's were made with iText!? Regards Patrick On Wed, Jan 19, 2011 at 4:36 PM, 1T3XT wrote: >

Re: [iText-questions] Company stationery

2011-01-19 Thread 1T3XT
Op 19/01/2011 16:13, patrickdu schreef: > > Hello > > I need to add company stationery to existing documents. > If tryed to do it by: > background = stamper.getUnderContent(i); > background.addTemplate(page, 0, 0); > But the most of my pdf seams to have a white background! Are you sure that's th

[iText-questions] Company stationery

2011-01-19 Thread patrickdu
Hello I need to add company stationery to existing documents. If tryed to do it by: PdfReader reader = new PdfReader(src); PdfReader s_reader = new PdfReader(stationery); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest)); PdfImportedPage page = stamper.getImportedPage(s_re