PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 6:04 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Dec 03, 2016 12:54 pm 
Offline

Joined: Sat Dec 03, 2016 12:37 pm
Posts: 3
I am trying to concatenate several files into 1 pdf using pdfSharp.
All of the examples I can find do this by creating a new document then iterating and adding the pages from the source file.
However my source file does not have any pages (PageCount=0,PageLayout=SinglePage).
How can I solve this ?


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 03, 2016 3:30 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
vivphillips wrote:
However my source file does not have any pages (PageCount=0,PageLayout=SinglePage).
A singlePage file with 0 pages is a ZeroPage file.

Maybe you have to provide more information about your issue.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 04, 2016 9:39 am 
Offline

Joined: Sat Dec 03, 2016 12:37 pm
Posts: 3
Hi,

The problem is simply that this type of approach won't work since PageCount is 0:

http://www.pdfsharp.com/PDFsharp/index. ... &Itemid=60

All other examples I can find use the same strategy and I cannot find an alternative....

Thx


Top
 Profile  
Reply with quote  
PostPosted: Sun Dec 04, 2016 12:12 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
vivphillips wrote:
The problem is simply that this type of approach won't work since PageCount is 0
A PageCount of 0 indicates that your version of PDFsharp cannot handle the file you have.

Use the latest pre-release version of PDFsharp (1.50 beta 3b) and submit a PDF file for examination if the problem persists.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 05, 2016 12:12 pm 
Offline

Joined: Sat Dec 03, 2016 12:37 pm
Posts: 3
Duh!

Just realised that I was being exceptionally stupid - I was trying to create a PdfDocument when I should have been using a PdfReader !!!!

Sorry for wasting your time and thanks for the replies.
Regards,
Viv


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

All times are UTC


Who is online

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