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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - How to draw mirrored page
  FAQ FAQ  Forum Search   Register Register  Login Login

How to draw mirrored page

 Post Reply Post Reply
Author
Message
Proset View Drop Down
Beginner
Beginner


Joined: 24 May 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Proset Quote  Post ReplyReply Direct Link To This Post Topic: How to draw mirrored page
    Posted: 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?


Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Proset View Drop Down
Beginner
Beginner


Joined: 24 May 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Proset Quote  Post ReplyReply Direct Link To This Post 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


Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Proset View Drop Down
Beginner
Beginner


Joined: 24 May 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Proset Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Proset View Drop Down
Beginner
Beginner


Joined: 24 May 12
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Proset Quote  Post ReplyReply Direct Link To This Post 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




Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store