I need to merge 2 documents together but document 1 should be superimposed over document 2 (as document 2 is just a background). Is this possible?
2 PDF's to 1 PDF
Re: 2 PDF's to 1 PDF
Support · Jun 9, 2010This seems identical to another post we recieved recently so I will use the same answer: Yes, you could achieve something like this using our DynamicPDF Merger product. You will have to import the contents from the PDF document which you want to put as background using ImportedPageArea class. Then add this content to a TransparencyGroup and set some transparency to the group. Then add this group to the Template. You will have to merge the other PDF document using the MergeDocument class and then stamp the template to the MergeDocument object. You may need to tweak it but this gives you the general idea:
PdfDocument pdf1 = new PdfDocument(@"Path for the PDF document which has image");
PdfDocument pdf2 = new PdfDocument(@"Path for the PDF document which has FormFields");
ImportedPageArea area1 = new ImportedPageArea(pdf1.Pages[0], 0, 0);
TransparencyGroup grp=new TransparencyGroup(0.35F);
grp.Add(area1);
Template template = new Template();
template.Elements.Add(grp);
MergeDocument document = new MergeDocument(pdf2);
document.StampTemplate = template;
document.Draw(@"Path to save the PDF document");
Thanks,
ceTe Software Support Team