Windows 7 64 bit.
LyX has stopped displaying previews of Adobe Illustrator/PDF/EPS images embedded in my files. They still appear in the final PDF without problems. I haven't used Lyx for a couple of months and everything worked then, but opening it today, no previews! I don't think I've done anything in the last few months that would mess anything up, but who knows.
I spent a few hours on the internet trying to work out what the problem is, and when everything failed I completely reinstalled Lyx (including resetting all the user settings) but the problem remains.
I've set up a small test document that contains only a single embedded image. When I run Lyx in debugging mode from the command line (i.e. "Lyx -dbg Graphics") and open the test file, I get the following output.
It looks like it recognises the image as PDF6, but then fails to convert it (several times). Does anyone have any idea what the problem is?
04:44:04.489: Opening document I:\Temp Files\newfile1.lyx...
04:44:04.621: Document I:\Temp Files\newfile1.lyx opened.
04:44:04.631: (file-open I:/Temp Files/newfile1.lyx)..\..\src\Format.cpp (392): filetools(getFormatFromContents)
File type not recognised before EOF!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (394): Recognised Fileformat: latex
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (392): filetools(getFormatFromContents)
File type not recognised before EOF!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (392): filetools(getFormatFromContents)
File type not recognised before EOF!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (394): Recognised Fileformat: latex
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (392): filetools(getFormatFromContents)
File type not recognised before EOF!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\src\Format.cpp (394): Recognised Fileformat: latex
..\..\src\Format.cpp (493): will guess format from file extension: lyx -> lyx
..\..\src\Format.cpp (392): filetools(getFormatFromContents)
File type not recognised before EOF!
..\..\src\Format.cpp (399): filetools(getFormatFromContents)
Couldn't find a known format!
..\..\..\src\insets\InsetGraphics.cpp (145): Token: 'filename'
..\..\..\src\insets\InsetGraphics.cpp (145): Token: '\end_inset'
..\..\src\Format.cpp (394): Recognised Fileformat: pdf6
..\..\..\src\graphics\GraphicsCacheItem.cpp (379): [CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: I:/Temp Files/Temp.ai
with displayed filename: I:\Temp Files\Temp.ai
..\..\src\Format.cpp (394): Recognised Fileformat: pdf6
..\..\..\src\graphics\GraphicsCacheItem.cpp (386):
The file contains pdf6 format data.
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (215):
The image loader can load the following directly:
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (222): bmp,
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (222): pbm,
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (222): pgm,
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (222): png,
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (222): ppm,
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (222): xbm,
..\..\..\..\src\frontends\qt4\GuiApplication.cpp (222): xpm,
..\..\..\src\graphics\GraphicsCache.cpp (91): LyX recognises the following image formats:
..\..\..\src\graphics\GraphicsCache.cpp (98): bmp
..\..\..\src\graphics\GraphicsCache.cpp (97): ,
..\..\..\src\graphics\GraphicsCache.cpp (98): pbm
..\..\..\src\graphics\GraphicsCache.cpp (97): ,
..\..\..\src\graphics\GraphicsCache.cpp (98): pgm
..\..\..\src\graphics\GraphicsCache.cpp (97): ,
..\..\..\src\graphics\GraphicsCache.cpp (98): png
..\..\..\src\graphics\GraphicsCache.cpp (97): ,
..\..\..\src\graphics\GraphicsCache.cpp (98): ppm
..\..\..\src\graphics\GraphicsCache.cpp (97): ,
..\..\..\src\graphics\GraphicsCache.cpp (98): xbm
..\..\..\src\graphics\GraphicsCache.cpp (97): ,
..\..\..\src\graphics\GraphicsCache.cpp (98): xpm
..\..\..\src\graphics\GraphicsCache.cpp (100):
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to bmp
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pbm
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pgm
..\..\..\src\graphics\GraphicsLoader.cpp (115): LoaderQueue: waking up
..\..\..\src\graphics\GraphicsCacheItem.cpp (379): [CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: I:/Temp Files/Temp.ai
with displayed filename: I:\Temp Files\Temp.ai
..\..\src\Format.cpp (394): Recognised Fileformat: pdf6
..\..\..\src\graphics\GraphicsCacheItem.cpp (386):
The file contains pdf6 format data.
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to bmp
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pbm
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pgm
..\..\..\src\graphics\GraphicsCacheItem.cpp (379): [CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: I:/Temp Files/Temp.ai
with displayed filename: I:\Temp Files\Temp.ai
..\..\src\Format.cpp (394): Recognised Fileformat: pdf6
..\..\..\src\graphics\GraphicsCacheItem.cpp (386):
The file contains pdf6 format data.
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to bmp
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pbm
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pgm
..\..\..\src\insets\InsetGraphics.cpp (754): insetgraphics::latex: Filename = I:/Temp Files/Temp.ai
..\..\..\src\insets\InsetGraphics.cpp (774): Message = ""
..\..\..\src\insets\InsetGraphics.cpp (789): Opts =
..\..\..\src\insets\InsetGraphics.cpp (796): Before = \includegraphics
after =
..\..\..\src\insets\InsetGraphics.cpp (808): InsetGraphics::latex outputting:
\includegraphics{Temp}
..\..\..\src\insets\InsetGraphics.cpp (754): insetgraphics::latex: Filename = I:/Temp Files/Temp.ai
..\..\..\src\insets\InsetGraphics.cpp (774): Message = ""
..\..\..\src\insets\InsetGraphics.cpp (789): Opts =
..\..\..\src\insets\InsetGraphics.cpp (796): Before = \includegraphics
after =
..\..\..\src\insets\InsetGraphics.cpp (808): InsetGraphics::latex outputting:
\includegraphics{Temp}
..\..\..\src\graphics\GraphicsCacheItem.cpp (379): [CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: I:/Temp Files/Temp.ai
with displayed filename: I:\Temp Files\Temp.ai
..\..\src\Format.cpp (394): Recognised Fileformat: pdf6
..\..\..\src\graphics\GraphicsCacheItem.cpp (386):
The file contains pdf6 format data.
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to bmp
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pbm
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pgm
..\..\..\src\insets\InsetGraphics.cpp (754): insetgraphics::latex: Filename = I:/Temp Files/Temp.ai
..\..\..\src\insets\InsetGraphics.cpp (774): Message = ""
..\..\..\src\insets\InsetGraphics.cpp (789): Opts =
..\..\..\src\insets\InsetGraphics.cpp (796): Before = \includegraphics
after =
..\..\..\src\insets\InsetGraphics.cpp (808): InsetGraphics::latex outputting:
\includegraphics{Temp}
..\..\..\src\graphics\GraphicsLoader.cpp (90): LoaderQueue: 1 items in the queue
..\..\..\src\graphics\GraphicsCacheItem.cpp (409): Converting it to format.
..\..\..\src\graphics\GraphicsCacheItem.cpp (379): [CacheItem::Impl::convertToDisplayFormat]
Attempting to convert image file: I:/Temp Files/Temp.ai
with displayed filename: I:\Temp Files\Temp.ai
..\..\src\Format.cpp (394): Recognised Fileformat: pdf6
..\..\..\src\graphics\GraphicsCacheItem.cpp (386):
The file contains pdf6 format data.
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to bmp
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pbm
..\..\..\src\graphics\GraphicsCacheItem.cpp (341): Unable to convert from pdf6 to pgm
..\..\..\src\graphics\GraphicsConverter.cpp (128): Converter c-tor:
from_file: I:/Temp Files/Temp.ai
to_file_base: I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/CacheItem.PuhyXszo5636
from_format: pdf6
to_format: png
..\..\..\src\graphics\GraphicsConverter.cpp (273): build_script ...
..\..\..\src\graphics\GraphicsConverter.cpp (398): ready!
..\..\..\src\graphics\GraphicsConverter.cpp (143): Conversion script
--------------------------------------
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, shutil, sys
def unlinkNoThrow(file):
''' remove a file, do not throw if an error occurs '''
try:
os.unlink(file)
except:
pass
infile = "I:/Temp Files/Temp.ai"
outfile = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/gconvertsj5636.ai"
shutil.copy(infile, outfile)
os.chdir("I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/")
infile = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/gconvertsj5636.ai"
infile_base = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/gconvertsj5636"
outfile = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/gconvertsj5636.eps"
outdir = os.path.dirname(outfile)
if os.system(r'pdf2ps ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0:
unlinkNoThrow(outfile)
sys.exit(1)
if not os.path.isfile(outfile):
if os.path.isfile(outfile + '.0'):
os.rename(outfile + '.0', outfile)
import glob
for file in glob.glob(outfile + '.?'):
unlinkNoThrow(file)
else:
sys.exit(1)
if infile != outfile:
unlinkNoThrow(infile)
infile = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/gconvertsj5636.eps"
infile_base = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/gconvertsj5636"
outfile = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/gconvertsj5636.png"
outdir = os.path.dirname(outfile)
if os.system(r'convert ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0:
unlinkNoThrow(outfile)
sys.exit(1)
if not os.path.isfile(outfile):
if os.path.isfile(outfile + '.0'):
os.rename(outfile + '.0', outfile)
import glob
for file in glob.glob(outfile + '.?'):
unlinkNoThrow(file)
else:
sys.exit(1)
if infile != outfile:
unlinkNoThrow(infile)
fromfile = outfile
tofile = "I:/Temp Files/System/SimonKane/lyx_tmpdir.HNbHddvy5636/CacheItem.PuhyXszo5636.png"
try:
os.rename(fromfile, tofile)
except:
try:
shutil.copy(fromfile, tofile)
except:
sys.exit(1)
unlinkNoThrow(fromfile)
--------------------------------------
..\..\..\src\support\ForkedCalls.cpp (582): ForkedCallQueue: waking up
..\..\..\src\graphics\GraphicsLoader.cpp (126): LoaderQueue: I'm going to sleep
..\..\..\src\support\ForkedCalls.cpp (591): ForkedCallQueue: I'm going to sleep
..\..\..\src\graphics\GraphicsCacheItem.cpp (264): Image conversion failed.
..\..\..\src\graphics\GraphicsCacheItem.cpp (274): Unable to find converted file!