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!
![]() |
Extracting images (png/tiff issues) |
Post Reply ![]() |
Author | ||
samb ![]() Beginner ![]() Joined: 09 Feb 11 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() Posted: 09 Feb 11 at 1:11AM |
|
Environment:
C# .Net 2.0 Quick PDF 7.23 DLL I am attempting to create and read image only PDF files. Creating the files seems to be working fine using all image formats that I have tried (PNG, JPEG, & TIFF). I can open the files in Acrobat reader and everything looks fine, but reading them through code is giving me some trouble. Code for writing the PDF files (formatting and non-relevant code removed):
Current code for extracting the images
If the PDF file contains only JPEG images, I receive the images as expected. If the PDF file contains only TIFF (CCIT Group 4) images, I receive a ton of ~35 pixel high slices of the images. If the PDF file contains only PNG or TIFF (LZW) images, I receive the images as 24 bit bitmaps (even if the original PNG was monochrome) I see that PNG is not defined in ImageType, which would explain why it doesn't work. So, my question:
|
||
![]() |
||
samb ![]() Beginner ![]() Joined: 09 Feb 11 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
|
I've made some progress.............
Somehow I missed the image extraction code sample: http://www.quickpdf.org/forum/extract-text-and-images-and-insert-into-new-pdf_topic1308.html From that example, it looks like I may be better off importing and exporting as bitmap and letting quickpdf deal with the compression. Is this the preferred method? Some new issues:
Edited by samb - 14 Feb 11 at 9:54PM |
||
![]() |
||
vinod_pathak ![]() Beginner ![]() ![]() Joined: 14 May 11 Location: india Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
|
Hi!
how to exrtact image from the layer of pdf file using QP in C# |
||
![]() |
||
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
|
Hi Vinod!
I've already told that it's not possible to extract images layer-relevant. You can extract the images but on which layer they are isn't relevant for extraction. Cheers, Ingo |
||
![]() |
||
samb ![]() Beginner ![]() Joined: 09 Feb 11 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
|
As to the original issue:
I've learned more about pdf and image formats, and have settled on jpeg for color. I found methods to perform lossless rotation on jpeg images, so that format has become acceptable. I have still not been able to get striped CCITg4 (which .net defaults to in windows 7) images to work correctly, but it looks like the quick pdf team has been doing some serious changes on CCIT handling since 7.23 so I'm hoping to get some free time to try out the latest version. In the mean time, using black and white bitmaps with quickpdf compression has been working fine. I have been using some DA methods to get the image's drawn size to calculate the DPI, but again it looks like some of the new features may be able to do this with an in memory file. |
||
![]() |
||
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
|
We have been changing the importing options for TIFF images. If a TIFF image is compressed with Group 3 Fax / Group 4 Fax or LZW then we import the data into the PDF as is without having to decompress and recompress it. This means that G4 tiffs are stored efficiently using G4 compression in the PDF.
Image extract is an area we need to do some more work on as we currently only export 24 bit images regardless of the pixel depth. The 3 pixel high image strips come from PDF's that are imported from striped TIFF images. QPL supports this type of format but so do other PDF libraries. It would take a little bit of work to put all the strips back together again. It might be something we will do in a future version. Andrew.
|
||
![]() |
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