Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Page dimensions |
Post Reply |
Author | ||
RaphQuin
Beginner Joined: 17 Apr 17 Location: Toulouse Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 17 Apr 17 at 9:13PM |
|
Hi I work with DebenuPDFLibraryDLL1212, Visual Studio on Windows 10 Pro. I want to render pdf in a wpf image control. I tried with :
I convert the bitmap to BitmapImage. It's ok but 1 file has a problem (it came from Ricoh Aficio multifuntion). It's a A4 format, and with pdf readers, I see it as A4 (no landscape) 21x29.7cm document. But _dpl.DAGetPageWidth and _dpl.DAGetPageHeight give me wrong values: 29.7x21cm, not 21x29.7cm, so in my image, document is truncated in the bottom. I inserted a new function in the beginning of my GetDAImage, to get real dimensions of the page :
Now it's ok. So I tried without DA functions to avoid 2 openings :
And now I have got a new problem : my left and top of the document is drawn with an surprising origin in my image control: left = +200 top = -200 so I can see only the left bottom of my document. The file seems to have a rotation of 270 with 21x29.7cm dimensions. How can I fix this problem ? Regards Raph
|
||
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
|
Hi Raph,
you're right - there's a rotation setting. So... before rendering the page was re-rotated into the original layout landscape. The DIN A4 portrait is only the displayed state AFTER rotation. Using the function NormalizePage you're telling the pdf that the actual displayed layout isn't made by rotation but it's the original layout. After this function you won't have any problems while rendering: http://www.debenu.com/docs/pdf_library_reference/NormalizePage.php Cheers and welcome here, Ingo |
||
Cheers,
Ingo |
||
RaphQuin
Beginner Joined: 17 Apr 17 Location: Toulouse Status: Offline Points: 3 |
Post Options
Thanks(0)
|
|
Hi Ingo,
thank you for your help. I tried with
and I still had my problem. I finaly removed
and my problem disappeared. Thank you from France. Regards Raph.
Edited by RaphQuin - 17 Apr 17 at 9:58PM |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store