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.


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

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
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.


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.