LyX ⇒ import pdf figures on WinPC's
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
import pdf figures on WinPC's
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
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
What is the error message?Stef Pillaert wrote:LyX says there is a problem in the conversion.
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
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
import pdf figures on WinPC's
(transl. from dutch:) "Error converting to useable format" (or something similar)Stefan Kottwitz wrote:Hi Stef!
What is the error message?Stef Pillaert wrote:LyX says there is a problem in the conversion.
It is MiKTeX 2.9. I updated it, but no result, same problem...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.
Stef
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
import pdf figures on WinPC's
import pdf figures on WinPC's
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
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
import pdf figures on WinPC's
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?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
Anyway, about your second question: the pdf's are identical, that's not the problem.
Stef
import pdf figures on WinPC's
sounds like you've got the command prompt open, already (or where did you try to type this, exactly?)Stef Pillaert wrote: I tried typing in a "commandpromptwindow"
Why don't you try it? Change into the directory where this pdf file of yours resides. What doesStef 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?
Code: Select all
pdf2ps the-file-you're-trying-to-convert.pdf
Code: Select all
pdftops the-file-you're-trying-to-convert.pdf
KR
Rainer
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
import pdf figures on WinPC's
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...rais wrote:Stef Pillaert wrote:
Why don't you try it? Change into the directory where this pdf file of yours resides. What doesrespectivelyCode: Select all
pdf2ps the-file-you're-trying-to-convert.pdf
tell you now?Code: Select all
pdftops the-file-you're-trying-to-convert.pdf
KR
Rainer
Stef
import pdf figures on WinPC's
OK, so we're one step further, at least: the converter(s) work on the file in question.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).
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
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
import pdf figures on WinPC's
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.