Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: Manually creating PDF to embed JPEG images
Conf: (P-PDF) Developers, Msg: 54648
From: paraman
Date: 5/29/2002 05:07 PM

I am having difficulty in manually creating a PDF file that embeds image from a JPEG file. My final goal is to programmatically convert a JPEG file to PDF and use the resultant file as a reference in a PDF form populated with data from a database.

After reading through PDF Spec provided with Adobe SDK, I have written a PDF which is attached herewith.
When I load this PDF in Acrobat, I get a message "The file is damaged but is being repaired" and a blank document is displayed. I am not sure what part of my PDF code is incorrect and do not know how I can debug the same?

Any suggestions will be appreciated.

Paraman

*********************** PDF FILE ********************
%PDF-1.2
1 0 obj
<<
/Type /Catalog
/Pages 3 0 R
/Outlines 2 0 R
>>
endobj
2 0 obj
<<
/Type /Outlines
/Count 0
>>
endobj
3 0 obj
<<
/Type /Pages
/Count 1
/Kids [4 0 R]
>>
endobj
4 0 obj
<<
/Type /Page
/Parent 3 0 R
/Resources 6 0 R >>
/MediaBox [0 0 612 792]
/Contents 5 0 R
>>
endobj
5 0 obj
<<
/Type /XObject
/Subtype /Image
/Width 278
/Height 199
/BitsPerComponent 8
/Filter /DCTDecode
/ColorSpace
/DeviceRGB
/Length 12641
>>
stream
..JPEG image file contents copied verbatim in a binary file editor
endstream
endobj
6 0 obj
/Procset [ /PDF /ImageC]
endobj
xref
0 7
0000000000 65535 f
0000000009 00000 n
0000000074 00000 n
0000000120 00000 n
0000000177 00000 n
0000000264 00000 n
0000013073 00000 n
trailer
<<
/Size 7
/Root 1 0 R
>>
startxref
13116
%%EOF
*********************** PDF FILE ********************


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.