PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

PDF Sharp 1.20 - width and height confusion a PDF file
http://forum.pdfsharp.de/viewtopic.php?f=2&t=1503
Page 1 of 1

Author:  Gregory44 [ Wed Jan 12, 2011 2:59 pm ]
Post subject:  PDF Sharp 1.20 - width and height confusion a PDF file

Hi ladies & gentlemen. We have a case of numerous 1.4 PDF files with a portrait orientation that open fine in Acrobat Reader 9.
But when we open them and save them with the PDF Sharp library used in C#, the page dimensions are inverted, Width becomes Height and vice-versa ! Please note that the informations inside the PDF document (ie what we see on screen) is not rotated, it seems not to be any portrait/landscape confusion, just the page dimension are inverted, which loses a part of the useful information on screen.
Here's the code :

using (PdfDocument oDocument = PdfReader.Open(sPath, PdfDocumentOpenMode.Modify))
{
// nothing by now....
}
oDocument.Save(sPath);

Do you have any idea about this effect ?
Thanks by advance.
Gregory Joulin
IT Developer
ps : i've tried to use pdf sharp 1.31 assembly but it seems to freeze in memory, hence a request timeout; under visual studio 2008, it raises a big "Assertion fault" window, awaiting for user action (Cancel, Retry, ignore), which stops our Web service from running. Would it be a bug ?

Author:  Thomas Hoevel [ Wed Jan 12, 2011 3:44 pm ]
Post subject:  Re: PDF Sharp 1.20 - width and height confusion a PDF file

Gregory44 wrote:
under visual studio 2008, it raises a big "Assertion fault" window, awaiting for user action (Cancel, Retry, ignore), which stops our Web service from running. Would it be a bug?

Use a RELEASE build on the server (no assertions coming).

You should try version 1.31.
Maybe this thread can help:
viewtopic.php?p=3266#p3266

Author:  Gregory44 [ Wed Jan 12, 2011 4:13 pm ]
Post subject:  Re: PDF Sharp 1.20 - width and height confusion a PDF file

Thanks a lot for your quick answer.... it seems to give good results, i'll push forward the testings tomorrow ! Have a nice day
Gregory

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/