Generated PDF displaying empty pages

I'm writing a PDF generator for an embedded system and i can't seem to get it to render. Here's what i have so far http://pastebin.com/20DQiGfb. Neither ghostscript, nor RUPS is showing any syntax errors, and every PDF viewer i checked this on displays blank pages. I'v verified the syntax, offsets, structure to be fine. I just don't get it. Maybe someone can suggest another tool i can try ? Maybe one that would let me inspect the visual elements ?

EDIT: adding the full file for download https://drive.google.com/file/d/0B8ljtiq-2gIJcTBFR2tjRGxVOFk/view?usp=sharing

EDIT2: Acrobat/Preflight also found no errors

Upvotes: 1

Views: 101

Answers (1)

mkl
mkl

Reputation: 95918

These are your Page dictionaries:

7 0 obj
<<  /Type      /Page         
    /Parent    9 0 R        
    /Resources 2 0 R        
    /Content   3 0 R        
    /MediaBox  [0 0 612 792] 
>>
endobj

8 0 obj
<<  /Type      /Page         
    /Parent    9 0 R        
    /Resources 2 0 R        
    /Content   5 0 R        
    /MediaBox  [0 0 612 792] 
>>
endobj 

But the correct key for the content stream is Contents!

Contents stream or array (Optional) A content stream (see 7.8.2, "Content Streams") that shall describe the contents of this page. If this entry is absent, the page shall be empty.

(Table 30 – Entries in a page object - ISO 32000-1)

After adding the missing s characters I see:

page 1

and

page 2

Upvotes: 2

Related Questions