I am looking for a library that meet my requirements.
I habe several PDF files. Each PDF has the same size, one page, CYMK color schem and contains a single part of a whole label.
Now I want to overlay 2 until XY of this PDFs to get the rights label as output.
Can I do this with you library? I tried you sample for overlay, but it does not work.
- Code: Select all
//load two documents
PdfDocument doc1 = new PdfDocument();
doc1.LoadFromFile(secondPdf);
PdfDocument doc2 = new PdfDocument();
doc2.LoadFromFile(firstPdf);
//Create page template
PdfTemplate template = doc1.Pages[0].CreateTemplate();
//set PDF overlay effect and set transparency mode
foreach (PdfPageBase page in doc2.Pages)
{
//set transparency
page.Canvas.SetTransparency(0.25f, 0.25f, PdfBlendMode.Overlay);
//add the first page of doc1 to every page of doc2
page.Canvas.DrawTemplate(template, new PointF(0, 0));
}
//Save pdf file.
doc2.SaveToFile("c:\\Overlay.pdf");
doc1.Close();
doc2.Close();
//Launching the Pdf file.
System.Diagnostics.Process.Start("c:\\Overlay.pdf");
Best Regards
Michel