PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Sep 15, 2019 10:04 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Apr 23, 2019 9:26 am 
Offline

Joined: Thu Mar 07, 2019 1:24 am
Posts: 7
This is my code:
Code:
        private void Test(string src, string dst)
        {
            PdfDocument outputDocument = new PdfDocument();
            outputDocument.PageLayout = PdfPageLayout.SinglePage;
            XPdfForm form = XPdfForm.FromFile(src);
            for (form.PageIndex = 0; form.PageIndex < form.PageCount; form.PageIndex++)
            {
                PdfPage page = outputDocument.AddPage();
                page.Orientation = PageOrientation.Portrait;
                page.Width = form.Page.Width;
                page.Height = form.Page.Height;

                //DrawInfo(page, form.PageCount, form.PageNumber);

                using (var gfx = XGraphics.FromPdfPage(page))
                {
                    gfx.DrawImage(form, 0, 0);
                }
            }
            outputDocument.Save(dst);
        }


When the original PDF file is generated by Illustrator CS6 and there are hidden layers, pdfsharp draws the contents of hidden layers together.
Attachments can't upload PDF, so I uploaded screenshots.
-------------------------------------------------------------
Attachment:
image.png
image.png [ 8.8 KiB | Viewed 574 times ]

-------------------------------------------------------------
This is the PDF file´╝Ühttp://www.ul.to/4jqlpdjg


Last edited by lee on Fri Apr 26, 2019 6:39 am, edited 3 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 23, 2019 11:34 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2967
Location: Cologne, Germany
lee wrote:
Attachments can't upload PDF, so I uploaded screenshots.
Zipped PDFs can be uploaded. Screenshots don't have to be zipped.
http://forum.pdfsharp.net/viewtopic.php?f=2&t=832

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 26, 2019 6:40 am 
Offline

Joined: Thu Mar 07, 2019 1:24 am
Posts: 7
Thomas Hoevel wrote:
lee wrote:
Attachments can't upload PDF, so I uploaded screenshots.
Zipped PDFs can be uploaded. Screenshots don't have to be zipped.
http://forum.pdfsharp.net/viewtopic.php?f=2&t=832


I uploaded the PDF file


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group