On 14.05.2019 20:13, Baris Erkus wrote:

Try:


convert -density 200 -trim -quality 100 -sharpen 0x1.0 $$i $$o


you can try different numbers for 200

--
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
Please bottom-post. Start your reply here:

So, with a great deal of help from Baris Erkus and according to his instructions in https://github.com/ituast/itutezLyX ('Some adjustments to LyX PDF previewer' part) I was able so solve the problem. To quote, this works:

 * Make sure the convert utility of ImageMagick is installed and made
   available to path.
 * Start LyX
 * Go to "Preferences" under the "Tools" menu.
 * Go to "Converters" under the "File Handling" section.
 * Select "PDF(graphics)" from "From Format:" and "PNG" from "To Format:"
 * To "Converter:" write : |convert -density *** -trim -quality 100
   -sharpen 0x1.0 $$i $$o|, where *** can be 200 to start with. You may
   try other values based on the results.
 * Click "Add" button.
 * Click "Apply" button.
 * Click "Save" button.

Reconfiguring and restarting doesn't seem to be necessary, but won't hurt.

These instructions worked for Windows 7 using a new ImageMagick command 'magick' instead of 'convert' and with simple options:

|magick -density 200 $$i $$o|

|For some reason '-trim' option didn't work, but it's not mandatory.|

|In my ||Ubuntu 18.04.2, XFCE 4.12 setup all of these still didn't work until I deleted default ||"PDF(graphics)->EPS" converter. With it LyX converts all PDF pictures to EPS and then somehow internally converts them to bad quality PNGs not using |||'EPS->PNG' converter settings which exists by default.| Adding 'PDF->EPS' converter back breaks PDF previews again. Even though 'EPS->PNG' converter exists, has correct options (with density and everything) and flawlessly works from the command line.
|

|So, delete |||"PDF(graphics)->EPS" converter if instructions for |||||"PDF(graphics)->PNG" converter alone don't work.
|||

||

--
Andrey.

Reply via email to