• contact
  • about
Home

convert a multi page pdf to a single image

rene — Mon, 07/12/2010 - 15:08

Task at hand was to convert a 110 page PDF to an image format. JPEG or PNG would do. Solution was to use the powerful convert command from the imagemagick suite of tools. Here is how.

First install imagemagick

$ sudo apt-get install imagemagick

Next convert your PDF to JPEG (1 PDF page per JPEG image) using %04d with the destination filename which will force convert to create filenames that contain 4 decimals with leading 0's counting upwards from 0 (eg; document_0000,jpg, document_0001.jpg, document_0002.jpg)

$ convert document.pdf document_%04d.jpg

Finally use convert to append all JPEG images into a single image.

$ convert document_0*.jpg -append document.jpg

If you get an error with the amount of pixels the final JPEG image contains, you will need to use another image format. JPEG only allows a maximum of 65500 pixels for width or height.

$ convert document_0* -append document.jpg
convert: Maximum supported image dimension is 65500 pixels `document.jpg' @ jpeg.c/EmitMessage/232.

Try using GIF or PNG if you do get this error though do keep in mind these are
lossless image formats so the filesize of the final image can be quite large.

$ convert docuent_0* -append document.png


photos im taking

Bus laneThat wayYellow red yellow red yellow redHer leadNight crossing in ClaytonWalk with careFire hydrant in ClaytonPear upside down cakeGlass of wine with a wine barrelPancakes in the afternoon. NOMsThe Cuckoo in OlindaEastern Beach, GeelongThe Geelong maestroHawthorn vs Geelong at the MCGSt Marys church in GeelongSeaplane at Eastern Beach in GeelongMiss Marples Sundae BestChristmas in July at Miss Marplesfound in old album store in Sassafrasoutside tea store in sassafrasEarl and green teaphoto.JPGantique store in the dandenongschicken parmigiana at rangersbruschetta at rangers in the dandenongstimeball towerDO NOT USE 50 cents!!!veggie patch week 2Port Phillip Bay from WilliamstownHMAS Castlemaine at Gem Pier, Williamstown

about me


Passionate Systems Engineer.
Want to know more?

search rene.bz

what im reading

  • Step 224: The Value of Discipline
  • Pirate Bay Founder’s Flattr Opens To The Public, Vote For Sites You Visit With Money
  • Apple Pulls Camera+ From The App Store After Its Developers Reveal A Contraband Feature
  • Google Begins Rapid Iteration Plan With Chrome 6 Beta Deployment
  • Oracle outlines Solaris 11, says little of OpenSolaris
  • 9 Helpful Tips To Deal With Negative People
  • Step 221: Entrepreneurs Equally Confident and Vulnerable
  • Step 220: Life on Our Own Terms
  • Digg To AOL Exodus Claims Biz Dev VP Bob Buch
  • Step 218: Thinking and Doing Are Two Different Things
  • Pivoting 101
  • A word of advice from my father about being frugal.
  • Fighting the summer productivity blahs
  • App Update: BlurFX
  • The elements of change
  • The Life Changing Nature of Gratitude
  • Evernote Essentials: The definitive guide to using Evernote
  • 9 Expert Tips For Better Writing
  • Coburg, Melbourne #iphoneography
  • Media Exponential
more

what im bookmarking

  • 7.2. re — Regular expression operations — Python v2.7 documentation
  • 7.2. re — Regular expression operations — Python v2.7 documentation
  • Intel® Xeon® Processor Family
  • GettingStarted - apt-cyg - Getting started with apt-cyg - Project Hosting on Google Code
  • GettingStarted - apt-cyg - Getting started with apt-cyg - Project Hosting on Google Code
  • Ten launches channel Eleven
  • Ten launches channel Eleven
  • access.redhat.com | Red Hat Knowledgebase: How do I find the FC ID (WWN) of a disk/LUN on Red Hat Enterprise Linux 5?
  • access.redhat.com | Red Hat Knowledgebase: How do I find the FC ID (WWN) of a disk/LUN on Red Hat Enterprise Linux 5?
  • Squid access.log
  • Squid access.log
  • WIPmania - WorldIP free geolocation database, service and tools - free database
  • WIPmania - WorldIP free geolocation database, service and tools - free database
  • MediaCorp wins copyright case - Managing Intellectual Property - March 2010
  • MediaCorp wins copyright case - Managing Intellectual Property - March 2010
  • Web VCR site revives Net TV debates - CNET News
  • Web VCR site revives Net TV debates - CNET News
  • RecordTV.com to sell assets - CNET News
  • RecordTV.com to sell assets - CNET News
  • Channel's Seven, Nine and Ten set to launch new channels this year
more
  • contact
  • about