Print Page | Close Window

Convert PDF to Tiff Gives Blank Tiff Image

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=3913
Printed Date: 02 May 24 at 2:08PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Convert PDF to Tiff Gives Blank Tiff Image
Posted By: chadnewman
Subject: Convert PDF to Tiff Gives Blank Tiff Image
Date Posted: 05 May 21 at 8:11PM
Greetings,
I'm trying to convert the following file from PDF to Tiff and I'm getting a blank page.  I don't believe there is anything special with the PDF excepts its larger dimensions since it is a land plat.
URL to PDF
https://drive.google.com/file/d/12svFkI6ZjICKAWYBibMNl4bYpRw337FU/view?usp=sharing

I'm using the same code I have used for years and the nrendersuccess returns a value of 1 saying it was successful.

ninstanceid = dplcreatelibrary()
nresult = dplunlockkey(ninstanceid,"key hidden")
cimportname = "2420027_7471RT.pdf"
tcfilename = "c:\temp\test_%p.tif"
nfilehandle = dpldaopenfile(ninstanceid,cimportname,"")
npagecount = dpldagetpagecount(ninstanceid,nfilehandle)
nrendersuccess = dplrenderdocumenttofile(ninstanceid,200,1,npagecount,7,tcfilename)

Since it tells me the render was successful but the page is blank, I'm a bit stuck.

Thanks,

Chad Newman



Replies:
Posted By: Ingo
Date Posted: 05 May 21 at 10:04PM
Hi Chad,


the pdf is made by pdflib and i think it was a bad job.
If you look into the content (notepad is enough for this job) perhaps we can see where could be problems...
The whole pdf was already made/rendered by an image.
It's the result of a scan-process (scan to file).
Most of the content is the one large image stream.

My tools and routines always are using jpg-output but what shall i tell...?
No success. Not with an older library release and no success with the latest release. A blank white page is all i get.
Perhaps you've more success if you link another renderer like PDFium for example...
Things like TransformFile, CombineContentStream and NormalizePage doesn't help.

This flag is telling us...
<</Subtype/Image/Width 14388/Height 10771/
...that the original image has the dimensions 14388 x 10771.
This flag is telling us...
/MediaBox[0 0 1726.5635 1292.5226]>>
...that the large image was shrinked to 1726 x 1292.
This flag is telling us...
/BitsPerComponent 1/
...that it's a b/w-image.
But this flag tells...
[/Indexed/DeviceRGB
...that's a coloured pdf.





-------------
Cheers,
Ingo



Posted By: chadnewman
Date Posted: 06 May 21 at 4:35PM
Ingo,
Thanks for taking the time to review.
I'm glad you had issues and it wasn't just me.

Thanks again,
Chad


Posted By: Ingo
Date Posted: 06 May 21 at 9:38PM
Hi Chad,

do you have other scanned images as pdf or is this the only one?
Like i've said: Looking into the content i think it's only a scan-accident ;-)



-------------
Cheers,
Ingo



Posted By: Ingo
Date Posted: 06 May 21 at 10:03PM
Hi again... ;-)

i've tried the "Debenu PDF Tools" - QuickPDF is used inside.
Converting to jpeg works!
So it should be possible with QuickPDF - so it's not lost time to go on trying ;-)



-------------
Cheers,
Ingo




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