Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4038882
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:31:47+00:00 2026-05-20T12:31:47+00:00

I am trying to convert a PDF to a JPG with a PHP exec()

  • 0

I am trying to convert a PDF to a JPG with a PHP exec() call, which looks like this:

convert page.pdf -resize 716x716 page.jpg

For some reason, the JPG comes out with janky text, despite the PDF looking just fine in Acrobat and Mac Preview. Here is the original PDF:

http://whit.info/dev/conversion/page.pdf

and here is the janktastic output:

http://whit.info/dev/conversion/page.jpg

The server is a LAMP stack with PHP 5 and ImageMagick 6.2.8.

Can you help this stumped Geek?

Thanks in advance,

Whit

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:31:47+00:00Added an answer on May 20, 2026 at 12:31 pm

    ImageMagick is just going to call out to Ghostscript to convert this PDF to an image. If you run gs on the pdf, you get the same badly-spaced output.

    I suspect Ghostscript isn’t handling the PDF’s embedded TrueType fonts very well. If you could change your output to either embed Type 1 fonts or use a “core” PostScript font, you’d get better results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert the first page of a PHP generated PDF to an
I'm trying to convert the math presented on this paper: http://www.bouncingchairs.net/pskalman-lategecco.pdf Around page 3
I'm trying to convert this delimited PDF to an excel (or some other delimited
I'm trying to convert PDF to IMG (JPG) with help PHP. I'm using imagick
I am trying to convert a PDF to JPEG: $ convert pdf-test.pdf pdf-test.pdf.jpg However,
I am trying to convert a html page to pdf using command-line convertor WKHTMLTOPDF.
I have been trying to convert an html page to PDF with out any
I am trying to use ghostscript to convert a pdf to jpg from inside
I am trying to convert a multi-page PDF file into a bunch of JPEGs,
please bear with my newbie questions.. I was trying to convert PDF to PNG

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.