PolicyError during converting PDF to Image using wand











up vote
-1
down vote

favorite












I am converting PDF to image using Wand. Everything was working fine for few days, my code is below:



img = Image(filename=file, resolution=300)


but today I am getting error:




PolicyError at /path/.pdf



not authorized
`/home/raghavendra/karnataka/scanned_pdf_csv/media/mg3_ItYNfUX.pdf' @
error/constitute.c/ReadImage/412




I am using python.



Thanks










share|improve this question
























  • are you using mac? try brew install ghostscript first, or double check that you PATH of the file is correct and that exists
    – Dejan Marić
    Nov 8 at 13:00










  • stackoverflow.com/questions/42928765/…
    – Dejan Marić
    Nov 8 at 13:02










  • No, i am using Ubuntu.
    – raghu
    Nov 8 at 13:19












  • how to edit policy.xml file in ubuntu? Where it is exists?
    – raghu
    Nov 8 at 13:31















up vote
-1
down vote

favorite












I am converting PDF to image using Wand. Everything was working fine for few days, my code is below:



img = Image(filename=file, resolution=300)


but today I am getting error:




PolicyError at /path/.pdf



not authorized
`/home/raghavendra/karnataka/scanned_pdf_csv/media/mg3_ItYNfUX.pdf' @
error/constitute.c/ReadImage/412




I am using python.



Thanks










share|improve this question
























  • are you using mac? try brew install ghostscript first, or double check that you PATH of the file is correct and that exists
    – Dejan Marić
    Nov 8 at 13:00










  • stackoverflow.com/questions/42928765/…
    – Dejan Marić
    Nov 8 at 13:02










  • No, i am using Ubuntu.
    – raghu
    Nov 8 at 13:19












  • how to edit policy.xml file in ubuntu? Where it is exists?
    – raghu
    Nov 8 at 13:31













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I am converting PDF to image using Wand. Everything was working fine for few days, my code is below:



img = Image(filename=file, resolution=300)


but today I am getting error:




PolicyError at /path/.pdf



not authorized
`/home/raghavendra/karnataka/scanned_pdf_csv/media/mg3_ItYNfUX.pdf' @
error/constitute.c/ReadImage/412




I am using python.



Thanks










share|improve this question















I am converting PDF to image using Wand. Everything was working fine for few days, my code is below:



img = Image(filename=file, resolution=300)


but today I am getting error:




PolicyError at /path/.pdf



not authorized
`/home/raghavendra/karnataka/scanned_pdf_csv/media/mg3_ItYNfUX.pdf' @
error/constitute.c/ReadImage/412




I am using python.



Thanks







python image pdf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 13:45









Dejan Marić

436112




436112










asked Nov 8 at 12:56









raghu

13535




13535












  • are you using mac? try brew install ghostscript first, or double check that you PATH of the file is correct and that exists
    – Dejan Marić
    Nov 8 at 13:00










  • stackoverflow.com/questions/42928765/…
    – Dejan Marić
    Nov 8 at 13:02










  • No, i am using Ubuntu.
    – raghu
    Nov 8 at 13:19












  • how to edit policy.xml file in ubuntu? Where it is exists?
    – raghu
    Nov 8 at 13:31


















  • are you using mac? try brew install ghostscript first, or double check that you PATH of the file is correct and that exists
    – Dejan Marić
    Nov 8 at 13:00










  • stackoverflow.com/questions/42928765/…
    – Dejan Marić
    Nov 8 at 13:02










  • No, i am using Ubuntu.
    – raghu
    Nov 8 at 13:19












  • how to edit policy.xml file in ubuntu? Where it is exists?
    – raghu
    Nov 8 at 13:31
















are you using mac? try brew install ghostscript first, or double check that you PATH of the file is correct and that exists
– Dejan Marić
Nov 8 at 13:00




are you using mac? try brew install ghostscript first, or double check that you PATH of the file is correct and that exists
– Dejan Marić
Nov 8 at 13:00












stackoverflow.com/questions/42928765/…
– Dejan Marić
Nov 8 at 13:02




stackoverflow.com/questions/42928765/…
– Dejan Marić
Nov 8 at 13:02












No, i am using Ubuntu.
– raghu
Nov 8 at 13:19






No, i am using Ubuntu.
– raghu
Nov 8 at 13:19














how to edit policy.xml file in ubuntu? Where it is exists?
– raghu
Nov 8 at 13:31




how to edit policy.xml file in ubuntu? Where it is exists?
– raghu
Nov 8 at 13:31

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2fstackoverflow.com%2fquestions%2f53208207%2fpolicyerror-during-converting-pdf-to-image-using-wand%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53208207%2fpolicyerror-during-converting-pdf-to-image-using-wand%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

Landwehr

Reims

Javascript gets undefined on array