merge PDF Qestion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

merge PDF Qestion

techrek73
Hi ,
 
Can I watermark single pages in a merge operation with iText Java?. I have a requirement to open each image in memory and watermark them

and  save them after they are merged. is it doable?

 
 
Thanks,
 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: merge PDF Qestion

iText mailing list
On 9/9/2013 8:13 PM, tech rek wrote:
Hi ,
 
Can I watermark single pages in a merge operation with iText Java?

Did you read the documentation?
For instance: http://manning.com/lowagie2/samplechapter6.pdf

. I have a requirement to open each image in memory and watermark them

What do you mean by Image?

and  save them after they are merged. is it doable?


There's more than one way to do it, but the workflow you suggest is confusing.

One could watermark PDFs in memory with PdfStamper and then merge them with PdfSmartCopy.
That's similar to what is done in listing 6.24 where a stamper writes to a ByteArrayOutputStream of which the bytes are used to add a page to a PdfCopy object (listing 6.25 uses a PdfSmartCopy object to reduce the file size).

One could merge the PDFs with PdfCopy, and then add the watermark in a second pass.
That's similar to what is done in listing 6.14 where PdfStamper is used to add a header and a footer. A watermark isn't that different; as a matter of fact listing 6.15 is about adding a background to an existing document.

One could merge and stamp in one go as shown in listing 6.22.

Nobody but you can tell you what the best solution is in your case, because only you know the exact requirement. Please read the documentation carefully and you'll have all the arguments you need to make the best decision.

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: merge PDF Qestion

techrek73
This post was updated on .
In reply to this post by techrek73
Sorry,What I meant was, Apply different watermarks on each individual file as well as on the entire merged file (e.g. individual filename)  using iText Java.  
).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: merge PDF Qestion

iText mailing list
On 9/28/2013 7:24 AM, techrek73 wrote:
> Sorry,What I meant was, if I can watermark each page from PDF files with
> different watermark(page id) before I  merge them with iText Java?
Yes, of course.
Did you read http://manning.com/lowagie2/samplechapter6.pdf ?

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: merge PDF Qestion

calosteward
In reply to this post by techrek73
Please refer to this PDF merge guide, I also see page modify guide on it, watermark maybe supported as well.
Loading...