Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu Dec 04, 2014 7:21 am

Hi there,

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

mreischl
 
Posts: 2
Joined: Thu Dec 04, 2014 6:47 am

Thu Dec 04, 2014 7:46 am

Dear mreischl,

Thanks for your inquiry.

To help us resolve this issue, please upload the pdf documents you're using, code snippets to the forum, or you can send them to [email protected].
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Dec 04, 2014 7:54 am

I sent it out to you by mail.

mreischl
 
Posts: 2
Joined: Thu Dec 04, 2014 6:47 am

Thu Dec 04, 2014 8:54 am

Dear mreischl,

Thanks for sharing your documents and code snippets.

I have reproduced this issue and posted it to our dev team, we will inform you if there is any update.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.PDF

cron