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!
CapturePage and DrawCapturedPage creating upside d |
Post Reply |
Author | |
champagnecharly
Beginner Joined: 12 Apr 08 Status: Offline Points: 13 |
Post Options
Thanks(0)
Posted: 16 Aug 11 at 1:15AM |
Hello, Where am i going wrong? Is it lack of sleep that stops me seeing the wood for the trees? Basically using capture I get an upside down mirror image of the original page. Dim CapturedPageID, OptionalContentGroupID, pagecount pagecount= qp.pagecount OptionalContentGroupID = qp.NewOptionalContentGroup("NonPrintable") Call qp.SetOptionalContentGroupPrintable(OptionalContentGroupID, 0) CapturedPageID = qp.CapturePage(pagecount) Call qp.SetCapturedPageOptional(CapturedPageID, OptionalContentGroupID) qp.SelectPage (pagecount - 2) can anybody see what silly mistake I am making? Thanks |
|
champagnecharly
Beginner Joined: 12 Apr 08 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Seems like maybe the origin is where the problem lies.
If I try and set origin to 1 and then save file. I then check using getOrigin... it returns 0. IS this normal? Regards
|
|
champagnecharly
Beginner Joined: 12 Apr 08 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Ok.. so maybe some important info. The pdf is originally created using XSL> FOP. If I recreate each page. i.e loop through each page and append each page to a new page. then using exactly the same formulae. as previously and overlay the relevant pages.. then there are no mirror images.
This would be an ok work around however the bookmark tree references become corrupt/ invalid. and my links no longer work. Any sugestions? |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
This problem has been fixed by calling QP.NormalizePage().
Many libraries, when they create the PDF content stream by adding drawing commands, they don't restore the graphics state back to default when they have finished. For example, if the last object on the page is 90 degree rotated text and their program rotates the coordinate system to draw the text at 90 degrees but doesn't restore the graphics state back to 0 degrees then the next PDF library that wants to add text to the page such as QPL and the DrawText() command will draw the text at 90 degrees without realising. Page scaling and the origin can also be affected in the same way. NormalizePage attempts to fix most of these problems by wrapping the content streams with savestate/restore commands.
|
|
champagnecharly
Beginner Joined: 12 Apr 08 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Thanks Andrew. It certainly fixed the issue. Thank you also for the explanation.
Regards |
|
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