LyX, Error Converting to Loadable Format for PDFs under Ubuntu











up vote
2
down vote

favorite












I have the same problem as reported Lyx, Error Converting to Loadable Format for PDFs but I am using Ubuntu 18.04, and solutions are only described for Windows and MacOS.



Here are the stderr messages if I run LyX from the command line:



convert-im6.q16: not authorized `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.eps' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.png' @ error/convert.c/ConvertImageCommand/3258.


The LyX wiki solutions https://wiki.lyx.org/LyX/FiguresInLyX also don't apply, since my versions are:




ImageMagick 6.9.7-4



Ghostscript 9.25 (2018-09-13)




My /etc/ImageMagick-6/policy.xml looks like:



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)+>
<!ELEMENT policy (#PCDATA)>
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED>
<!ATTLIST policy name CDATA #IMPLIED>
<!ATTLIST policy rights CDATA #IMPLIED>
<!ATTLIST policy pattern CDATA #IMPLIED>
<!ATTLIST policy value CDATA #IMPLIED>
]>
<!--
...(comments excised for brevity)...
-->
<policymap>
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/>
-->
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<policy domain="resource" name="area" value="128MB"/>
<policy domain="resource" name="disk" value="1GiB"/>
<!-- <policy domain="resource" name="file" value="768"/> -->
<!-- <policy domain="resource" name="thread" value="4"/> -->
<!-- <policy domain="resource" name="throttle" value="0"/> -->
<!-- <policy domain="resource" name="time" value="3600"/> -->
<!-- <policy domain="system" name="precision" value="6"/> -->
<!-- not needed due to the need to use explicitly by mvg: -->
<!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
<!-- use curl -->
<policy domain="delegate" rights="none" pattern="URL" />
<policy domain="delegate" rights="none" pattern="HTTPS" />
<policy domain="delegate" rights="none" pattern="HTTP" />
<!-- in order to avoid to get image with password text -->
<policy domain="path" rights="none" pattern="@*"/>
<policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPI" />
<policy domain="coder" rights="read|write" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
<policy domain="coder" rights="read|write" pattern="LABEL" />
</policymap>









share|improve this question




















  • 1




    I had a similar issue on Ubuntu 18.04. This thread helped me solve the problem: stackoverflow.com/questions/42928765/…
    – scottkosty
    Nov 28 at 17:43










  • @scottkosty Curiously, my policy.xml file already looks like the updated version.
    – CPBL
    Nov 28 at 21:12










  • Can you convert the PDF on the command line? Can you give the terminal output, if there is an error, when you try the conversion on the command line (i.e., outside of LyX)?
    – scottkosty
    Nov 28 at 23:03










  • convert myPDFfigure.pdf myPDFfigure.png works perfectly on the command line. I'm actually not clear on what the conversion that LyX needs is. PDF->png is not listed in the LyX converter definitions.
    – CPBL
    Nov 30 at 3:22








  • 1




    Great! Go ahead and add & accept your answer to mark this is solved. Glad it's sorted out!
    – scottkosty
    Dec 1 at 3:31















up vote
2
down vote

favorite












I have the same problem as reported Lyx, Error Converting to Loadable Format for PDFs but I am using Ubuntu 18.04, and solutions are only described for Windows and MacOS.



Here are the stderr messages if I run LyX from the command line:



convert-im6.q16: not authorized `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.eps' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.png' @ error/convert.c/ConvertImageCommand/3258.


The LyX wiki solutions https://wiki.lyx.org/LyX/FiguresInLyX also don't apply, since my versions are:




ImageMagick 6.9.7-4



Ghostscript 9.25 (2018-09-13)




My /etc/ImageMagick-6/policy.xml looks like:



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)+>
<!ELEMENT policy (#PCDATA)>
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED>
<!ATTLIST policy name CDATA #IMPLIED>
<!ATTLIST policy rights CDATA #IMPLIED>
<!ATTLIST policy pattern CDATA #IMPLIED>
<!ATTLIST policy value CDATA #IMPLIED>
]>
<!--
...(comments excised for brevity)...
-->
<policymap>
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/>
-->
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<policy domain="resource" name="area" value="128MB"/>
<policy domain="resource" name="disk" value="1GiB"/>
<!-- <policy domain="resource" name="file" value="768"/> -->
<!-- <policy domain="resource" name="thread" value="4"/> -->
<!-- <policy domain="resource" name="throttle" value="0"/> -->
<!-- <policy domain="resource" name="time" value="3600"/> -->
<!-- <policy domain="system" name="precision" value="6"/> -->
<!-- not needed due to the need to use explicitly by mvg: -->
<!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
<!-- use curl -->
<policy domain="delegate" rights="none" pattern="URL" />
<policy domain="delegate" rights="none" pattern="HTTPS" />
<policy domain="delegate" rights="none" pattern="HTTP" />
<!-- in order to avoid to get image with password text -->
<policy domain="path" rights="none" pattern="@*"/>
<policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPI" />
<policy domain="coder" rights="read|write" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
<policy domain="coder" rights="read|write" pattern="LABEL" />
</policymap>









share|improve this question




















  • 1




    I had a similar issue on Ubuntu 18.04. This thread helped me solve the problem: stackoverflow.com/questions/42928765/…
    – scottkosty
    Nov 28 at 17:43










  • @scottkosty Curiously, my policy.xml file already looks like the updated version.
    – CPBL
    Nov 28 at 21:12










  • Can you convert the PDF on the command line? Can you give the terminal output, if there is an error, when you try the conversion on the command line (i.e., outside of LyX)?
    – scottkosty
    Nov 28 at 23:03










  • convert myPDFfigure.pdf myPDFfigure.png works perfectly on the command line. I'm actually not clear on what the conversion that LyX needs is. PDF->png is not listed in the LyX converter definitions.
    – CPBL
    Nov 30 at 3:22








  • 1




    Great! Go ahead and add & accept your answer to mark this is solved. Glad it's sorted out!
    – scottkosty
    Dec 1 at 3:31













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have the same problem as reported Lyx, Error Converting to Loadable Format for PDFs but I am using Ubuntu 18.04, and solutions are only described for Windows and MacOS.



Here are the stderr messages if I run LyX from the command line:



convert-im6.q16: not authorized `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.eps' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.png' @ error/convert.c/ConvertImageCommand/3258.


The LyX wiki solutions https://wiki.lyx.org/LyX/FiguresInLyX also don't apply, since my versions are:




ImageMagick 6.9.7-4



Ghostscript 9.25 (2018-09-13)




My /etc/ImageMagick-6/policy.xml looks like:



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)+>
<!ELEMENT policy (#PCDATA)>
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED>
<!ATTLIST policy name CDATA #IMPLIED>
<!ATTLIST policy rights CDATA #IMPLIED>
<!ATTLIST policy pattern CDATA #IMPLIED>
<!ATTLIST policy value CDATA #IMPLIED>
]>
<!--
...(comments excised for brevity)...
-->
<policymap>
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/>
-->
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<policy domain="resource" name="area" value="128MB"/>
<policy domain="resource" name="disk" value="1GiB"/>
<!-- <policy domain="resource" name="file" value="768"/> -->
<!-- <policy domain="resource" name="thread" value="4"/> -->
<!-- <policy domain="resource" name="throttle" value="0"/> -->
<!-- <policy domain="resource" name="time" value="3600"/> -->
<!-- <policy domain="system" name="precision" value="6"/> -->
<!-- not needed due to the need to use explicitly by mvg: -->
<!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
<!-- use curl -->
<policy domain="delegate" rights="none" pattern="URL" />
<policy domain="delegate" rights="none" pattern="HTTPS" />
<policy domain="delegate" rights="none" pattern="HTTP" />
<!-- in order to avoid to get image with password text -->
<policy domain="path" rights="none" pattern="@*"/>
<policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPI" />
<policy domain="coder" rights="read|write" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
<policy domain="coder" rights="read|write" pattern="LABEL" />
</policymap>









share|improve this question















I have the same problem as reported Lyx, Error Converting to Loadable Format for PDFs but I am using Ubuntu 18.04, and solutions are only described for Windows and MacOS.



Here are the stderr messages if I run LyX from the command line:



convert-im6.q16: not authorized `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.eps' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `/tmp/lyx_tmpdir.mJCcewM29047/gconverts29047.png' @ error/convert.c/ConvertImageCommand/3258.


The LyX wiki solutions https://wiki.lyx.org/LyX/FiguresInLyX also don't apply, since my versions are:




ImageMagick 6.9.7-4



Ghostscript 9.25 (2018-09-13)




My /etc/ImageMagick-6/policy.xml looks like:



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policymap [
<!ELEMENT policymap (policy)+>
<!ELEMENT policy (#PCDATA)>
<!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED>
<!ATTLIST policy name CDATA #IMPLIED>
<!ATTLIST policy rights CDATA #IMPLIED>
<!ATTLIST policy pattern CDATA #IMPLIED>
<!ATTLIST policy value CDATA #IMPLIED>
]>
<!--
...(comments excised for brevity)...
-->
<policymap>
<!-- <policy domain="resource" name="temporary-path" value="/tmp"/>
-->
<policy domain="resource" name="memory" value="256MiB"/>
<policy domain="resource" name="map" value="512MiB"/>
<policy domain="resource" name="width" value="16KP"/>
<policy domain="resource" name="height" value="16KP"/>
<policy domain="resource" name="area" value="128MB"/>
<policy domain="resource" name="disk" value="1GiB"/>
<!-- <policy domain="resource" name="file" value="768"/> -->
<!-- <policy domain="resource" name="thread" value="4"/> -->
<!-- <policy domain="resource" name="throttle" value="0"/> -->
<!-- <policy domain="resource" name="time" value="3600"/> -->
<!-- <policy domain="system" name="precision" value="6"/> -->
<!-- not needed due to the need to use explicitly by mvg: -->
<!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
<!-- use curl -->
<policy domain="delegate" rights="none" pattern="URL" />
<policy domain="delegate" rights="none" pattern="HTTPS" />
<policy domain="delegate" rights="none" pattern="HTTP" />
<!-- in order to avoid to get image with password text -->
<policy domain="path" rights="none" pattern="@*"/>
<policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/>
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPI" />
<policy domain="coder" rights="read|write" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
<policy domain="coder" rights="read|write" pattern="LABEL" />
</policymap>






lyx ubuntu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 30 at 15:52

























asked Nov 28 at 17:38









CPBL

268210




268210








  • 1




    I had a similar issue on Ubuntu 18.04. This thread helped me solve the problem: stackoverflow.com/questions/42928765/…
    – scottkosty
    Nov 28 at 17:43










  • @scottkosty Curiously, my policy.xml file already looks like the updated version.
    – CPBL
    Nov 28 at 21:12










  • Can you convert the PDF on the command line? Can you give the terminal output, if there is an error, when you try the conversion on the command line (i.e., outside of LyX)?
    – scottkosty
    Nov 28 at 23:03










  • convert myPDFfigure.pdf myPDFfigure.png works perfectly on the command line. I'm actually not clear on what the conversion that LyX needs is. PDF->png is not listed in the LyX converter definitions.
    – CPBL
    Nov 30 at 3:22








  • 1




    Great! Go ahead and add & accept your answer to mark this is solved. Glad it's sorted out!
    – scottkosty
    Dec 1 at 3:31














  • 1




    I had a similar issue on Ubuntu 18.04. This thread helped me solve the problem: stackoverflow.com/questions/42928765/…
    – scottkosty
    Nov 28 at 17:43










  • @scottkosty Curiously, my policy.xml file already looks like the updated version.
    – CPBL
    Nov 28 at 21:12










  • Can you convert the PDF on the command line? Can you give the terminal output, if there is an error, when you try the conversion on the command line (i.e., outside of LyX)?
    – scottkosty
    Nov 28 at 23:03










  • convert myPDFfigure.pdf myPDFfigure.png works perfectly on the command line. I'm actually not clear on what the conversion that LyX needs is. PDF->png is not listed in the LyX converter definitions.
    – CPBL
    Nov 30 at 3:22








  • 1




    Great! Go ahead and add & accept your answer to mark this is solved. Glad it's sorted out!
    – scottkosty
    Dec 1 at 3:31








1




1




I had a similar issue on Ubuntu 18.04. This thread helped me solve the problem: stackoverflow.com/questions/42928765/…
– scottkosty
Nov 28 at 17:43




I had a similar issue on Ubuntu 18.04. This thread helped me solve the problem: stackoverflow.com/questions/42928765/…
– scottkosty
Nov 28 at 17:43












@scottkosty Curiously, my policy.xml file already looks like the updated version.
– CPBL
Nov 28 at 21:12




@scottkosty Curiously, my policy.xml file already looks like the updated version.
– CPBL
Nov 28 at 21:12












Can you convert the PDF on the command line? Can you give the terminal output, if there is an error, when you try the conversion on the command line (i.e., outside of LyX)?
– scottkosty
Nov 28 at 23:03




Can you convert the PDF on the command line? Can you give the terminal output, if there is an error, when you try the conversion on the command line (i.e., outside of LyX)?
– scottkosty
Nov 28 at 23:03












convert myPDFfigure.pdf myPDFfigure.png works perfectly on the command line. I'm actually not clear on what the conversion that LyX needs is. PDF->png is not listed in the LyX converter definitions.
– CPBL
Nov 30 at 3:22






convert myPDFfigure.pdf myPDFfigure.png works perfectly on the command line. I'm actually not clear on what the conversion that LyX needs is. PDF->png is not listed in the LyX converter definitions.
– CPBL
Nov 30 at 3:22






1




1




Great! Go ahead and add & accept your answer to mark this is solved. Glad it's sorted out!
– scottkosty
Dec 1 at 3:31




Great! Go ahead and add & accept your answer to mark this is solved. Glad it's sorted out!
– scottkosty
Dec 1 at 3:31










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










The solution was to edit ImageMagick's policy.xml file. Even though it was a PDF that I supplied to LyX, and LyX ends up with a PNG, it was lacking permissions for EPS (PS).



Thus, in /etc/ImageMagick-6/policy.xml I changed



<policy domain="coder" rights="none" pattern="PS" />



to



<policy domain="coder" rights="read|write" pattern="PS" />



Diagnosis all thanks to @ScottKosty; see comments following my question.






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%2f462223%2flyx-error-converting-to-loadable-format-for-pdfs-under-ubuntu%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    The solution was to edit ImageMagick's policy.xml file. Even though it was a PDF that I supplied to LyX, and LyX ends up with a PNG, it was lacking permissions for EPS (PS).



    Thus, in /etc/ImageMagick-6/policy.xml I changed



    <policy domain="coder" rights="none" pattern="PS" />



    to



    <policy domain="coder" rights="read|write" pattern="PS" />



    Diagnosis all thanks to @ScottKosty; see comments following my question.






    share|improve this answer

























      up vote
      2
      down vote



      accepted










      The solution was to edit ImageMagick's policy.xml file. Even though it was a PDF that I supplied to LyX, and LyX ends up with a PNG, it was lacking permissions for EPS (PS).



      Thus, in /etc/ImageMagick-6/policy.xml I changed



      <policy domain="coder" rights="none" pattern="PS" />



      to



      <policy domain="coder" rights="read|write" pattern="PS" />



      Diagnosis all thanks to @ScottKosty; see comments following my question.






      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        The solution was to edit ImageMagick's policy.xml file. Even though it was a PDF that I supplied to LyX, and LyX ends up with a PNG, it was lacking permissions for EPS (PS).



        Thus, in /etc/ImageMagick-6/policy.xml I changed



        <policy domain="coder" rights="none" pattern="PS" />



        to



        <policy domain="coder" rights="read|write" pattern="PS" />



        Diagnosis all thanks to @ScottKosty; see comments following my question.






        share|improve this answer












        The solution was to edit ImageMagick's policy.xml file. Even though it was a PDF that I supplied to LyX, and LyX ends up with a PNG, it was lacking permissions for EPS (PS).



        Thus, in /etc/ImageMagick-6/policy.xml I changed



        <policy domain="coder" rights="none" pattern="PS" />



        to



        <policy domain="coder" rights="read|write" pattern="PS" />



        Diagnosis all thanks to @ScottKosty; see comments following my question.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 1 at 16:03









        CPBL

        268210




        268210






























            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%2f462223%2flyx-error-converting-to-loadable-format-for-pdfs-under-ubuntu%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 send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?