Print Page | Close Window

Access Denied Exception

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2736
Printed Date: 22 Nov 24 at 7:49PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Access Denied Exception
Posted By: yoyodyn
Subject: Access Denied Exception
Date Posted: 20 Sep 13 at 1:19AM
I am trying to batch convert PDFs to JPG files.  For the most part it is working, however, so far there is one fail that throws an exception.

Unhandled exception at 0x01475f7d in Hello World - DLL Edition.exe: 0xC0000005: Access violation reading location 0x00000000.

Yes, I modified the example hello world application to try and process the one file I have a problem with.

        QP.LoadFromFile(strFileName, password);
        int iNumPages = QP.PageCount();
        outFileName.Format(L"C:/Flatfiles/ConvertedJPG/Test-%%p-%02d.jpg", iNumPages);
        QP.RenderDocumentToFile(50, 1, 1, 0, outFileName);

Current settings are a really low resolution and to a bitmap file format, but I have tried several.
The PDF version says it is 1.4.  And if it is relevant, this is the only PDF I have found that give me a blue bar on Acrobat reader saying that it is in PDF/A format and is preventing changes.

I have tried a try..catch block around this code segment and it's not getting caught.

Another product that uses ghostscript was able to process this file, but we are trying to avoid that.

Can you help me to either resolve the error or query something about the file to allow me to skip it and report it as an error.

Thank you



Replies:
Posted By: AndrewC
Date Posted: 20 Sep 13 at 6:49AM
Can you please send us the file. There are many types of malformed PDF files that can cause errors in any PDF library including Acrobat.

Please send the file via email to support@debenu.com

Andrew


Posted By: yoyodyn
Date Posted: 20 Sep 13 at 3:04PM
Sorry, but the PDF is not ours and I am not sure I can distribute it.  I know that makes it near impossible to diagnose.

But I found that if I call ExtractPages(1, iNumPages) before calling the RenderDocumentToFile that it works without any error.  

Can you tell me if there is a downside to that method?




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk