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!
![]() |
Problem with opening PDF file |
Post Reply
|
| Author | |
mikle74
Beginner
Joined: 17 Jun 09 Location: UK Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Topic: Problem with opening PDF filePosted: 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. |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
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
|
|
![]() |
|
mikle74
Beginner
Joined: 17 Jun 09 Location: UK Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Rowan
Moderator Group
Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
Quote Reply
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.zipCheers, - Rowan.
|
|
![]() |
|
mikle74
Beginner
Joined: 17 Jun 09 Location: UK Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
mikle74
Beginner
Joined: 17 Jun 09 Location: UK Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
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. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store