On Tue, Dec 3, 2013 at 3:19 AM, Jerry <lancebo...@qwest.net> wrote:
>
> On Dec 3, 2013, at 12:41 AM, Scott Kostyshak <skost...@lyx.org> wrote:
>
>> On Tue, Dec 3, 2013 at 2:33 AM, Jerry <lancebo...@qwest.net> wrote:
>>>
>>> On Dec 2, 2013, at 11:20 PM, Scott Kostyshak <skost...@lyx.org> wrote:
>>>
>>>> On Tue, Dec 3, 2013 at 1:00 AM, Jerry <lancebo...@qwest.net> wrote:
>>>>> I am unable to insert PDF image files into LyX 2.0.6 on OS X 10.8.5. When 
>>>>> I try to do this, in the area where the graphic would be displayed, I 
>>>>> first see the message "Converting to loadable format" and then "Error 
>>>>> converting to loadable format." The name of the file is then displayed 
>>>>> but not the image.
>>>>>
>>>>> I am trying this in a new LyX document. The graphic is a simple plot 
>>>>> saved from Mathematica in several file formats. Of those other formats, I 
>>>>> am able to successfully insert bmp, eps, gif, jpg, png and tiff. (svg 
>>>>> displays incorrectly in LyX as a black rectangle even though it is 
>>>>> displayed correctly in other viewers.)
>>>>>
>>>>> I thought PDF was a "native" format for LyX, so I don't understand why it 
>>>>> is trying to convert the PDF file into anything. Have I set a preference 
>>>>> to something stupid?
>>>>>
>>>>> Jerry
>>>>
>>>> Hi Jerry,
>>>>
>>>> I believe that LyX converts PDFs to EPS files. To see the command that
>>>> is being run, go to Tools > Preferences > File Handling > Converters
>>>> and select "PDF (graphics) -> EPS"
>>>> For me the command is:
>>>> pdftops -eps -f 1 -l 1 $$i $$o
>>>>
>>>> Best,
>>>>
>>>> Scott
>>>
>>> Thanks, Scott. I have an item in the Converters list called PDF (ps2pdf) -> 
>>> EPS which is probably the equivalent. In any case, the Converter command is 
>>> pdftops -eps -f 1 -l 1 $$i $$o, the same as yours.
>>
>> OK then you might want to try running the command manually on the pdf
>> file. For example, you could run:
>> pdftops -eps -f 1 -l 1 myfile.pdf myfile.eps
>>
>> To get more information on what LyX is doing in the background, you
>> could do the following:
>> lyx -dbg graphics
>>
>> I forget how you're supposed to run the command from the terminal in a
>> Mac. I remember JMarc said something like you have to specify the full
>> path. Hopefully you know.
>
> I ran the command that you suggested and a new EPS file was created without 
> any error code reported. I examined it in a text editor and it at least 
> superficially looks like a valid EPS file. However, when I then try to insert 
> it into my document, I get the "Error converting to loadable format" message 
> in place of the image. (I don't notice the intermediate message saying that 
> it is "Converting to a loadable format".)
>
> When I attempt to open the EPS which was originally exported by Mathematica 
> (see my original post) with Apple's Preview.app, it succeeds (by itself 
> converting the EPS to PDF). However, when I attempt to open the new EPS made 
> by the above command in Preview, it fails and reports "Warning PostScript 
> error: No PDF was produced," and there is in fact no image displayed in 
> Preview.
>
> It looks like pdftops is giving me a bad result. What package
>
> FWIW, the original EPS which was exported from Mathematica (and which 
> displays correctly in LyX) is 408 KB and the new one created by the pdftops 
> command above is only 188 KB. I don't necessarily find this worrisome but I 
> thought I would mention it.
>

Sounds like you've narrowed down the problem. I've heard of similar
reports. You could try to use a different command (different program
than pdftops) to do the conversion. I don't have experience with this.

Best,

Scott

Reply via email to