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!
![]() |
How to draw mirrored page |
Post Reply
|
| Author | |
Proset
Beginner
Joined: 24 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Topic: How to draw mirrored pagePosted: 05 Apr 13 at 3:28PM |
|
Is it possible to draw mirrored page with DrawCapturedPage or some other method?
I'm can draw images by use imagematrix function, but could it possible with captured page? |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 Apr 13 at 7:54PM |
|
Hi!
QuickPDF offers the rotate functionality... If this won't feed your needs only personal maths/calculations will bring you success i fear ;-) Cheers, Ingo |
|
![]() |
|
Proset
Beginner
Joined: 24 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 Apr 13 at 7:14AM |
|
Hi Ingo
So I'm made one sample pdf & then mirror it by Quite plugin. Then I'm examine content with RUPS utility So in mirrored file I'm found an additional stream placed before main stream with data It contents: -1 0 0 1 144.57 0 cm This is a transfomation matrix. So could you give me some guidelines how I'm can place this matrix in my PDF content with QP library functions? Best regards Serge |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 Apr 13 at 4:57PM |
|
Hi!
Like i've told: You have to do it by your own and with your own calculations. QP won't support it directly. Have a look in the developer guide and the reference to see what's possible and what not. Cheers, Ingo |
|
![]() |
|
Proset
Beginner
Joined: 24 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 Apr 13 at 6:12AM |
|
So I'm trying this sequence:
int Result=qp.NewContentStream(); qp.SetContentStreamFromVariant(BytesMessage1); qp.MoveContentStream(Result, 1); Where "ByteMessage1" is a converted string with transformation matrix(I'm mentioned above) For my simple file it works quite well. |
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 Apr 13 at 8:33AM |
|
Here is some interesting code you might enjoy
QP.LoadFromFile("testdebenu (1).pdf", ""); QP.DeletePages(2, 99999); // Make sure we only have 1 page QP.SetOrigin(1); double pw = QP.PageWidth() / 2; double ph = QP.PageHeight() / 2; QP.NewPage(); int capId = QP.CapturePage(1); QP.SelectPage(1); QP.DrawCapturedPage(capId, pw, ph, pw, ph); QP.DrawCapturedPage(capId, pw, ph, -pw, ph); QP.DrawCapturedPage(capId, pw, ph, pw, -ph); QP.DrawCapturedPage(capId, pw, ph, -pw, -ph); QP.SaveToFile("out.pdf"); If you need to use a negative width or height then you need to adjust you x, y position accordingly. Andrew.
|
|
![]() |
|
Proset
Beginner
Joined: 24 May 12 Status: Offline Points: 7 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 Apr 13 at 2:07PM |
|
Thank you Andrew
Your's example much more simple & clear. So negative width is a horizontal mirror & negative height is vertical mirror. Adjusting x,y I'm can draw copies in required places. Serge |
|
![]() |
|
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