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 - RenderPageToFile writes blank image for small PDFs
  FAQ FAQ  Forum Search   Register Register  Login Login

RenderPageToFile writes blank image for small PDFs

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


Joined: 03 Sep 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jplamb Quote  Post ReplyReply Direct Link To This Post Topic: RenderPageToFile writes blank image for small PDFs
    Posted: 03 Sep 09 at 10:39PM
I'm having a problem with some small PDF files when using the RenderPageToFile() with C#.  It seems like if a file is 50KB or less, I get a blank PNG image. 
 
I've tried multiple things: 
1. with the DA methods and without
2. with the 7.15 then the 7.14 library
3. using the method that writes to a byte[] array instead of directly to a file
 
- but I get the same results. 
 
I'd be happy to post examples of the files that are failing for me - and thanks for any help with this.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 04 Sep 09 at 6:05AM
Hi JP!

I've done it with smaller files and it works (but using jpg).
So i think the problem is another one.
Are there any security options on the pdf... no printing, no copying, no access, ...?
Perhaps you can upload the files anywhere on a free webspace hoster and post the link here.

Cheers, Ingo

Back to Top
jplamb View Drop Down
Beginner
Beginner


Joined: 03 Sep 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jplamb Quote  Post ReplyReply Direct Link To This Post Posted: 04 Sep 09 at 3:15PM
Thanks, I appreciate it.  Here is a link a zip file with four files in it:
 
I have included:
1) a file named [this-file-works.pdf] which renders correctly
2) a file named [this-file-does-not-work.pdf] which renders an empty/blank image
3) a file named [first-page-works-second-page-does-not-work.pdf] where only the second page is rendered blank
4) my [program.cs] C# file that I am using to process these pdf files
 
Thanks again for your help here,
Johnny
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 04 Sep 09 at 6:36PM
Hi!

I've got exactly the same problems.
I think it has to do with the dimensions:
"...
<</Type/XObject
/Subtype/Image
/Width 2550
/Height 3300
/BitsPerComponent 8
/ColorSpace/DeviceGray
/Length 9 0 R
/Filter/DCTDecode
..."

I've splitted the files ... Each page with these large image dimensions wasn't displayed.

I think the problem is the used pdf-engine:
PdfCompressor from CVISION Technologies

Cheers, Ingo

BTW: The Adobe Reader can show the pages but keep in mind: This product comes with a 100-mb-installation ;-)
Perhaps you should send your faulty pdf-files to Debenu directly.

Back to Top
jplamb View Drop Down
Beginner
Beginner


Joined: 03 Sep 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jplamb Quote  Post ReplyReply Direct Link To This Post Posted: 04 Sep 09 at 7:26PM
Ingo,
 
Thanks again for taking the time to look at these files, I really appreciate it. 
 
I'll look into the dimension issue and see if that is something I can change on my side.
 
I have also sent these files directly to Debenu - and hope to hear back from them about it. 
 
Thanks,
Johnny
Back to Top
Shotgun Tom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 Aug 09
Location: Phoenix, AZ
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shotgun Tom Quote  Post ReplyReply Direct Link To This Post Posted: 05 Sep 09 at 3:49AM
Hi JP:
 
I think you'll find that the producer (CVision) compressed these unviewable pages using JPEG2000 or JBIG2 image format.  Acrobat supports that format which is why you can view it in Reader.  FoxIt PDF reader offers a plug-in, otherwise you can't view it with their reader.  Many libraries just flat out don't support those image formats as of yet.
 
Tom
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 05 Sep 09 at 3:34PM
Hi!

I don't think so 'cause there are documents made by pdfCompressor and the first page (scanned image) we can see and (only) the second page not.
So i think there should be another reason for the described behavior?

Cheers, Ingo
 
Back to Top
Shotgun Tom View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 Aug 09
Location: Phoenix, AZ
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shotgun Tom Quote  Post ReplyReply Direct Link To This Post Posted: 05 Sep 09 at 4:02PM
Pretty sure that's the case, Ingo, although it is curious as to why one page is not J2000/JBIG and the other is. 
 
I tested it with the FoxIt J2000/JBIG plug-in. Sure enough, without the plug in the first page shows okay but not when you go to the second page you get the message that you need the plug in to display the second page.  If you put the plug-in back in then it displays the second page okay. 
 
I do believe different pages can have different compression techniques and that seems to be the case with that file.
 
Tom
 
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 05 Sep 09 at 4:30PM
Yes. The plugin test is a good argument.

Cheers, Ingo
Back to Top
jplamb View Drop Down
Beginner
Beginner


Joined: 03 Sep 09
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote jplamb Quote  Post ReplyReply Direct Link To This Post Posted: 08 Sep 09 at 5:07PM
Ingo and Shotgun Tom,
 
Thanks for the time you've spent helping me with this. 
 
I've now done a number of tests with the files I have and the root cause does seem to be related to the JBIG2 compression.  At least I now know the real reason this is happening for some files and not others.
 
Thanks again,
Johnny 
Back to Top
lcarrere View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 10 Jul 06
Location: France
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote lcarrere Quote  Post ReplyReply Direct Link To This Post Posted: 09 Sep 09 at 7:41AM
Hi,

It is a JBIG2 decoding issue. CVISION uses full features of jbig2 compression scheme including aggregate symbol coding which is a bit hard to decode. Therefore you will find some viewer such as old version of PDFSumatra which includes jbig2 decoder but can't decode some pages of your file.

Kind regards,

Loïc
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