473,609 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PDF with CCITTFax encoded image streams - anyone have any experience?

I need to bang out a quick application to extract CCITT compressed TIF
images from a ton of PDFs. I've used PDFSharp in the past to work with PDFs
but ti doesn't have support for the PDF /CCITTFaxDecode filter.

I've googled for the obvious terms to try to find some code samples or
information about how to accomplish what I want but haven't found anything
at all.
If anyone here has experience in working with PDFs and extracting TIFFs
could you possible help with the following questions (some are very newbie
questions)

1) Does PDF store image data in a special PDF format or wrapped in any
other objects? In other words, I thought I would just be able to write the
image stream from the PDF to disk and it would result in a TIFF image (hah!)
but this isn't the case, I'm wondering if the image data is wrapped in an
additional format?

2) Anyone know of any (free) libraries that can decompress the CCITT codec?
I'm not sure if it's group 3 or 4, I imagine that is in the header of the
image data?

Any info greatly appreciated,
Steve
Jun 27 '08 #1
1 3146
I've found and read the relevant sections of the PDF specification.
It appears that the data is NOT wrapped in any additional structures, that
it's basically a stream of CCITT G3/G4 encoded data.

My challenge now is how to handle that encoded data. I'm wondering if I can
create an Image object from a MemoryStream (stream from PDF) then save with
the proper encoding?
if anyone has experience decoding the CCITT coded I would still really
appreciate any tips or help.

I will post back if I can get this working.
"sklett" <s@s.comwrote in message
news:em******** ******@TK2MSFTN GP06.phx.gbl...
>I need to bang out a quick application to extract CCITT compressed TIF
images from a ton of PDFs. I've used PDFSharp in the past to work with
PDFs but ti doesn't have support for the PDF /CCITTFaxDecode filter.

I've googled for the obvious terms to try to find some code samples or
information about how to accomplish what I want but haven't found anything
at all.
If anyone here has experience in working with PDFs and extracting TIFFs
could you possible help with the following questions (some are very newbie
questions)

1) Does PDF store image data in a special PDF format or wrapped in any
other objects? In other words, I thought I would just be able to write
the image stream from the PDF to disk and it would result in a TIFF image
(hah!) but this isn't the case, I'm wondering if the image data is wrapped
in an additional format?

2) Anyone know of any (free) libraries that can decompress the CCITT
codec? I'm not sure if it's group 3 or 4, I imagine that is in the header
of the image data?

Any info greatly appreciated,
Steve

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1523
by: Andrew James | last post by:
Gentlemen, I'm currently in the process of designing a language which will be used to specify sets of files on a WebDAV server, encoded in a URL. The aims of the language are to (in no particular order): * Be concise, aesthetic and easy to type * Be as similar as possible to existing query languages * Allow for (nested) boolean operations * Be cross-platform (so don't include any characters which can't be used in filenames on *NIX or...
0
448
by: BW | last post by:
Sorted my problem. Issue - retrieve Base64 encoded Zlib compressed XML stream. The compressed XML stream was compressed using Zlib on a Java platform. Resolution. (VB.NET) 1) Retrieve XML stream using webresponse class
5
4723
by: Jim | last post by:
I've heard that resizing images through PHP (either GD2 or ImageMagick) is a processor intensive exercise. I'm setting up a site where users will be uploading up to 10 images along with the details of their product. For each image uploaded (max 500Kb), I'll be resizing it to create a small, medium and large version after which I'll discard the original. My worry is that as the site becomes more popular, the processor time spent resizing...
2
1494
by: Denise Smith | last post by:
Hello, I'm wondering if anyone can help me out here? I want to be able to browse records in a database where one of the fields contains an image. I think I might have to extract the image to a byte array, write it to a temp file then refer to the temp file as the URL source for the Image control.
4
11737
by: Detlef Huettenbach | last post by:
I was trying to convert a Windows Forms prototype application to an ASP.NET solution that makes use of loading data streams into the Image Web/Windows control. For WinForms no problem. However in ASP.NET, the image control does not display tiffs,pngs,.. still it does display gif-streams. Memory stream writing into a gif- stream of the tiff and other streams likewise fails, although the streams seem to be filled correctly. On top of that,...
6
3989
by: hb | last post by:
Hi, Would you please give me some idea to convert/decode a Base 64 encoded GIF image string to a *.gif file in ASP.Net? Thank you hb
14
3621
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good readibility on browsers w/o css-support. For important notes, warnings etc I use the <pre> tag, which shows in a neat bordered box when viewed with css, and depending on its class a clarifying background-image is shown. I would like the...
0
1671
by: CDMAPoster | last post by:
In: http://groups.google.com/group/comp.databases.ms-access/msg/9c3dcf952fc3e3d3 I said: '----- In: http://groups.google.com/group/comp.databases.ms-access/msg/c368352c1...
11
2390
by: Diego Martins | last post by:
for me, these items are in the 'tricky zone' of C++ does anyone know good material with that? (dealing with subtle details, pitfalls, good practices...) anything like the Effective series from Meyers would be fine ;) thanks! Diego
0
8557
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6983
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5504
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4066
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2519
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1638
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.