On 9/21/2013 4:46 PM, techrek73 wrote:
> I am a informatica developer, I know SqL, Pl/sql etc but  very new to Java.
> Just know the basics(may be less) of Java.  I am assigned a this project.
> God only know knows why.

I know this sounds rude, but I say it with the best intentions: "ask 
your employer to hire another developer, or to grant you a month of time 
to study Java and iText." If you're a reasonable person, you'll agree 
that the assignment you received should be done by somebody who knows 
Java and iText. Only if you're an unreasonable, you'll ask us to do your 
work in your place.
> I have a simple code to merge the files

And that code is wrong. You're using PdfWriter/PdfImportedPage instead 
of PdfCopy!
Please read http://manning.com/lowagie2/samplechapter6.pdf and you'll 
understand that you're throwing away all interactivity when using 
PdfWriter. You also make assumptions about page size that will result in 
PDFs with pages that have the wrong size.

> If you see I am passing
> the file as input parameter. But I am not sure how to sort based on
> arguments.

What arguments? I've offered you some possible arguments in my previous 
answer:
- file name: that's as simple as sorting String objects, but OBVIOUSLY 
you need to do it BEFORE you create a list of InputStream objects.
- date: which date?
a. the date of the file? That's as easy a using the lastModified() 
method available in the standard Java File class.
b. the creation date in the PDF (not always available): this requires 
parsing the PDF with PdfReader.
c. the modification date in the PDF (not always available): this 
requires parsting the PDF with PdfReader.

I would never hire a person who doesn't know the answer to this question.
I would teach such a person, but if that person expects me to do that 
for free, I'd refuse.

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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 via email to