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!
![]() |
I want to make Zoom in my viewer |
Post Reply
|
| Author | |
Giuseppe
Beginner
Joined: 19 Nov 10 Location: Italy Status: Offline Points: 10 |
Post Options
Thanks(0)
Quote Reply
Topic: I want to make Zoom in my viewerPosted: 13 Dec 10 at 10:04AM |
|
I make a PdfViewer.
I want make a zoom, with quickpdf method : "DARenderPageToDC" and i've to create two sidebar, (right and bottom) for sliding zoom windows on the work page. This is a code....but howto i release qp handler for new visualization? I use a workaround: i copy file. int Handle = qp.DAOpenFileReadOnly(nameapp, null); int PageCount = qp.DAGetPageCount(Handle); int PageRefNo = qp.DAFindPage(Handle, PageNo); int Zoom = zoom; double widhtDoc = qp.DAGetPageWidth(Handle, PageRefNo); double heightDoc = qp.DAGetPageHeight(Handle, PageRefNo); double pageWidth = widhtDoc / Zoom; double pageHeight = heightDoc / Zoom; int dpi = 100; Bitmap b = new Bitmap(Convert.ToInt32(pageWidth * dpi), Convert.ToInt32(pageHeight * dpi)); using (Graphics g = Graphics.FromImage(b)) { IntPtr dc = g.GetHdc(); qp.DARenderPageToDC(Handle, PageRefNo, dpi, (int)dc); g.ReleaseHdc(dc); GraphicsUnit gUnit = GraphicsUnit.Point; g.PageUnit = gUnit; } pcbx.Image = b; pcbx.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; //I can't release handling image and i make a copy file if (File.Exists(appfile)) File.Delete(appfile); File.Copy(appfile2, appfile); pcbx.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; Another question: SetTextExtractionWordGap not work!!!infact i try more times for test this functionality but "ExtractFilePageText" return partial words, however i found another workaround.... |
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 21 Jan 11 at 1:54PM |
|
You need to call the QP.DACloseFile(Handle); function to release the qp file.
Put this just after you have called DARenderPageToDC() somewhere. Also SetTextExtractionWordGap ? What is the problem with the ExtractFilePageText function. Do you have an example that you can upload. I have personally found that Option 3 works better than Option 4. |
|
![]() |
|
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