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 - Problem with opening PDF file
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem with opening PDF file

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


Joined: 17 Jun 09
Location: UK
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikle74 Quote  Post ReplyReply Direct Link To This Post Topic: Problem with opening PDF file
    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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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):
 
Cheers, Ingo
 
Back to Top
mikle74 View Drop Down
Beginner
Beginner


Joined: 17 Jun 09
Location: UK
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikle74 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post 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:


Downoad RenderPageToVariant project
uploads/1000/RenderPageToVariant.zip

Cheers,
- Rowan.
Back to Top
mikle74 View Drop Down
Beginner
Beginner


Joined: 17 Jun 09
Location: UK
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikle74 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
mikle74 View Drop Down
Beginner
Beginner


Joined: 17 Jun 09
Location: UK
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mikle74 Quote  Post ReplyReply Direct Link To This Post 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.
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