PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 09, 2024 11:57 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: join 3 bank receipts
PostPosted: Wed Jun 22, 2011 4:44 pm 
Offline

Joined: Tue Nov 23, 2010 9:39 am
Posts: 8
Hi people,

I have been using PDFSharp.dll just for join pdfs generated by crystal reports.
I Use this code:

Code:
            using (MemoryStream strm = new MemoryStream(contenido))
            {
                // Open the document to import pages from it.
                using (PdfDocument inputDocument = PdfSharp.Pdf.IO.PdfReader.Open(strm, PdfSharp.Pdf.IO.PdfDocumentOpenMode.Import))
                {
                    // Iterate pages
                    int count = inputDocument.PageCount;
                    for (int idx = 0; idx < count; idx++)
                    {
                        // Get the page from the external document...
                        PdfPage page = inputDocument.Pages[idx];
                        // ...and add it to the output document.
                        outputDocument.AddPage(page);
                    }
                    strm.Close();
                }
            }


Now I have to join 3 bank receipts (bank drafts) in one page.
I the original pdfs, each receipts is in one page, wasting the 2/3 of space, and during the join I want to convert them in just one document of one page.

Is this possible with PDFSharp? Is this easy?


Top
 Profile  
Reply with quote  
 Post subject: Re: join 3 bank receipts
PostPosted: Thu Jun 23, 2011 10:02 am 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 343
karbunko wrote:
Is this possible with PDFSharp?

That depends on the receipts.

karbunko wrote:
Is this easy?

That depends on the receipts.

In Adobe Reader you can activate the Transparency Grid (via Edit -> Options -> Display or so).
If the wasted space is transparent, the task is pretty simple.
If the wasted space is not transparent, but at the bottom (or top) of the page, the task is still pretty simple.

Just look at the Two Pages on One sample, don't shrink the pages, draw them at different positions (if pages are not transparent, then draw them in the correct order).

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 36 guests


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