SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Imagick pdf to jpeg conversion produces low quality image?

    I saved a PDF page in acrobat as JPG and it's 2600x4200 and looks great. I converted the same PDF to jpg and it produces a 600x1000 image that's not legible. Any ideas what I can do to fix it?

    PHP Code:
    header("Content-Type: image/jpeg");
    $Page = new Imagick("document.pdf[0]");
    $Page->setCompressionQuality(100);
    $Page->setResolution(300,300);
    $Page -> setImageFormat('jpeg');
    echo 
    $Page


    Edit: I did notice that just outputting the first document page with no conversion results in the same quality, so the conversion isn't the issue. I wonder if Imagick can deal with PDFs that are this large?

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2012
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Turns out setResolution needs to be called prior to the document. lol


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •