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 - Render Only Portion of Page
  FAQ FAQ  Forum Search   Register Register  Login Login

Render Only Portion of Page

 Post Reply Post Reply
Author
Message
tmills108 View Drop Down
Beginner
Beginner
Avatar

Joined: 16 May 13
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote tmills108 Quote  Post ReplyReply Direct Link To This Post Topic: Render Only Portion of Page
    Posted: 16 May 13 at 2:40PM
Hi,

Is it possible to render only a portion of a page to a DC, or do you always have to render the entire page to a temporary bitmap and then extract the portion you need afterward?

Thanks,
Tom
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: 16 May 13 at 4:30PM
Hi Tom!
 
As far as i know that's the way...
 
Cheers and welcome here,
Ingo
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 13 at 11:30AM
Yes, you should be able to simply set the media box with SetPageBox.  I have only done this myself with SaveToFile, to make eight separate A4 PDFs from a huge original drawing, but I assume it also works with rendering.  Worth a quick experiment, anyway!
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 15 at 3:41AM
Hi Guys,

We have added a new function in version 12 called SetRenderArea which will let you render only a portion of the page. The difference between using the CropBox to do this and the SetRenderArea page is that while specifying a CropBox smaller than the actual page size will output the cropped page, the entire page behind the scenes is processed. The SetRenderArea will be faster because it will only process the area of the page that is specified.


Cheers,
- Rowan.


Edited by Rowan - 16 Nov 15 at 3:42AM
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 453
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 15 at 8:23AM
Hi Rowan.
Is it mean I can now really crop page, as I was asking here:
http://www.quickpdf.org/forum/setpagebox-capturepageex-drawcapturedpage_topic3048.html

Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 24 Nov 15 at 3:35AM
Hi mLipok,

SetRenderArea is only going to work when you are rendering the page to an image format using a function such as RenderPageToFile. So it can crop a page when you are rendering to an image, but it won't let you crop an existing PDF and then save it as an update to the PDF. It's only for rendering, not for modifying existing documents.

Cheers,
- Rowan.
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 453
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 24 Nov 15 at 6:19AM
Thanks for clarification.
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
MiodragM View Drop Down
Beginner
Beginner
Avatar

Joined: 15 Dec 15
Location: Serbia
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote MiodragM Quote  Post ReplyReply Direct Link To This Post Posted: 25 Dec 15 at 9:32AM
Hi Guys,

I'm currently evaluating quick pdf dll and met some potetionally problem.
So, i need to determine empty area (box) on each page at the exact position. For that purpose I use RenderPageToString method and then examin area pixels. The problem is that method RenderPageToString is too slow - for example, the page (A4) has some content on it and method execution for the area 100x30 going to 500 ms.

The pseudo code:
...
sWatch = new System.Diagnostics.Stopwatch();
QP.SetRenderArea(BoxLeftH, BoxTopH, BoxWidth, BoxHeight); //BoxWidth is about 190, BoxHeight is about 30
sWatch.Start();
byte[] K = QP.RenderPageToString(72, selectedPage, 0);
sWatch.Stop();
MS = new MemoryStream(K,false);
...
- sWatch.ElapsedMilliseconds is in range 40-500ms!, depending on the page.

Do I something wrong? Do you have some suggestion?

Thanks,
Miodrag
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