Skip to content

[Discussion/suggestion] Wrong driver selection results in incorrect PDF - forcibly use correct driver? #41

Open
@norbusan

Description

@norbusan

Not a bug but a discussion/suggestion:

If a user forces a certain graphics driver with

\usepackage[dvipdfm]{graphicx}

and the actual file is compiled with pdflatex (because it includes png/pdf/whatever),
the generated PDF is not standards conform.
Example document:

\documentclass{article}
\usepackage[dvipdfm]{graphicx}
\usepackage{pgf}
\begin{document}
Hello World
\end{document}

Compiling this with pdflatex produces a PDF that contains invalid code, from the uncompress pdf:

stream
1 0 0 1 -72 720 cm
obj @pgfcolorspaces <<>>
put @resources << /ColorSpace @pgfcolorspaces >>
put @pgfcolorspaces <<  /pgfprgb [/Pattern /DeviceRGB]  >>

(see lengthy discussion here pdfminer/pdfminer.six#947)

Using the correct driver for pdflatex, or using latex/dvipdfmx produces correct PDF.

Of course, this is a user error! The question is, can we do something better here? Overriding the selected driver when it is obviously wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions