• contact
  • about

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

Red Hat Enterprise Linux 6 beta 2 released

rene — Thu, 07/01/2010 - 10:27

Fortune 500 company Red Hat, are working towards a production release of RHEL6 and have released beta 2.

The formal announcement can be found on the rhelv6-announce list with the release notes found here.

The unfortunate folk who chose to deploy Xen as their hypervisor with RHEL5 will be burnt with RHEL6. RHEL6 will not support the Xen hypervisor though is supported as a Xen guest.

Amongst the Technology Previews we have pacemaker, TPM tools, remote auditd support and btrfs.

first steps into building a sustainable food source

rene — Tue, 06/29/2010 - 23:49

Last weekend was certainly out of the ordinary for me. I spent most of it away from the keyboard, walking the Royal Botanic Gardens of Melbourne and doing some gardening for the first time in my life. Yes, I'm building my first vegetable garden.

It was an alien feeling for me and after the first several minutes I felt a slight sense of accomplishment albeit spending only 3 minutes in the garden. I suppose it was a combination of my first steps into building a sustainable food source, building something with my hands (instead of my fingertips hacking away at a keyboard) and being outdoors in the dirt.

A few days after my foray into building my first sustainable food source I watched Jamie Olivers TED talk on the inspiring grassroots movement of changing the way people eat. Jamie is tackling the obesity epidemic head on by educating children about the fundamentals on nutritional foods and practical cooking skills whilst challenging Corporate America to change the culture of junk food.

The talk lives at http://www.ted.com/talks/jamie_oliver.html. Find more information on the movement here and here

"I wish for your help to create a strong, sustainable movement to educate every 
child about food, inspire families to cook again and empower people everywhere
 to fight obesity.”

- Jamie Oliver

yum repo and package dependencies with puppet

rene — Mon, 06/28/2010 - 19:11

Over the last couple of months I've been using puppet to help scale out sysadmin tasks. As puppet manifests are based on a declarative programming language I've discovered you can not rely on flow control such as 'drop in a RPM GPG key, then configure repo foo. Once both of those tasks are done install package bar from repo foo' unless you add some smarts.

This is how I install a package on a RHEL5/CentOS/Fedora type system which depends on a yum repo first which in turn depends on a GPG key.

Within the puppet manifest first define a file resource for the GPG key that RPM needs to install packages from the EPEL repository

file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL":
    owner => root,
    group => root,
    mode => 0444,
    source => "puppet:///yum/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"
}

The yum puppet module I have has RPM-GPG-KEY-EPEL in /etc/puppet/modules/yum/files/etc/pki/rpm-gpg/ on the puppetmaster server.

Next define a yumrepo resource with the repo details. Note the 'require' attribute which references the GPG key file resource.

yumrepo { "epel":
    mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch',
    enabled => 1,
    gpgcheck => 1,
    gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL",
    require => File["/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL"]
}

Finally the package resource which references the yumrepo resource.

package { [
        "nginx",
        "rtpproxy"
        ]:
    ensure => latest,
    require => Yumrepo[ "epel" ],
}

the best day ever?

rene — Tue, 06/01/2010 - 20:44


found on twitter

  • « first
  • ‹ previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • next ›
  • last »
Syndicate content

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

  • The Twitter Engineering Blog: Cassandra at Twitter Today
  • 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
more
  • contact
  • about