Lyx, Error Converting to Loadable Format for PDFs











up vote
5
down vote

favorite












I'm using Lyx 2.2 on windows 10 and ghostscript 9.19.
When I have pdfs images embedded in my document they don't display in the Lyx window (they appear in the final PDF however).



Where the images should preview it just says, "Error converting to loadable format".



I've tried looking at the latex log, but I can't seem to gain any insight as to how to resolve this issue.
I've also tried searching many forums online but they all seem to point to updating ghostscript, which doesn't apply to me since I'm running the latest version.










share|improve this question


















  • 2




    Seem that pdf to png conversion for the preview fail for some reason. This has nothing to do with LaTeX, that do not need at all this conversion. Check the instalation and configuration of the converter (See Preferences > File Handling > Converters > "LyX Preview -> PNG". For Linux the default is python -tt $$s/scripts/lyxpreview2bitmap.py --png
    – Fran
    Aug 23 '16 at 23:45












  • @Fran, I'm using windows. this was the command there: python -tt $$s/scripts/lyxpreview2bitmap.py --png.
    – Veridian
    Aug 24 '16 at 16:32












  • Sorry, I noticed that is not the right converter. Probably is another convert or a bug of Ghostsript. I posted a general answer that should allow you to find the solution.
    – Fran
    Aug 25 '16 at 8:27










  • Looks like the next version of Lyx will use sips on OSX instead of ImageMagick.
    – Timmmm
    Jun 27 '17 at 9:11















up vote
5
down vote

favorite












I'm using Lyx 2.2 on windows 10 and ghostscript 9.19.
When I have pdfs images embedded in my document they don't display in the Lyx window (they appear in the final PDF however).



Where the images should preview it just says, "Error converting to loadable format".



I've tried looking at the latex log, but I can't seem to gain any insight as to how to resolve this issue.
I've also tried searching many forums online but they all seem to point to updating ghostscript, which doesn't apply to me since I'm running the latest version.










share|improve this question


















  • 2




    Seem that pdf to png conversion for the preview fail for some reason. This has nothing to do with LaTeX, that do not need at all this conversion. Check the instalation and configuration of the converter (See Preferences > File Handling > Converters > "LyX Preview -> PNG". For Linux the default is python -tt $$s/scripts/lyxpreview2bitmap.py --png
    – Fran
    Aug 23 '16 at 23:45












  • @Fran, I'm using windows. this was the command there: python -tt $$s/scripts/lyxpreview2bitmap.py --png.
    – Veridian
    Aug 24 '16 at 16:32












  • Sorry, I noticed that is not the right converter. Probably is another convert or a bug of Ghostsript. I posted a general answer that should allow you to find the solution.
    – Fran
    Aug 25 '16 at 8:27










  • Looks like the next version of Lyx will use sips on OSX instead of ImageMagick.
    – Timmmm
    Jun 27 '17 at 9:11













up vote
5
down vote

favorite









up vote
5
down vote

favorite











I'm using Lyx 2.2 on windows 10 and ghostscript 9.19.
When I have pdfs images embedded in my document they don't display in the Lyx window (they appear in the final PDF however).



Where the images should preview it just says, "Error converting to loadable format".



I've tried looking at the latex log, but I can't seem to gain any insight as to how to resolve this issue.
I've also tried searching many forums online but they all seem to point to updating ghostscript, which doesn't apply to me since I'm running the latest version.










share|improve this question













I'm using Lyx 2.2 on windows 10 and ghostscript 9.19.
When I have pdfs images embedded in my document they don't display in the Lyx window (they appear in the final PDF however).



Where the images should preview it just says, "Error converting to loadable format".



I've tried looking at the latex log, but I can't seem to gain any insight as to how to resolve this issue.
I've also tried searching many forums online but they all seem to point to updating ghostscript, which doesn't apply to me since I'm running the latest version.







graphics lyx pdf ghostscript






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 23 '16 at 23:01









Veridian

3961418




3961418








  • 2




    Seem that pdf to png conversion for the preview fail for some reason. This has nothing to do with LaTeX, that do not need at all this conversion. Check the instalation and configuration of the converter (See Preferences > File Handling > Converters > "LyX Preview -> PNG". For Linux the default is python -tt $$s/scripts/lyxpreview2bitmap.py --png
    – Fran
    Aug 23 '16 at 23:45












  • @Fran, I'm using windows. this was the command there: python -tt $$s/scripts/lyxpreview2bitmap.py --png.
    – Veridian
    Aug 24 '16 at 16:32












  • Sorry, I noticed that is not the right converter. Probably is another convert or a bug of Ghostsript. I posted a general answer that should allow you to find the solution.
    – Fran
    Aug 25 '16 at 8:27










  • Looks like the next version of Lyx will use sips on OSX instead of ImageMagick.
    – Timmmm
    Jun 27 '17 at 9:11














  • 2




    Seem that pdf to png conversion for the preview fail for some reason. This has nothing to do with LaTeX, that do not need at all this conversion. Check the instalation and configuration of the converter (See Preferences > File Handling > Converters > "LyX Preview -> PNG". For Linux the default is python -tt $$s/scripts/lyxpreview2bitmap.py --png
    – Fran
    Aug 23 '16 at 23:45












  • @Fran, I'm using windows. this was the command there: python -tt $$s/scripts/lyxpreview2bitmap.py --png.
    – Veridian
    Aug 24 '16 at 16:32












  • Sorry, I noticed that is not the right converter. Probably is another convert or a bug of Ghostsript. I posted a general answer that should allow you to find the solution.
    – Fran
    Aug 25 '16 at 8:27










  • Looks like the next version of Lyx will use sips on OSX instead of ImageMagick.
    – Timmmm
    Jun 27 '17 at 9:11








2




2




Seem that pdf to png conversion for the preview fail for some reason. This has nothing to do with LaTeX, that do not need at all this conversion. Check the instalation and configuration of the converter (See Preferences > File Handling > Converters > "LyX Preview -> PNG". For Linux the default is python -tt $$s/scripts/lyxpreview2bitmap.py --png
– Fran
Aug 23 '16 at 23:45






Seem that pdf to png conversion for the preview fail for some reason. This has nothing to do with LaTeX, that do not need at all this conversion. Check the instalation and configuration of the converter (See Preferences > File Handling > Converters > "LyX Preview -> PNG". For Linux the default is python -tt $$s/scripts/lyxpreview2bitmap.py --png
– Fran
Aug 23 '16 at 23:45














@Fran, I'm using windows. this was the command there: python -tt $$s/scripts/lyxpreview2bitmap.py --png.
– Veridian
Aug 24 '16 at 16:32






@Fran, I'm using windows. this was the command there: python -tt $$s/scripts/lyxpreview2bitmap.py --png.
– Veridian
Aug 24 '16 at 16:32














Sorry, I noticed that is not the right converter. Probably is another convert or a bug of Ghostsript. I posted a general answer that should allow you to find the solution.
– Fran
Aug 25 '16 at 8:27




Sorry, I noticed that is not the right converter. Probably is another convert or a bug of Ghostsript. I posted a general answer that should allow you to find the solution.
– Fran
Aug 25 '16 at 8:27












Looks like the next version of Lyx will use sips on OSX instead of ImageMagick.
– Timmmm
Jun 27 '17 at 9:11




Looks like the next version of Lyx will use sips on OSX instead of ImageMagick.
– Timmmm
Jun 27 '17 at 9:11










10 Answers
10






active

oldest

votes

















up vote
4
down vote













Short answer: https://wiki.lyx.org/LyX/FiguresInLyX



Long answer:



To view a image on the LyX screen, it is required a compatible format with that XForms or Qt GUI libraries, namely bmp, gif, jpeg, pbm, pgm, ppm, tif, xbm or mng, png and xpm, respectively.



A message "Error converting to loadable format" mean that is not possible convert the image to PNG or any of these formats.




then you'll need to augment the list of known converters.




The link shows a detailed example of adding a converter. Pay attention that the converters are in the right path.



However,




If you see the "Error converting to loadable format" message only with
PDF files
and you've verified that you have the converter tools
mentioned above, check which version of GhostScript you are using.




Version 8.7 of GhostScript has a known bug that prevents LyX from loading PDFs. Use the newest version. (The link above also explain a manual fix).






share|improve this answer

















  • 1




    Thanks for the answer. I've seen this answer posted online. As I said in my question, I'm using GhostScript 9.19, so that isn't the issue, and yes this is only happening with PDFs.
    – Veridian
    Aug 25 '16 at 16:39










  • @Veridian Then focus first on the converters and Lyx configuration. I would start by checking that ImageMagick is there and you can use the convert tool in a Windows console (the C:> DOS prompt) to make manually some PDF to PNG conversion, for instance. Good luck!
    – Fran
    Aug 26 '16 at 2:17




















up vote
2
down vote













I'm using Lyx 2.2 under macOS Sierra. In my case, the problem was the ImageMagick version (7), and its incompatibility issues with LyX conversion scripts, as mentioned here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg194142.html.



I'm using brew, so I fixed this problem by removing imagemagic and installing the latest 6.x version: imagemagick@6 and then creating a symbolic link (in /usr/local/bin) pointing to /usr/local/Cellar/imagemagick@6/6.9.7-5/bin/convert .



brew uninstall imagemagick
brew install imagemagick@6
ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert


Hope it helps






share|improve this answer























  • Hmm this no longer seems to work.
    – Timmmm
    Jun 26 '17 at 16:13


















up vote
1
down vote













I'm using LyX 2.2.2 on Windows 7, and I have the same problem. After installing GhostScript 9.20, open LyX and click "Tools" -> "Reconfigure", finally restart LyX, and the problem is solved. I can see all PDF figures displayed in LyX. (However, the quality of the display is a little rough)






share|improve this answer






























    up vote
    1
    down vote













    Ok rather than fiddling around with ImageMagick and Ghostscript, we can rely on sips which is built in to OSX. It's what the official fix does.




    1. Go to Lyx->Preferences->File Handling->Converters.

    2. Change the From format: to PDF (graphics), the To format: to PNG and paste this in the Converter: box: sips --resampleWidth 800 --setProperty format png $$i --out $$o.

    3. Click Add. Yes this dialog is weird - you don't add an entry then configure it, you change the options and then click Add. Confusing.

    4. Click Save. DO NOT CLICK APPLY! For some reason it shows an empty window and crashes Lyx.


    The resulting PDFs can be a bit low res. You can increase the 800 if you like.



    This fix should already be in Lyx 2.2.4 or later I think.






    share|improve this answer




























      up vote
      0
      down vote













      For me on OSX the problem was that I didn't have ImageMagick installed at all. I'm not sure when it was expected to be installed, but anyway. Just follow Hector's instructions:



      brew install imagemagick@6
      ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert





      share|improve this answer




























        up vote
        0
        down vote













        I had exactly the same problem for LyX 2.2, whereas previously LyX 2.1 worked fine. So what I did was moving the ghostscript folder and the imagemagick folder from LyX 2.1 to LyX 2.2, and it turned out that it is imagemagick that has something wrong.






        share|improve this answer




























          up vote
          0
          down vote













          Windows usernames containing certain non-alphanumeric characters like umlauts can cause the described symptoms.



          On my system (Windows 8.1, LyX 2.2.2, ghostscript 9.15) Windows accounts with umlauts in their usernames suffer the problem described by Veridian: Embedded PDF images are not displayed in LyX, stating "Error converting to loadable format", even though they are displayed in the final PDF.
          On the contrary, Windows accounts with alphanumeric usernames do not suffer this problem on my system.
          This also holds for newly created accounts.



          For me the following workaround helped:




          • In LyX go to Tools > Preferences > Paths

          • Set Temporary Directory to C:UsersPublicAppDataLocalTemp

          • Make sure the path exists

          • Restart LyX






          share|improve this answer























          • Welcome to TeX.SX! Are you sure this is related to the problem?
            – TeXnician
            Apr 6 '17 at 15:20










          • @TeXnician Thanks! I edited my contribution and hope I made more clear, how it is related to the problem.
            – Dörrobst
            Apr 7 '17 at 15:38


















          up vote
          0
          down vote













          For me, on Windos 10 the following solved the problem:




          • Install Ghostscript (https://www.ghostscript.com/)

          • Delete the "ghostscript" folder inside the LyX directory






          share|improve this answer




























            up vote
            0
            down vote













            In /etc/ImageMagick-6/policy.xml, comment out the lines like



            <policy domain="coder" rights="none" pattern="(...)" />


            This introduces a slight security risk, which may be (it seems!) ignored on a desktop system.






            share|improve this answer




























              up vote
              0
              down vote













              There is a non-obvious detail that can cause this error despite having setup a suitable converter.



              So for example, following Fran's answer and the LyX wiki instructions:



              https://wiki.lyx.org/LyX/FiguresInLyX


              you decide to add a pdf to png converter. Since png is well supported and is among the GUI displayable formats, that is a reasonable choice.



              Under linux you might decide to use:



              pdftoppm -png -singlefile $$i $$o


              which generates slightly smaller files than pdftocairo -png .... The difficulty is, the output file will be named outfile.png.png and LyX will be unable to find it, causing the error:



              Error converting to loadable format


              which leaves no real clue about what the problem is.



              An easy way to fix this is to use the command:



              pdftoppm -png -singlefile $$i > $$o


              which generates outfile.png and LyX proceeds normally.



              Another issue is the display resolution. Under the LyX options tab you may wish to set the display size to 75% or so - this does not affect the ultimate pdf size, but it makes it easier to see what you have inserted in the GUI, since you can see the whole image.






              share|improve this answer





















                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "85"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f326244%2flyx-error-converting-to-loadable-format-for-pdfs%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                10 Answers
                10






                active

                oldest

                votes








                10 Answers
                10






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                4
                down vote













                Short answer: https://wiki.lyx.org/LyX/FiguresInLyX



                Long answer:



                To view a image on the LyX screen, it is required a compatible format with that XForms or Qt GUI libraries, namely bmp, gif, jpeg, pbm, pgm, ppm, tif, xbm or mng, png and xpm, respectively.



                A message "Error converting to loadable format" mean that is not possible convert the image to PNG or any of these formats.




                then you'll need to augment the list of known converters.




                The link shows a detailed example of adding a converter. Pay attention that the converters are in the right path.



                However,




                If you see the "Error converting to loadable format" message only with
                PDF files
                and you've verified that you have the converter tools
                mentioned above, check which version of GhostScript you are using.




                Version 8.7 of GhostScript has a known bug that prevents LyX from loading PDFs. Use the newest version. (The link above also explain a manual fix).






                share|improve this answer

















                • 1




                  Thanks for the answer. I've seen this answer posted online. As I said in my question, I'm using GhostScript 9.19, so that isn't the issue, and yes this is only happening with PDFs.
                  – Veridian
                  Aug 25 '16 at 16:39










                • @Veridian Then focus first on the converters and Lyx configuration. I would start by checking that ImageMagick is there and you can use the convert tool in a Windows console (the C:> DOS prompt) to make manually some PDF to PNG conversion, for instance. Good luck!
                  – Fran
                  Aug 26 '16 at 2:17

















                up vote
                4
                down vote













                Short answer: https://wiki.lyx.org/LyX/FiguresInLyX



                Long answer:



                To view a image on the LyX screen, it is required a compatible format with that XForms or Qt GUI libraries, namely bmp, gif, jpeg, pbm, pgm, ppm, tif, xbm or mng, png and xpm, respectively.



                A message "Error converting to loadable format" mean that is not possible convert the image to PNG or any of these formats.




                then you'll need to augment the list of known converters.




                The link shows a detailed example of adding a converter. Pay attention that the converters are in the right path.



                However,




                If you see the "Error converting to loadable format" message only with
                PDF files
                and you've verified that you have the converter tools
                mentioned above, check which version of GhostScript you are using.




                Version 8.7 of GhostScript has a known bug that prevents LyX from loading PDFs. Use the newest version. (The link above also explain a manual fix).






                share|improve this answer

















                • 1




                  Thanks for the answer. I've seen this answer posted online. As I said in my question, I'm using GhostScript 9.19, so that isn't the issue, and yes this is only happening with PDFs.
                  – Veridian
                  Aug 25 '16 at 16:39










                • @Veridian Then focus first on the converters and Lyx configuration. I would start by checking that ImageMagick is there and you can use the convert tool in a Windows console (the C:> DOS prompt) to make manually some PDF to PNG conversion, for instance. Good luck!
                  – Fran
                  Aug 26 '16 at 2:17















                up vote
                4
                down vote










                up vote
                4
                down vote









                Short answer: https://wiki.lyx.org/LyX/FiguresInLyX



                Long answer:



                To view a image on the LyX screen, it is required a compatible format with that XForms or Qt GUI libraries, namely bmp, gif, jpeg, pbm, pgm, ppm, tif, xbm or mng, png and xpm, respectively.



                A message "Error converting to loadable format" mean that is not possible convert the image to PNG or any of these formats.




                then you'll need to augment the list of known converters.




                The link shows a detailed example of adding a converter. Pay attention that the converters are in the right path.



                However,




                If you see the "Error converting to loadable format" message only with
                PDF files
                and you've verified that you have the converter tools
                mentioned above, check which version of GhostScript you are using.




                Version 8.7 of GhostScript has a known bug that prevents LyX from loading PDFs. Use the newest version. (The link above also explain a manual fix).






                share|improve this answer












                Short answer: https://wiki.lyx.org/LyX/FiguresInLyX



                Long answer:



                To view a image on the LyX screen, it is required a compatible format with that XForms or Qt GUI libraries, namely bmp, gif, jpeg, pbm, pgm, ppm, tif, xbm or mng, png and xpm, respectively.



                A message "Error converting to loadable format" mean that is not possible convert the image to PNG or any of these formats.




                then you'll need to augment the list of known converters.




                The link shows a detailed example of adding a converter. Pay attention that the converters are in the right path.



                However,




                If you see the "Error converting to loadable format" message only with
                PDF files
                and you've verified that you have the converter tools
                mentioned above, check which version of GhostScript you are using.




                Version 8.7 of GhostScript has a known bug that prevents LyX from loading PDFs. Use the newest version. (The link above also explain a manual fix).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 25 '16 at 8:23









                Fran

                50.4k6111174




                50.4k6111174








                • 1




                  Thanks for the answer. I've seen this answer posted online. As I said in my question, I'm using GhostScript 9.19, so that isn't the issue, and yes this is only happening with PDFs.
                  – Veridian
                  Aug 25 '16 at 16:39










                • @Veridian Then focus first on the converters and Lyx configuration. I would start by checking that ImageMagick is there and you can use the convert tool in a Windows console (the C:> DOS prompt) to make manually some PDF to PNG conversion, for instance. Good luck!
                  – Fran
                  Aug 26 '16 at 2:17
















                • 1




                  Thanks for the answer. I've seen this answer posted online. As I said in my question, I'm using GhostScript 9.19, so that isn't the issue, and yes this is only happening with PDFs.
                  – Veridian
                  Aug 25 '16 at 16:39










                • @Veridian Then focus first on the converters and Lyx configuration. I would start by checking that ImageMagick is there and you can use the convert tool in a Windows console (the C:> DOS prompt) to make manually some PDF to PNG conversion, for instance. Good luck!
                  – Fran
                  Aug 26 '16 at 2:17










                1




                1




                Thanks for the answer. I've seen this answer posted online. As I said in my question, I'm using GhostScript 9.19, so that isn't the issue, and yes this is only happening with PDFs.
                – Veridian
                Aug 25 '16 at 16:39




                Thanks for the answer. I've seen this answer posted online. As I said in my question, I'm using GhostScript 9.19, so that isn't the issue, and yes this is only happening with PDFs.
                – Veridian
                Aug 25 '16 at 16:39












                @Veridian Then focus first on the converters and Lyx configuration. I would start by checking that ImageMagick is there and you can use the convert tool in a Windows console (the C:> DOS prompt) to make manually some PDF to PNG conversion, for instance. Good luck!
                – Fran
                Aug 26 '16 at 2:17






                @Veridian Then focus first on the converters and Lyx configuration. I would start by checking that ImageMagick is there and you can use the convert tool in a Windows console (the C:> DOS prompt) to make manually some PDF to PNG conversion, for instance. Good luck!
                – Fran
                Aug 26 '16 at 2:17












                up vote
                2
                down vote













                I'm using Lyx 2.2 under macOS Sierra. In my case, the problem was the ImageMagick version (7), and its incompatibility issues with LyX conversion scripts, as mentioned here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg194142.html.



                I'm using brew, so I fixed this problem by removing imagemagic and installing the latest 6.x version: imagemagick@6 and then creating a symbolic link (in /usr/local/bin) pointing to /usr/local/Cellar/imagemagick@6/6.9.7-5/bin/convert .



                brew uninstall imagemagick
                brew install imagemagick@6
                ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert


                Hope it helps






                share|improve this answer























                • Hmm this no longer seems to work.
                  – Timmmm
                  Jun 26 '17 at 16:13















                up vote
                2
                down vote













                I'm using Lyx 2.2 under macOS Sierra. In my case, the problem was the ImageMagick version (7), and its incompatibility issues with LyX conversion scripts, as mentioned here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg194142.html.



                I'm using brew, so I fixed this problem by removing imagemagic and installing the latest 6.x version: imagemagick@6 and then creating a symbolic link (in /usr/local/bin) pointing to /usr/local/Cellar/imagemagick@6/6.9.7-5/bin/convert .



                brew uninstall imagemagick
                brew install imagemagick@6
                ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert


                Hope it helps






                share|improve this answer























                • Hmm this no longer seems to work.
                  – Timmmm
                  Jun 26 '17 at 16:13













                up vote
                2
                down vote










                up vote
                2
                down vote









                I'm using Lyx 2.2 under macOS Sierra. In my case, the problem was the ImageMagick version (7), and its incompatibility issues with LyX conversion scripts, as mentioned here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg194142.html.



                I'm using brew, so I fixed this problem by removing imagemagic and installing the latest 6.x version: imagemagick@6 and then creating a symbolic link (in /usr/local/bin) pointing to /usr/local/Cellar/imagemagick@6/6.9.7-5/bin/convert .



                brew uninstall imagemagick
                brew install imagemagick@6
                ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert


                Hope it helps






                share|improve this answer














                I'm using Lyx 2.2 under macOS Sierra. In my case, the problem was the ImageMagick version (7), and its incompatibility issues with LyX conversion scripts, as mentioned here: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg194142.html.



                I'm using brew, so I fixed this problem by removing imagemagic and installing the latest 6.x version: imagemagick@6 and then creating a symbolic link (in /usr/local/bin) pointing to /usr/local/Cellar/imagemagick@6/6.9.7-5/bin/convert .



                brew uninstall imagemagick
                brew install imagemagick@6
                ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert


                Hope it helps







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 28 '17 at 17:09









                Timmmm

                19923




                19923










                answered Jan 23 '17 at 20:36









                Hector Cadavid

                211




                211












                • Hmm this no longer seems to work.
                  – Timmmm
                  Jun 26 '17 at 16:13


















                • Hmm this no longer seems to work.
                  – Timmmm
                  Jun 26 '17 at 16:13
















                Hmm this no longer seems to work.
                – Timmmm
                Jun 26 '17 at 16:13




                Hmm this no longer seems to work.
                – Timmmm
                Jun 26 '17 at 16:13










                up vote
                1
                down vote













                I'm using LyX 2.2.2 on Windows 7, and I have the same problem. After installing GhostScript 9.20, open LyX and click "Tools" -> "Reconfigure", finally restart LyX, and the problem is solved. I can see all PDF figures displayed in LyX. (However, the quality of the display is a little rough)






                share|improve this answer



























                  up vote
                  1
                  down vote













                  I'm using LyX 2.2.2 on Windows 7, and I have the same problem. After installing GhostScript 9.20, open LyX and click "Tools" -> "Reconfigure", finally restart LyX, and the problem is solved. I can see all PDF figures displayed in LyX. (However, the quality of the display is a little rough)






                  share|improve this answer

























                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    I'm using LyX 2.2.2 on Windows 7, and I have the same problem. After installing GhostScript 9.20, open LyX and click "Tools" -> "Reconfigure", finally restart LyX, and the problem is solved. I can see all PDF figures displayed in LyX. (However, the quality of the display is a little rough)






                    share|improve this answer














                    I'm using LyX 2.2.2 on Windows 7, and I have the same problem. After installing GhostScript 9.20, open LyX and click "Tools" -> "Reconfigure", finally restart LyX, and the problem is solved. I can see all PDF figures displayed in LyX. (However, the quality of the display is a little rough)







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 14 '16 at 7:07









                    Werner

                    434k619531640




                    434k619531640










                    answered Dec 14 '16 at 6:42









                    pig

                    111




                    111






















                        up vote
                        1
                        down vote













                        Ok rather than fiddling around with ImageMagick and Ghostscript, we can rely on sips which is built in to OSX. It's what the official fix does.




                        1. Go to Lyx->Preferences->File Handling->Converters.

                        2. Change the From format: to PDF (graphics), the To format: to PNG and paste this in the Converter: box: sips --resampleWidth 800 --setProperty format png $$i --out $$o.

                        3. Click Add. Yes this dialog is weird - you don't add an entry then configure it, you change the options and then click Add. Confusing.

                        4. Click Save. DO NOT CLICK APPLY! For some reason it shows an empty window and crashes Lyx.


                        The resulting PDFs can be a bit low res. You can increase the 800 if you like.



                        This fix should already be in Lyx 2.2.4 or later I think.






                        share|improve this answer

























                          up vote
                          1
                          down vote













                          Ok rather than fiddling around with ImageMagick and Ghostscript, we can rely on sips which is built in to OSX. It's what the official fix does.




                          1. Go to Lyx->Preferences->File Handling->Converters.

                          2. Change the From format: to PDF (graphics), the To format: to PNG and paste this in the Converter: box: sips --resampleWidth 800 --setProperty format png $$i --out $$o.

                          3. Click Add. Yes this dialog is weird - you don't add an entry then configure it, you change the options and then click Add. Confusing.

                          4. Click Save. DO NOT CLICK APPLY! For some reason it shows an empty window and crashes Lyx.


                          The resulting PDFs can be a bit low res. You can increase the 800 if you like.



                          This fix should already be in Lyx 2.2.4 or later I think.






                          share|improve this answer























                            up vote
                            1
                            down vote










                            up vote
                            1
                            down vote









                            Ok rather than fiddling around with ImageMagick and Ghostscript, we can rely on sips which is built in to OSX. It's what the official fix does.




                            1. Go to Lyx->Preferences->File Handling->Converters.

                            2. Change the From format: to PDF (graphics), the To format: to PNG and paste this in the Converter: box: sips --resampleWidth 800 --setProperty format png $$i --out $$o.

                            3. Click Add. Yes this dialog is weird - you don't add an entry then configure it, you change the options and then click Add. Confusing.

                            4. Click Save. DO NOT CLICK APPLY! For some reason it shows an empty window and crashes Lyx.


                            The resulting PDFs can be a bit low res. You can increase the 800 if you like.



                            This fix should already be in Lyx 2.2.4 or later I think.






                            share|improve this answer












                            Ok rather than fiddling around with ImageMagick and Ghostscript, we can rely on sips which is built in to OSX. It's what the official fix does.




                            1. Go to Lyx->Preferences->File Handling->Converters.

                            2. Change the From format: to PDF (graphics), the To format: to PNG and paste this in the Converter: box: sips --resampleWidth 800 --setProperty format png $$i --out $$o.

                            3. Click Add. Yes this dialog is weird - you don't add an entry then configure it, you change the options and then click Add. Confusing.

                            4. Click Save. DO NOT CLICK APPLY! For some reason it shows an empty window and crashes Lyx.


                            The resulting PDFs can be a bit low res. You can increase the 800 if you like.



                            This fix should already be in Lyx 2.2.4 or later I think.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jun 27 '17 at 9:34









                            Timmmm

                            19923




                            19923






















                                up vote
                                0
                                down vote













                                For me on OSX the problem was that I didn't have ImageMagick installed at all. I'm not sure when it was expected to be installed, but anyway. Just follow Hector's instructions:



                                brew install imagemagick@6
                                ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert





                                share|improve this answer

























                                  up vote
                                  0
                                  down vote













                                  For me on OSX the problem was that I didn't have ImageMagick installed at all. I'm not sure when it was expected to be installed, but anyway. Just follow Hector's instructions:



                                  brew install imagemagick@6
                                  ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert





                                  share|improve this answer























                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    For me on OSX the problem was that I didn't have ImageMagick installed at all. I'm not sure when it was expected to be installed, but anyway. Just follow Hector's instructions:



                                    brew install imagemagick@6
                                    ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert





                                    share|improve this answer












                                    For me on OSX the problem was that I didn't have ImageMagick installed at all. I'm not sure when it was expected to be installed, but anyway. Just follow Hector's instructions:



                                    brew install imagemagick@6
                                    ln -s /usr/local/Cellar/imagemagick@6/6.9.7-9/bin/convert /usr/local/bin/convert






                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Feb 28 '17 at 16:18









                                    Timmmm

                                    19923




                                    19923






















                                        up vote
                                        0
                                        down vote













                                        I had exactly the same problem for LyX 2.2, whereas previously LyX 2.1 worked fine. So what I did was moving the ghostscript folder and the imagemagick folder from LyX 2.1 to LyX 2.2, and it turned out that it is imagemagick that has something wrong.






                                        share|improve this answer

























                                          up vote
                                          0
                                          down vote













                                          I had exactly the same problem for LyX 2.2, whereas previously LyX 2.1 worked fine. So what I did was moving the ghostscript folder and the imagemagick folder from LyX 2.1 to LyX 2.2, and it turned out that it is imagemagick that has something wrong.






                                          share|improve this answer























                                            up vote
                                            0
                                            down vote










                                            up vote
                                            0
                                            down vote









                                            I had exactly the same problem for LyX 2.2, whereas previously LyX 2.1 worked fine. So what I did was moving the ghostscript folder and the imagemagick folder from LyX 2.1 to LyX 2.2, and it turned out that it is imagemagick that has something wrong.






                                            share|improve this answer












                                            I had exactly the same problem for LyX 2.2, whereas previously LyX 2.1 worked fine. So what I did was moving the ghostscript folder and the imagemagick folder from LyX 2.1 to LyX 2.2, and it turned out that it is imagemagick that has something wrong.







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Mar 1 '17 at 3:49









                                            Alan

                                            1011




                                            1011






















                                                up vote
                                                0
                                                down vote













                                                Windows usernames containing certain non-alphanumeric characters like umlauts can cause the described symptoms.



                                                On my system (Windows 8.1, LyX 2.2.2, ghostscript 9.15) Windows accounts with umlauts in their usernames suffer the problem described by Veridian: Embedded PDF images are not displayed in LyX, stating "Error converting to loadable format", even though they are displayed in the final PDF.
                                                On the contrary, Windows accounts with alphanumeric usernames do not suffer this problem on my system.
                                                This also holds for newly created accounts.



                                                For me the following workaround helped:




                                                • In LyX go to Tools > Preferences > Paths

                                                • Set Temporary Directory to C:UsersPublicAppDataLocalTemp

                                                • Make sure the path exists

                                                • Restart LyX






                                                share|improve this answer























                                                • Welcome to TeX.SX! Are you sure this is related to the problem?
                                                  – TeXnician
                                                  Apr 6 '17 at 15:20










                                                • @TeXnician Thanks! I edited my contribution and hope I made more clear, how it is related to the problem.
                                                  – Dörrobst
                                                  Apr 7 '17 at 15:38















                                                up vote
                                                0
                                                down vote













                                                Windows usernames containing certain non-alphanumeric characters like umlauts can cause the described symptoms.



                                                On my system (Windows 8.1, LyX 2.2.2, ghostscript 9.15) Windows accounts with umlauts in their usernames suffer the problem described by Veridian: Embedded PDF images are not displayed in LyX, stating "Error converting to loadable format", even though they are displayed in the final PDF.
                                                On the contrary, Windows accounts with alphanumeric usernames do not suffer this problem on my system.
                                                This also holds for newly created accounts.



                                                For me the following workaround helped:




                                                • In LyX go to Tools > Preferences > Paths

                                                • Set Temporary Directory to C:UsersPublicAppDataLocalTemp

                                                • Make sure the path exists

                                                • Restart LyX






                                                share|improve this answer























                                                • Welcome to TeX.SX! Are you sure this is related to the problem?
                                                  – TeXnician
                                                  Apr 6 '17 at 15:20










                                                • @TeXnician Thanks! I edited my contribution and hope I made more clear, how it is related to the problem.
                                                  – Dörrobst
                                                  Apr 7 '17 at 15:38













                                                up vote
                                                0
                                                down vote










                                                up vote
                                                0
                                                down vote









                                                Windows usernames containing certain non-alphanumeric characters like umlauts can cause the described symptoms.



                                                On my system (Windows 8.1, LyX 2.2.2, ghostscript 9.15) Windows accounts with umlauts in their usernames suffer the problem described by Veridian: Embedded PDF images are not displayed in LyX, stating "Error converting to loadable format", even though they are displayed in the final PDF.
                                                On the contrary, Windows accounts with alphanumeric usernames do not suffer this problem on my system.
                                                This also holds for newly created accounts.



                                                For me the following workaround helped:




                                                • In LyX go to Tools > Preferences > Paths

                                                • Set Temporary Directory to C:UsersPublicAppDataLocalTemp

                                                • Make sure the path exists

                                                • Restart LyX






                                                share|improve this answer














                                                Windows usernames containing certain non-alphanumeric characters like umlauts can cause the described symptoms.



                                                On my system (Windows 8.1, LyX 2.2.2, ghostscript 9.15) Windows accounts with umlauts in their usernames suffer the problem described by Veridian: Embedded PDF images are not displayed in LyX, stating "Error converting to loadable format", even though they are displayed in the final PDF.
                                                On the contrary, Windows accounts with alphanumeric usernames do not suffer this problem on my system.
                                                This also holds for newly created accounts.



                                                For me the following workaround helped:




                                                • In LyX go to Tools > Preferences > Paths

                                                • Set Temporary Directory to C:UsersPublicAppDataLocalTemp

                                                • Make sure the path exists

                                                • Restart LyX







                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited Apr 7 '17 at 15:24

























                                                answered Apr 6 '17 at 14:46









                                                Dörrobst

                                                11




                                                11












                                                • Welcome to TeX.SX! Are you sure this is related to the problem?
                                                  – TeXnician
                                                  Apr 6 '17 at 15:20










                                                • @TeXnician Thanks! I edited my contribution and hope I made more clear, how it is related to the problem.
                                                  – Dörrobst
                                                  Apr 7 '17 at 15:38


















                                                • Welcome to TeX.SX! Are you sure this is related to the problem?
                                                  – TeXnician
                                                  Apr 6 '17 at 15:20










                                                • @TeXnician Thanks! I edited my contribution and hope I made more clear, how it is related to the problem.
                                                  – Dörrobst
                                                  Apr 7 '17 at 15:38
















                                                Welcome to TeX.SX! Are you sure this is related to the problem?
                                                – TeXnician
                                                Apr 6 '17 at 15:20




                                                Welcome to TeX.SX! Are you sure this is related to the problem?
                                                – TeXnician
                                                Apr 6 '17 at 15:20












                                                @TeXnician Thanks! I edited my contribution and hope I made more clear, how it is related to the problem.
                                                – Dörrobst
                                                Apr 7 '17 at 15:38




                                                @TeXnician Thanks! I edited my contribution and hope I made more clear, how it is related to the problem.
                                                – Dörrobst
                                                Apr 7 '17 at 15:38










                                                up vote
                                                0
                                                down vote













                                                For me, on Windos 10 the following solved the problem:




                                                • Install Ghostscript (https://www.ghostscript.com/)

                                                • Delete the "ghostscript" folder inside the LyX directory






                                                share|improve this answer

























                                                  up vote
                                                  0
                                                  down vote













                                                  For me, on Windos 10 the following solved the problem:




                                                  • Install Ghostscript (https://www.ghostscript.com/)

                                                  • Delete the "ghostscript" folder inside the LyX directory






                                                  share|improve this answer























                                                    up vote
                                                    0
                                                    down vote










                                                    up vote
                                                    0
                                                    down vote









                                                    For me, on Windos 10 the following solved the problem:




                                                    • Install Ghostscript (https://www.ghostscript.com/)

                                                    • Delete the "ghostscript" folder inside the LyX directory






                                                    share|improve this answer












                                                    For me, on Windos 10 the following solved the problem:




                                                    • Install Ghostscript (https://www.ghostscript.com/)

                                                    • Delete the "ghostscript" folder inside the LyX directory







                                                    share|improve this answer












                                                    share|improve this answer



                                                    share|improve this answer










                                                    answered Mar 14 at 12:47









                                                    jossele

                                                    1




                                                    1






















                                                        up vote
                                                        0
                                                        down vote













                                                        In /etc/ImageMagick-6/policy.xml, comment out the lines like



                                                        <policy domain="coder" rights="none" pattern="(...)" />


                                                        This introduces a slight security risk, which may be (it seems!) ignored on a desktop system.






                                                        share|improve this answer

























                                                          up vote
                                                          0
                                                          down vote













                                                          In /etc/ImageMagick-6/policy.xml, comment out the lines like



                                                          <policy domain="coder" rights="none" pattern="(...)" />


                                                          This introduces a slight security risk, which may be (it seems!) ignored on a desktop system.






                                                          share|improve this answer























                                                            up vote
                                                            0
                                                            down vote










                                                            up vote
                                                            0
                                                            down vote









                                                            In /etc/ImageMagick-6/policy.xml, comment out the lines like



                                                            <policy domain="coder" rights="none" pattern="(...)" />


                                                            This introduces a slight security risk, which may be (it seems!) ignored on a desktop system.






                                                            share|improve this answer












                                                            In /etc/ImageMagick-6/policy.xml, comment out the lines like



                                                            <policy domain="coder" rights="none" pattern="(...)" />


                                                            This introduces a slight security risk, which may be (it seems!) ignored on a desktop system.







                                                            share|improve this answer












                                                            share|improve this answer



                                                            share|improve this answer










                                                            answered Oct 21 at 14:13









                                                            Dmitry Zotikov

                                                            1011




                                                            1011






















                                                                up vote
                                                                0
                                                                down vote













                                                                There is a non-obvious detail that can cause this error despite having setup a suitable converter.



                                                                So for example, following Fran's answer and the LyX wiki instructions:



                                                                https://wiki.lyx.org/LyX/FiguresInLyX


                                                                you decide to add a pdf to png converter. Since png is well supported and is among the GUI displayable formats, that is a reasonable choice.



                                                                Under linux you might decide to use:



                                                                pdftoppm -png -singlefile $$i $$o


                                                                which generates slightly smaller files than pdftocairo -png .... The difficulty is, the output file will be named outfile.png.png and LyX will be unable to find it, causing the error:



                                                                Error converting to loadable format


                                                                which leaves no real clue about what the problem is.



                                                                An easy way to fix this is to use the command:



                                                                pdftoppm -png -singlefile $$i > $$o


                                                                which generates outfile.png and LyX proceeds normally.



                                                                Another issue is the display resolution. Under the LyX options tab you may wish to set the display size to 75% or so - this does not affect the ultimate pdf size, but it makes it easier to see what you have inserted in the GUI, since you can see the whole image.






                                                                share|improve this answer

























                                                                  up vote
                                                                  0
                                                                  down vote













                                                                  There is a non-obvious detail that can cause this error despite having setup a suitable converter.



                                                                  So for example, following Fran's answer and the LyX wiki instructions:



                                                                  https://wiki.lyx.org/LyX/FiguresInLyX


                                                                  you decide to add a pdf to png converter. Since png is well supported and is among the GUI displayable formats, that is a reasonable choice.



                                                                  Under linux you might decide to use:



                                                                  pdftoppm -png -singlefile $$i $$o


                                                                  which generates slightly smaller files than pdftocairo -png .... The difficulty is, the output file will be named outfile.png.png and LyX will be unable to find it, causing the error:



                                                                  Error converting to loadable format


                                                                  which leaves no real clue about what the problem is.



                                                                  An easy way to fix this is to use the command:



                                                                  pdftoppm -png -singlefile $$i > $$o


                                                                  which generates outfile.png and LyX proceeds normally.



                                                                  Another issue is the display resolution. Under the LyX options tab you may wish to set the display size to 75% or so - this does not affect the ultimate pdf size, but it makes it easier to see what you have inserted in the GUI, since you can see the whole image.






                                                                  share|improve this answer























                                                                    up vote
                                                                    0
                                                                    down vote










                                                                    up vote
                                                                    0
                                                                    down vote









                                                                    There is a non-obvious detail that can cause this error despite having setup a suitable converter.



                                                                    So for example, following Fran's answer and the LyX wiki instructions:



                                                                    https://wiki.lyx.org/LyX/FiguresInLyX


                                                                    you decide to add a pdf to png converter. Since png is well supported and is among the GUI displayable formats, that is a reasonable choice.



                                                                    Under linux you might decide to use:



                                                                    pdftoppm -png -singlefile $$i $$o


                                                                    which generates slightly smaller files than pdftocairo -png .... The difficulty is, the output file will be named outfile.png.png and LyX will be unable to find it, causing the error:



                                                                    Error converting to loadable format


                                                                    which leaves no real clue about what the problem is.



                                                                    An easy way to fix this is to use the command:



                                                                    pdftoppm -png -singlefile $$i > $$o


                                                                    which generates outfile.png and LyX proceeds normally.



                                                                    Another issue is the display resolution. Under the LyX options tab you may wish to set the display size to 75% or so - this does not affect the ultimate pdf size, but it makes it easier to see what you have inserted in the GUI, since you can see the whole image.






                                                                    share|improve this answer












                                                                    There is a non-obvious detail that can cause this error despite having setup a suitable converter.



                                                                    So for example, following Fran's answer and the LyX wiki instructions:



                                                                    https://wiki.lyx.org/LyX/FiguresInLyX


                                                                    you decide to add a pdf to png converter. Since png is well supported and is among the GUI displayable formats, that is a reasonable choice.



                                                                    Under linux you might decide to use:



                                                                    pdftoppm -png -singlefile $$i $$o


                                                                    which generates slightly smaller files than pdftocairo -png .... The difficulty is, the output file will be named outfile.png.png and LyX will be unable to find it, causing the error:



                                                                    Error converting to loadable format


                                                                    which leaves no real clue about what the problem is.



                                                                    An easy way to fix this is to use the command:



                                                                    pdftoppm -png -singlefile $$i > $$o


                                                                    which generates outfile.png and LyX proceeds normally.



                                                                    Another issue is the display resolution. Under the LyX options tab you may wish to set the display size to 75% or so - this does not affect the ultimate pdf size, but it makes it easier to see what you have inserted in the GUI, since you can see the whole image.







                                                                    share|improve this answer












                                                                    share|improve this answer



                                                                    share|improve this answer










                                                                    answered Dec 5 at 3:20









                                                                    Better_Error_Messages_Please

                                                                    1




                                                                    1






























                                                                        draft saved

                                                                        draft discarded




















































                                                                        Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                        But avoid



                                                                        • Asking for help, clarification, or responding to other answers.

                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                        To learn more, see our tips on writing great answers.





                                                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                                        Please pay close attention to the following guidance:


                                                                        • Please be sure to answer the question. Provide details and share your research!

                                                                        But avoid



                                                                        • Asking for help, clarification, or responding to other answers.

                                                                        • Making statements based on opinion; back them up with references or personal experience.


                                                                        To learn more, see our tips on writing great answers.




                                                                        draft saved


                                                                        draft discarded














                                                                        StackExchange.ready(
                                                                        function () {
                                                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f326244%2flyx-error-converting-to-loadable-format-for-pdfs%23new-answer', 'question_page');
                                                                        }
                                                                        );

                                                                        Post as a guest















                                                                        Required, but never shown





















































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown

































                                                                        Required, but never shown














                                                                        Required, but never shown












                                                                        Required, but never shown







                                                                        Required, but never shown







                                                                        Popular posts from this blog

                                                                        How to change which sound is reproduced for terminal bell?

                                                                        Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                                                                        Can I use Tabulator js library in my java Spring + Thymeleaf project?