3

I am getting the following error when I run pdflatex:

Syntax Error: Expected the optional content group list, but wasn't able to find it, or
it isn't an Array

It SEEMS to build correctly, but I am just trying to figure out why this is happening. The following code triggers the problem.

\begin{figure}[hbtp] %[!t]
\centering
\includegraphics[scale=0.55]{figures/illustration.pdf} 
\end{figure}

Any ideas? Thanks for your help!

Here is the additional information that was requested:

output of pdftex --version MiKTeX-pdfTeX 2.9.4535 (1.40.13) (MiKTeX 2.9) Copyright (C) 1982 D. E. Knuth, (C) 1996-2012 Han The Thanh TeX is a trademark of the American Mathematical Society.

And here is a link to the pdf causing the issues: https://www.sugarsync.com/pf/D6819494_1990813_6559556

EDIT

Well, I've learned a bit more. Although I don't know what the problem is exactly with the pdf, it IS a problem with the pdf. I created it using the dopdf printer. I created the same one using cutepdf, and pdflatex compiled without any errors.

On a somewhat-related note: if anyone has recommendations on a nice, free pdf printer, let me know! I've used dopdf for awhile, which seems to work just fine for regular pdf viewing. I think that cutepdf will become what I use for tex documents from now on, unless people have other solutions.

And if anyone is able to identify exactly WHY the dopdf version isn't working, please share!

Thanks!

2
  • 1
    Please edit your question to include a complete example that reproduces the problem. Nothing appears to be wrong with the fragment you have provided. Commented Aug 6, 2012 at 20:21
  • You are using \label without \caption before, which can lead to an incorrect reference. Besides that, it looks like a pdf previewer or printing error message. Check if compiling causes it, or viewing/printing.
    – Stefan Kottwitz
    Commented Aug 6, 2012 at 20:27

3 Answers 3

3

The error message probably comes from the library (xpdf or poppler) that pdfTeX uses to read and embed PDF files. Either illustration.pdf is indeed broken or the library has a bug or does not support this kind of PDF files. For further analysis the output of

pdftex --version

and the file figures/illustration.pdf would be useful.

Edit

File illustration.pdf is faulty, its reformatted /Catalog object:

1 0 obj
<< 
  /Type /Catalog
  /Pages 2 0 R
  /PageLayout /OneColumn
  /PageMode /UseNone
  /OCProperties << 
    /D << 
      /Order []
      /AS [
        << 
          /Event /View
          /Category [/View ]
        >>
        << 
          /Event /Print
          /Category [/Print ]
        >>
        << 
          /Event /Export
          /Category [/Export ]
        >>
      ]
    >>
  >>
>>
endobj

The PDF specification says about OCProperties:

The optional OCProperties entry in the document catalog (see Section 3.6.1, "Document Catalog") holds the optional content properties dictionary, which contains a list of all the optional content groups in the document, […]

The list is specified in key /OCGs:

Key: OCGs
Type: array
Value: (Required) An array of indirect references to all the optional content groups in the document (see Section 4.10.1, "Optional Content Groups"), any order. Every optional content group must be included in this array.

The required key /OCGs is indeed missing and the error message of MiKTeX's pdfTeX is correct.

The file was created by (/Producer entry in the catalog):

doPDF Ver 7.2 Build 361 (Windows 7 Business Edition (SP 1) - Version: 6.1.7601 (x64))

I have not found that optional content groups are used in illustration.pdf. Thus the bug is probably that the /OCProperties key should have been removed if there are no optional content groups. Also MiKTeX's pdfTeX runs without error, if /OCProperties is changed (e.g. in /qCProperties).

IMHO the error message is correct, but it can be ignored, because optional content groups are not used anyway.

1
  • Thanks for the suggestions. I modified my original post to include the pdf in question as well as the version of pdftex. Commented Aug 7, 2012 at 16:32
0

You don't need to specify the extension of the file, it gets automatically added by pdflatex:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[hbtp]
\centering
\includegraphics[scale=0.55]{figures/illustration} 
\end{figure}
\end{document}
1
  • 1
    True, but does not seem to address the issue at hand.
    – Joseph Wright
    Commented Aug 7, 2012 at 15:12
0

This image works fine with pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012), so I suspect a bug in the pdfTeX of MikTeX. Please file a bug there. Googling the error message suggests a bug in older versions of poppler.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .