PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact billing@hostonnet.com.
Incorrect page size for an odd size page

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
dsmeltz



Joined: 24 Jan 2008
Posts: 13

PostPosted: Wed May 21, 2008 2:51 pm    Post subject: Incorrect page size for an odd size page Reply with quote

I'm trying to read a document that has a mix of page sizes. They are 8.5 x 11 and 7 x 9. The 7 x 9 pages report a Height and Width the same as those of the 8.5 x 11 pages. Is there some other property to check to get the actual page size or is this a problem with PDFSharp?
Back to top
View user's profile Send private message
AlbinoTux



Joined: 21 May 2008
Posts: 7

PostPosted: Wed May 21, 2008 4:03 pm    Post subject: Reply with quote

Check that there is not a CropBox set, if there is, this can be used to remove it:

Code:
page.CropBox = new PdfRectangle(new XRect(0, 0, page.Width, page.Height));
Back to top
View user's profile Send private message
dsmeltz



Joined: 24 Jan 2008
Posts: 13

PostPosted: Wed May 21, 2008 5:29 pm    Post subject: Reply with quote

Removing the CropBox also discards the pages' original size. It did make it work, but I would like to maintain the pages original size. There must be some way to get the physical page size if the page doesn't conform to one of the predefined PageSize enums.
Back to top
View user's profile Send private message
AlbinoTux



Joined: 21 May 2008
Posts: 7

PostPosted: Wed May 21, 2008 5:49 pm    Post subject: Reply with quote

Changing the crop box does not discard the original page size, the page size is 8.5 x 11, but it was "cropped" to 7 x 9.

Are you asking if there is a way to obtain the cropped page size?

Code:
page.CropBox.Size.ToString()
Back to top
View user's profile Send private message
dsmeltz



Joined: 24 Jan 2008
Posts: 13

PostPosted: Wed May 21, 2008 6:03 pm    Post subject: Reply with quote

Now I'm not sure what I'm asking. Smile

I'm appending 2 documents. The first has 8.5x11 pages, the second has 7x9 pages. I know I can get the cropped size (CropBox), but that doesn't have the 7x9 size in it. It appears to be a smaller rectangle than 7x9. The Page.Size property isn't the 7x9 size either, it has 8.5x11. So if there's a way to get the actual physical size of the page, that would be great.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com