You might try the following. Prepare a tiny test document with one of the
offending images, and nothing else, to minimize the amount of output through
which you will wade.

Open a terminal and run the command "lyx -dbg graphics", which should open
LyX while spewing a bunch of stuff to the terminal window. You might want to
position the windows so that both are visible. Any output in the terminal up
to this point can be ignored.

Now open your test document, which will send the terminal into another
paroxysm of printing. Scroll forward to find a line like the following:

"Attempting to convert image file: mygraphicfile.pdf"

Soon thereafter should be something like the following:

"Format.cpp (435):      got format from MIME type: application/pdf -> pdf6"

"pdf6" is LyX's short name for the file format it calls "PDF (graphics)".
Presumably it will recognize your image as such.

Once LyX recognizes you've inserted a PDF image, it will try to convert it
to a format that it can display in the GUI. Look for a line like the following:

"The image loader can load the following directly:"

This will be followed by a list of graphics formats LyX likes. You'll need
to scroll back to that list in a minute.

Scroll further forward and you should see LyX attempting to convert your PDF
image to each of those LyX-friendly formats in order. There should be lines
like the following:

"graphics/GraphicsCacheItem.cpp (342): Unable to convert from pdf6 to bmp"
"graphics/GraphicsCacheItem.cpp (342): Unable to convert from pdf6 to gif"

When the list stops, the first of the LyX-friendly formats that does not
have an "unable to convert" message is apparently the one LyX ended up using.

I just ran a small test in which the last failure message was for "pgm"
format. The next format in the list of supported formats was "png", so LyX
apparently converted my PDF image to PNG in order to display it in the GUI.
Now go to Tools > Preferences... > File Handling > Converters and scroll
until you find a converter from the format LyX believes your image to be
(probably "PDF (graphics)") to the format it used for display. As if this
were not already sufficiently complex, you may not find that converter, in
which case LyX goes through a chain of two or more conversions. For instance
(at least on my system), there is no converter from "PDF (graphics)" to PNG.
The only conversion out of "PDF (graphics)" is to EPS; there is then a
converter defined from EPS to PNG.

Assuming you have survived to this point and found a conversion path, look
at the "Converter:" box for each step of the path. In my case, they read

pdftops -eps -f 1 -l 1 $$i $$o (to go from "PDF (graphics)" to EPS

and 

convert $$i $$o (to go from EPS to PNG).

If you've made it this far, chances are one of those conversions is mucking
up your image. You can try manually run each conversion in a terminal and
then viewing the output file of the conversion in some appropriate file
viewer to see if it has turned into mush yet. You will need to substitute
the name and path of your PDF image for $$i in the first conversion step,
and give a name and path to use for the output as $$o in the first
conversion step. If additional conversions occur, each subsequent $$i is the
previous $$o and each new $$o is some new temporary file.

Good luck!

Paul



Reply via email to