{"id":196,"date":"2024-07-23T15:22:00","date_gmt":"2024-07-23T14:22:00","guid":{"rendered":"https:\/\/vgdata.dk\/blog\/?p=196"},"modified":"2024-07-23T15:22:00","modified_gmt":"2024-07-23T14:22:00","slug":"pdf-issues-with-imagemagick-and-lazarus","status":"publish","type":"post","link":"http:\/\/vgdata.dk\/blog\/?p=196","title":{"rendered":"PDF issues with imagemagick and lazarus"},"content":{"rendered":"\n<p>I ran into my first real Lazarus\/FPC issue today. There is no component for displaying or thumbnailing PDF files. I googled it a lot, and it seems there has only been developed something for creating PDFs.<br>It was to overwhelming creating a component myself, so I decide to take another route: Convert the PDF through a 3 party program, and save the output, where I wanted it.<br>Decided I would use imagemagick for this. Which gave me the next issue: &#8220;attempt to perform an operation not allowed by the security policy `PDF&#8217; @ error\/constitute.c\/IsCoderAuthorized\/421&#8221;<br>This was easier to solve this:<br><a href=\"https:\/\/stackoverflow.com\/questions\/52998331\/imagemagick-security-policy-pdf-blocking-conversion#comment94196251_53180170\">https:\/\/stackoverflow.com\/questions\/52998331\/imagemagick-security-policy-pdf-blocking-conversion#comment94196251_53180170<\/a><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/vgdata.dk\/blog\/wp-content\/uploads\/2024\/07\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"610\" src=\"https:\/\/vgdata.dk\/blog\/wp-content\/uploads\/2024\/07\/image-2.png\" alt=\"\" class=\"wp-image-197\" srcset=\"http:\/\/vgdata.dk\/blog\/wp-content\/uploads\/2024\/07\/image-2.png 680w, http:\/\/vgdata.dk\/blog\/wp-content\/uploads\/2024\/07\/image-2-300x269.png 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/figure>\n\n\n\n<p>Since I am running version 9.55 I was good!<br>So now I just need to implement the command in my Lazarus project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I ran into my first real Lazarus\/FPC issue today. There is no component for displaying or thumbnailing PDF files. I googled it a lot, and it seems there has only been developed something for creating PDFs.It was to overwhelming creating &hellip; <a href=\"http:\/\/vgdata.dk\/blog\/?p=196\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11,10,12],"class_list":["post-196","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-fpc","tag-lazarus","tag-linux-mint"],"_links":{"self":[{"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/196"}],"collection":[{"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=196"}],"version-history":[{"count":1,"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions"}],"predecessor-version":[{"id":198,"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/196\/revisions\/198"}],"wp:attachment":[{"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/vgdata.dk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}