PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 01, 2024 4:23 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Oct 21, 2013 1:51 pm 
Offline

Joined: Mon Oct 21, 2013 1:39 pm
Posts: 3
Hi

I've been searching for the following option but I couldn't find anything so far:

I need to print an invoice which has a credit slip on the last page. If the document is small, the credit slip is printed onto the first page, if however the document is larger, it's printed on the last page.

Is there any way I could achieve this with PDFSharp?

Attached you find an example of what I need (This is just the last page in the document, all other pages are regular, white pages).

Thank you a lot

senic


Attachments:
95279.jpg
95279.jpg [ 70.29 KiB | Viewed 6182 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 2:08 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Hi!
senic wrote:
Is there any way I could achieve this with PDFSharp?
With PDFsharp you can set the size for each page individually. With MigraDoc you can set the page size for each section.
Your code must determine when such a small page is needed.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 2:34 pm 
Offline

Joined: Mon Oct 21, 2013 1:39 pm
Posts: 3
Hi

So I should set the first page size to the small layout, and if the document is 2 pages or longer I should create a blank one and then add the shorter page at the end?
Or did I misunderstand you? Is there some more elegant way of achieving this?

Thanks a lot

senic


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 2:44 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Are we talking about different physical page sizes? Or just "logical" page sizes?
Do you intend to use PDFsharp (low-level functions) or MigraDoc (high-level functions)?

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 2:57 pm 
Offline

Joined: Mon Oct 21, 2013 1:39 pm
Posts: 3
logical page sizes... They're the same size physically.

At the moment I was thinking about using PDFSharp, but should it be easier to accomplish my goal using MigraDoc I would consider switching.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 3:21 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
PDFsharp is a bit like MS Paint: you draw what you want and where you want it.
MigraDoc is a bit like Word: you specify page margins and enter paragraphs with your text, MigraDoc add line breaks and page breaks &c.

With MigraDoc you add tables, with PDFsharp you draw text and lines.

Adding the credit slip will be easier with PDFsharp, the rest will probably be easier with MigraDoc. You can mix them.
With what I know now, I think I would try a mix of MigraDoc and PDFsharp.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 35 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