{
COSDocument doc1 = null;
COSDocument doc2 = null;
InputStream is1 = null;
InputStream is2 = null;
PDFParser parser1 = null;
PDFParser parser2 = null;
OutputStream os = null;
COSWriter writer = null;
try
{
is1 = new FileInputStream(in1);
parser1 = new PDFParser(is1);
parser1.parse();
doc1 = parser1.getDocument();
is2 = new FileInputStream(in2);
parser2 = new PDFParser(is2);
parser2.parse();
doc2 = parser2.getDocument();
setField(doc1, "doc1", new COSString(name1), new COSString(value1));
setField(doc2, "doc2", new COSString(name2), new COSString(value2));
appendDocument(doc1, doc2);