Results 1 to 3 of 3

Thread: Cannot convert .jpg to .pdf

  1. #1
    Join Date
    Jul 2006
    Location
    United States
    Beans
    196
    Distro
    Kubuntu

    [SOLVED] Cannot convert .jpg to .pdf

    Hello,

    I'm having a heck of a problem getting a large number of photo scanned documents converted into a pdf or djvu. I've pretty much given up on getting them into a djvu file, but now I can't do pdf either.

    I'm using convert to try to get them converted into pdf, but after sometime (I don't know how long exactly, I always leave for atleast an hour before I check again) the terminal spits out "Bus error" as an error, and Dolphin will have crashed without an error; I'll come back to find the taskbar gone, and my desktop completely black, though all programs are still running.

    This is exactly whats going on:
    Code:
    convert *.jpg -adjoin document.pdf
    Bus error
    Any help?
    Last edited by Nexusx6; February 2nd, 2010 at 12:49 AM. Reason: Marking as solved
    Always mark your solved problems with [SOLVED] in your subject line, and post your solution!

  2. #2
    Join Date
    Jun 2008
    Location
    California
    Beans
    2,271
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Cannot convert .jpg to .pdf

    Imagemagick's convert utility has ongoing problems when converting a large number of image files. The best solution--which was mentioned in another thread on this issue--is to use the graphicsmagick program instead. It's in the repo's, and only takes about 8 MB of disk space. Also, it uses the same command-line syntax except it is preceded by gm. Thus

    Code:
    gm convert *.jpg -adjoin -compress JPEG document.pdf
    For more information on graphicsmagick see:

    http://www.graphicsmagick.org/
    Last edited by kaibob; January 29th, 2010 at 02:34 AM. Reason: Forgot compress option

  3. #3
    Join Date
    Jul 2006
    Location
    United States
    Beans
    196
    Distro
    Kubuntu

    Re: Cannot convert .jpg to .pdf

    I know its a little late, but I had to test the hell out of everything before I knew I had no more questions

    Thanks for the reply, gm works great.

    For the sake of future generations who might also run into a "bus error" from either imagemagick or graphicsmagick (I got a bus error from gm in the end), I finally found out what's causing it, and how to fix it.

    A bus error is returned (atleast, in my case) when gm or imagemagick run out of space to shove temp files to. This was happening to me because on my set up, root and home are on different partitions. The way to tell either im or gm to use a tmp folder on a larger hard drive or partition is to make a tmp directory on the larger section and point at it with

    Code:
     export MAGICK_TMPDIR=/my/big/directory
    An there you go.
    Always mark your solved problems with [SOLVED] in your subject line, and post your solution!

Tags for this Thread

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
  •