Print Page | Close Window

Problem with opening PDF file

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=1125
Printed Date: 27 Jan 26 at 12:44AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Problem with opening PDF file
Posted By: mikle74
Subject: Problem with opening PDF file
Date Posted: 29 Jun 09 at 10:29AM
Hello,

I've discovered that QuickPDF fails to open one PDF file (though PDF viewers are working OK on it). Here is my code:

PDFLibraryClass qp = new PDFLibraryClass();
int res = qp.UnlockKey(qpKey); // Passed OK
res = qp.LoadFromFile(strPDFPath); // Passed OK
int pageCount = qp.PageCount(); // Passed OK, pageCount = 8
byte[] quickPDFImage = (byte[])qp.RenderPageToVariant(150, pageNumber, 5); // Fails

Exception:
System.Runtime.InteropServices.COMException (0x8000FFFF): Range check error
at QuickPDFAX0712.PDFLibraryClass.RenderPageToVariant(Int32 DPI, Int32 Page, Int32 Options)
at Blueberry_PDF_Form_Filler.PDFDocument.RenderPage(Int32 pageNumber, Boolean bShowFormControls, Boolean bPreview) in C:\\dev\\Blueberry PDF Form Filler\\Blueberry PDF Form Filler\\PDFDocument.cs:line 579
at Blueberry_PDF_Form_Filler.PDFDocument.RenderPage(Int32 pageNumber) in C:\\dev\\Blueberry PDF Form Filler\\Blueberry PDF Form Filler\\PDFDocument.cs:line 672
at Blueberry_PDF_Form_Filler.PDFDocument.ReadPDF() in C:\\dev\\Blueberry PDF Form Filler\\Blueberry PDF Form Filler\\PDFDocument.cs:line 249

Here is PDF file:

http://www.filex.bbconsult.co.uk/?id=EmCSddnUQ

Thanks in advance,
Mick.



Replies:
Posted By: Ingo
Date Posted: 29 Jun 09 at 1:58PM
Hi Mick!
 
With my app already built last autumn i don't have any problems with this file.
I've seen that you're using CSharp... Please change the parameter values from Int32 to UInt32 - then it'll work for you i think.
 
Additionally you should look here (the right side):
http://www.quickpdflibrary.com/support/index.php - http://www.quickpdflibrary.com/support/index.php
 
Cheers, Ingo
 


Posted By: mikle74
Date Posted: 29 Jun 09 at 4:33PM
Hi Ingo,

I think I can't change the type from Int32 to UInt32 - functions declarations are located in 'Interop.QuickPDFAX0712.dll' that is being generated automatically by Visual Studio when I add reference to 'QuickPDFAX0712.dll' ActiveX to my C# project.

As for link given by you - I've tried to search in knowledge base for 'c#' and 'uint' keywords but failed to find anything related to my problem.

What version of QuickPDF AciveX your program is using? Perhaps there is problem with newer version? My company bought version 7.12 and I'm not sure it's good idea to switch to older version.

Regards,
Mick.


Posted By: Ingo
Date Posted: 29 Jun 09 at 4:50PM
I don't use the activex-version.
This here is a user-user-forum.
If you need quick help from the authors you should post on the support-website i've posted in my message above.
Perhaps changing to the newest version 7.14 can help, too.

Cheers, Ingo


Posted By: Rowan
Date Posted: 30 Jun 09 at 2:37AM
Hi Mick,

I've put together a small C# project which uses the RenderPageToVariant function and version 7.14 of the library to test the file you're having problems with. In this project the library doesn't appear to have any problems rendering your PDF -- I also tested version 7.12 and got the same successful result.

Could you try this project on your end using the latest version to confirm the results?

Latest version of the library can be downloaded from here:

http://www.quickpdflibrary.com/products/quickpdf/updates.php - http://www.quickpdflibrary.com/products/quickpdf/updates.php

Downoad RenderPageToVariant project
uploads/1000/RenderPageToVariant.zip - uploads/1000/RenderPageToVariant.zip

Cheers,
- Rowan.


Posted By: mikle74
Date Posted: 30 Jun 09 at 2:44PM
Hi Ingo,

Thanks for the advise, I've switched to 7.14 and the problem disappeared! :)

Regards,
Mick.


Posted By: mikle74
Date Posted: 30 Jun 09 at 2:46PM
Hi Rowan,

Thanks a lot for the sample code, I made sure my code works in same manner as your, and installed version 7.14 - the problem disappeared!

Regards,
Mick.



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