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!
![]() |
Render Only Portion of Page |
Post Reply
|
| Author | |
tmills108
Beginner
Joined: 16 May 13 Location: United States Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Topic: Render Only Portion of PagePosted: 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 |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 May 13 at 4:30PM |
|
Hi Tom!
As far as i know that's the way... Cheers and welcome here, Ingo
|
|
![]() |
|
tfrost
Senior Member
Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
Quote Reply
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!
|
|
![]() |
|
Rowan
Moderator Group
Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
mLipok
Senior Member
Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 453 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Rowan
Moderator Group
Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
mLipok
Senior Member
Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 453 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
MiodragM
Beginner
Joined: 15 Dec 15 Location: Serbia Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
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