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 - I want to make Zoom in my viewer
  FAQ FAQ  Forum Search   Register Register  Login Login

I want to make Zoom in my viewer

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

Joined: 19 Nov 10
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Giuseppe Quote  Post ReplyReply Direct Link To This Post Topic: I want to make Zoom in my viewer
    Posted: 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....
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: 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.



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