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 - Create Thumbnails
  FAQ FAQ  Forum Search   Register Register  Login Login

Create Thumbnails

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


Joined: 23 Oct 12
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote moakley Quote  Post ReplyReply Direct Link To This Post Topic: Create Thumbnails
    Posted: 30 Apr 13 at 2:06PM
I would like to create thumbnails for each page in a PDF.  These thumbnails need to be JPEG and I would expect them to be 2 - 8 kb is size.  See the following code for the things that I have tried.
 
int DocumentID = qp.LoadFromFile(fullFileName, "");
int iNumPages = qp.PageCount();
 
for (int i = 1; i <= iNumPages; i++)
{
    tmpTNFilename = Set thumbnail filename for this page
 
    qp.SelectPage(i);
    qp.NormalizePage(0);
 
    // Gave me just part of the lower left corner
    //sizeDouble = QPDFUtilities.GetImageSize(qp, thumbnailData);
    //qp.SetPageDimensions(sizeDouble.WidthDouble, sizeDouble.HeightDouble);
 
    // When opened in a viewer still gives me a full page and the file size is too large
    //qp.SetPageThumbnail();
 
    // When opened in a viewer still gives me a full page and the file size is too large
    scale = QPDFUtilities.GetImageScale(qp, thumbnailData);
    qp.SetScale(scale);
 
    qp.RenderPageToFile(96, i, 1, tmpTNFilename);
    thumbnailData.ThumbnailPaths.Add(tmpTNFilename);
}
 
qp.RemoveDocument(DocumentID);
 
So what I am seeing is the resulting file size is too large and the image when displayed in a viewer is still a full page.  Recommendations as to how I can use your available API to achieve the small file size.  Or should I render each page to a JPEG and then just use .Nets System.Drawing.Image to create the thumbnails?
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