LyXimport pdf figures on WinPC's

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

import pdf figures on WinPC's

Post by Stef Pillaert »

I have 2 PCs, one with Win10, one with Win7.
On the Win10PC, there is a problem: importing a pdf-file as figure, LyX says there is a problem in the conversion. But the final output (ctrl-R) is OK though.
The win7 machine doesn't have this problem.
(Sidenote: on the win7, under conversions, it says for pdf-Postscript "pdftops $$i $$o", while on the win10 it says "pdf2ps $$i $$o". I tried to change this (no idea why this was different???), but no effect...)
Any ideas?
Thanks,
Stef

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

import pdf figures on WinPC's

Post by Stefan Kottwitz »

Hi Stef!
Stef Pillaert wrote:LyX says there is a problem in the conversion.
What is the error message?

I think it doesn't matter if it is Windows 10 or Windows 7. However, the version of the TeX installation matters: is it TeX Live 2016, 2015, ..., or is it MiKTeX 2.9, 2.8, ... even 2.9 exists since years and maybe different on PCs if not regularly updated.

I remember that pdftops may be better (if existing). It treats fonts better and generates smaller files than pdf2ps. But compare the results yourself if you like, zoom in.

Stefan
LaTeX.org admin
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

import pdf figures on WinPC's

Post by Stef Pillaert »

Stefan Kottwitz wrote:Hi Stef!
Stef Pillaert wrote:LyX says there is a problem in the conversion.
What is the error message?
(transl. from dutch:) "Error converting to useable format" (or something similar)
Stef Pillaert wrote: However, the version of the TeX installation matters: is it TeX Live 2016, 2015, ..., or is it MiKTeX 2.9, 2.8, ... even 2.9 exists since years and maybe different on PCs if not regularly updated.
It is MiKTeX 2.9. I updated it, but no result, same problem...
Stef
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

import pdf figures on WinPC's

Post by Stefan Kottwitz »

If there's no other idea, I would install TeX Live 2016 and also LyX...

Stefan
LaTeX.org admin
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

import pdf figures on WinPC's

Post by rais »

Well, I'm no LyX user, but before doing something as drastic as installing a new TeX distribution, I'd check the converter's outcome on a console (a.k.a. command prompt).
BTW: for pdf2ps to work, you need to have a working ghostscript installed (no idea if it ships with MikTeX/TeXLive or if it needs to be installed separately; for me, it came with my Linux distribution).
My next question would be, if the pdf file to be converted is really one and the same on both computers or if there's a chance that one of them is either faulty or uses pdf features not covered by the converter (yet).

KR
Rainer
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

import pdf figures on WinPC's

Post by Stef Pillaert »

rais wrote:Well, I'm no LyX user, but before doing something as drastic as installing a new TeX distribution, I'd check the converter's outcome on a console (a.k.a. command prompt).
BTW: for pdf2ps to work, you need to have a working ghostscript installed (no idea if it ships with MikTeX/TeXLive or if it needs to be installed separately; for me, it came with my Linux distribution).
My next question would be, if the pdf file to be converted is really one and the same on both computers or if there's a chance that one of them is either faulty or uses pdf features not covered by the converter (yet).

KR
Rainer
I tried typing in a "commandpromptwindow" (is this English? Probably not...) "pdf2ps" and "pdftops", they both gave me some respons with a list of options etc..... So both commands seem at least to be recognized. But are these actually the commands that invoke the problem?
Anyway, about your second question: the pdf's are identical, that's not the problem.
Stef
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

import pdf figures on WinPC's

Post by rais »

Stef Pillaert wrote: I tried typing in a "commandpromptwindow"
sounds like you've got the command prompt open, already (or where did you try to type this, exactly?)
Stef Pillaert wrote:"pdf2ps" and "pdftops", they both gave me some respons with a list of options etc..... So both commands seem at least to be recognized. But are these actually the commands that invoke the problem?
Why don't you try it? Change into the directory where this pdf file of yours resides. What does

Code: Select all

pdf2ps the-file-you're-trying-to-convert.pdf
respectively

Code: Select all

pdftops the-file-you're-trying-to-convert.pdf
tell you now?

KR
Rainer
Stef Pillaert
Posts: 51
Joined: Sat Oct 22, 2016 3:43 pm

import pdf figures on WinPC's

Post by Stef Pillaert »

rais wrote:
Stef Pillaert wrote:
Why don't you try it? Change into the directory where this pdf file of yours resides. What does

Code: Select all

pdf2ps the-file-you're-trying-to-convert.pdf
respectively

Code: Select all

pdftops the-file-you're-trying-to-convert.pdf
tell you now?

KR
Rainer
Well, on both PC's, both commands (typed in a DOS-like command window) produce a valid .ps file (that I can open in e.g. inkscape). So that doesn't seem to be the problem...
Stef
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

import pdf figures on WinPC's

Post by rais »

Stef Pillaert wrote: Well, on both PC's, both commands (typed in a DOS-like command window) produce a valid .ps file (that I can open in e.g. inkscape).
OK, so we're one step further, at least: the converter(s) work on the file in question.
Sounds to me like LyX on your Win10 machine doesn't find this converter, though.
Why that may be, I cannot answer...perhaps Scott can pitch in a thought or two to get this up-and-running;-)

KR
Rainer
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

import pdf figures on WinPC's

Post by scottkosty »

I've seen a few of these reports but I have no idea what the root problem is. I think LyX is using Qt to convert to EPS to show the image on the screen, which is different from the converter used to convert for the PDF output, so that explains why one works and the other doesn't.

Since the final output is correct, I would recommend just going to the graphics options in LyX, clicking LaTeX and LyX options and unchecking "Draft mode".

Sorry for not being able to help more.
Post Reply