Go Back   The macosxhints Forums > OS X Help Requests > Applications



Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 10-21-2002, 10:18 PM   #1
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
Combine TIFF files?

I'm thinking of getting the Epson Perfection 1640SU Office Scanner. It is not supported native in OS X, but it is supported by VueScan. The reason I'm getting it is because of its Automatic Document Feeder (ADF). However, while VueScan supports a "batch mode" which will produce lots of TIFF files, I would like all my TIFF files to be saved as a single PDF file.

Does anyone know any way to convert a folder of TIFF files into a single PDF document? Or even a single multipage TIFF document (one could always print and then save as a PDF)?

Thanks.
kerim is offline   Reply With Quote
Old 10-22-2002, 08:48 AM   #2
rusto
MVP
 
Join Date: Jan 2002
Location: Boston, MA
Posts: 1,489
GraphicConverter allows you to make multi-page .tiff files. I tried exporting the result as a .pdf using Preview but failed.
__________________
:: 3.4GHz Core i7 iMac 4GB RAM :: Black MacBook SR :: 10.7.2 :: iPhone 4 / iOS 5 ::
rusto is offline   Reply With Quote
Old 10-22-2002, 10:07 AM   #3
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
I have Graphic Converter, but I don't see how one goes from a folder of single TIFF files to a single Multi-page TIFF. How did you do it?

Thanks!
kerim is offline   Reply With Quote
Old 10-22-2002, 10:17 AM   #4
rusto
MVP
 
Join Date: Jan 2002
Location: Boston, MA
Posts: 1,489
1) in file menu select "Convert..." which will open the Convert window

2) navigate to inside of folder containing tiffs in left hand pane

3) select all tiffs

4) make tiff the destination format

5) in right hand pane select destination of result

6) click "Options" button, in resulting dialog box click "Multi Page" File and "Mac" for format

7) click "Convert" button, top middle of Convert window

Note: as far as I've been able to determine, the results are only viewable in GraphicConverter, neither Photoshop 7 nor Preview show anything but the first page.
__________________
:: 3.4GHz Core i7 iMac 4GB RAM :: Black MacBook SR :: 10.7.2 :: iPhone 4 / iOS 5 ::
rusto is offline   Reply With Quote
Old 10-22-2002, 11:18 AM   #5
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
That's great. I tried it and it worked. GC has a problem printing multi-page tiffs. I use Tiff-Sight to do that, and it opens the multi-page TIFFs created with GC just fine, allowing me to save them as PDFs.

Someone else pointed out that OmniPage Pro X can convert multiple TIFF files to a single multipage PDF file (with OCR) or a multipage TIFF file (without OCR).

Looks like I might be able to buy a scanner! Although the whole process is a bit of a pain. It might be worth while to wait and see if some new scanner software comes along ... But that doesn't seem likely any time soon.
kerim is offline   Reply With Quote
Old 10-22-2002, 01:36 PM   #6
rusto
MVP
 
Join Date: Jan 2002
Location: Boston, MA
Posts: 1,489
It might be worth looking into seeing if an AppleScript might help reduce the drudgery of the process.
__________________
:: 3.4GHz Core i7 iMac 4GB RAM :: Black MacBook SR :: 10.7.2 :: iPhone 4 / iOS 5 ::
rusto is offline   Reply With Quote
Old 10-22-2002, 04:59 PM   #7
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
An applescript would be great, unfortunately this is beyond my ability.

I looked at the GC web site and they have some scripts, but none that fit the bill:

http://lemkesoft.com/us_scripts.html

And I opened up the Applescript Dictionary for GC and found that they have a "concat TIFF" command!!! But without any examples to go from I don't know how one would create a script to take a whole bunch of TIFF files and concat them ...

A google search for "GraphicConverter Applescript" didn't produce much either...
kerim is offline   Reply With Quote
Old 10-22-2002, 05:17 PM   #8
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
http://www.math.ucl.ac.be/~stubbe/Mi...pleScript.html

These applescripts include a few "batch" commands, but I'm still not clear how to use them with the "concat TIFF" command...
kerim is offline   Reply With Quote
Old 10-22-2002, 05:25 PM   #9
rusto
MVP
 
Join Date: Jan 2002
Location: Boston, MA
Posts: 1,489
When I get enough time to do more than quickly browse this forum, I'll look into creating one...
__________________
:: 3.4GHz Core i7 iMac 4GB RAM :: Black MacBook SR :: 10.7.2 :: iPhone 4 / iOS 5 ::
rusto is offline   Reply With Quote
Old 10-23-2002, 11:50 AM   #10
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
I've been in touch with the developer of GC and he says that the "Convert ..." panel is not yet scriptable.

I wonder if there is not some way to do this via the terminal? Are there any command line TIFF programs?
kerim is offline   Reply With Quote
Old 10-23-2002, 12:09 PM   #11
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
This hint offers a solution using the built-in Jaguar "preview" application.

http://www.osxfaq.com/dailytips/10-2002/10-21.ws

However, there are two problems.

(1) It is very slow.

(2) There is a bug in the way Preview handles TIFF files!

http://docs.info.apple.com/article.html?artnum=107181

They all come out upside down and backwards!

Still, there is hope that apple will fix this at some point ...
kerim is offline   Reply With Quote
Old 10-23-2002, 12:11 PM   #12
rusto
MVP
 
Join Date: Jan 2002
Location: Boston, MA
Posts: 1,489
Soooo, you could send your source tiffs into Preview upsidedown and backwards to get output that is the correct orientation?
__________________
:: 3.4GHz Core i7 iMac 4GB RAM :: Black MacBook SR :: 10.7.2 :: iPhone 4 / iOS 5 ::
rusto is offline   Reply With Quote
Old 10-23-2002, 12:21 PM   #13
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
I could, but then I would need to do a third step - I would have to use GC to automatically rotate and flip all the TIFF images ...

BTW: GC has a great feature where it will automatically watch a folder and perform "convert..." actions on any files dropped in to it. However, this won't work in my case because I need it to act on multiple files at once, not one at a time! To activate this, one simply holds the command key down in the "convert" window and then the "convert" button changes to "auto-convert". But, like I said, it doesn't help me.
kerim is offline   Reply With Quote
Old 10-23-2002, 12:26 PM   #14
rusto
MVP
 
Join Date: Jan 2002
Location: Boston, MA
Posts: 1,489
Nice pit for future reference, would be handy for digi-cam users...
__________________
:: 3.4GHz Core i7 iMac 4GB RAM :: Black MacBook SR :: 10.7.2 :: iPhone 4 / iOS 5 ::
rusto is offline   Reply With Quote
Old 10-24-2002, 12:11 AM   #15
eravau
Triple-A Player
 
Join Date: Oct 2002
Location: Labadie, MO
Posts: 136
Smile

Boy is this your day. Today a hint was posted about ImageMagick being made available as an OS X package. Download this puppy and install it. Fear not the command line. This is the tool you need. Once you have installed ImageMagick, open up your friendly, neighborhood Terminal.app and cd to the directory which contains your mob of TIFFs. Then type the following command:
Code:
convert -compress JPEG -adjoin *tiff pdf:all_these_files_in_one.pdf
Notes:
  • The -compress JPEG is optional, but if you don't use it, don't be surprised if you end up with the largest PDF known to man. You could also use common compression like LZW or ZIP in place of JPEG if you wanted.
  • The *tiff could be *any_file_extension or a series of several (e.g. *jpg *gif *tif). This is case sensitive though. So *jpg is different from *JPG. Make sure you match the case(s) of your files' names.
  • The convert command has many, Many, MANY more options. If all of the images need rotated a certain amount, then you can add in another flag, -rotate degrees and all of the images will be rotated as they're stuck in the newly created PDF.
I hope this helps. If you need more details, you can send me an email . I'll try to check back here regularly, but send me an email to remind me to check here if you have questions.

Best of luck.

-Eravau

Last edited by eravau; 10-24-2002 at 12:17 AM.
eravau is offline   Reply With Quote
Old 10-24-2002, 08:09 AM   #16
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
That is great! Thanks. Some comments:

Here is the official documentation of the convert command:

http://www.imagemagick.org/www/Image...tails-compress

I am still playing with it to try to get it to work properly. I have a folder I am testing it on with 8 TIF files that are approximately 1MB each. The PDF created by Graphic Converter is only 572KB, but the one created by ImageMagick using JPEG compression (it defaults to 70%) is over 10MB!!! I tried LZW (which only seems to work uncompressed) and that was half the size, but still very large. So far ZIP seems to create the smallest PDF files - only 1.5MB. I can't see any difference in quality between the PDF images created with the different compressions.

The other compressions available are:
Quote:
Choices are: None, BZip, Fax, Group4, JPEG, Lossless, LZW, RLE or Zip.

It should be pretty easy to write an applescript for this once I have it figured out, using the "do shell script" command.

Will post back later.
kerim is offline   Reply With Quote
Old 10-24-2002, 08:41 AM   #17
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
Here is the end result of trying out all the different compressions. As you can see, ZIP was the best, but still 3x bigger than Graphic Converter's file!

JPEG 10.2 MB
Lossless 5.9 MB
GZIP 5.9 MB
RLE 5.9 MB
LZW 5.9 MB
Group4 5.9 MB
Fax 1.9 MB
Zip 1.5 MB

Does anyone know how to make this command take up less resources when it is running in the background? It seems to slow down my computer.
kerim is offline   Reply With Quote
Old 10-24-2002, 06:34 PM   #18
eravau
Triple-A Player
 
Join Date: Oct 2002
Location: Labadie, MO
Posts: 136
To give command-line utilities lower (or higher) priority, use the nice command to precede your command. The syntax is basically:

nice -n <integer from -20 to 20> <command and options>

-20 is less nice (takes more of the processor). 20 is the nicest (leaves the most processor for other apps). The command is just the command that you want to run nicely along with all of its options and flags. So in your case, you'll have something like:

nice -n 10 convert -compress ZIP *tif pdf:all_together_now.pdf

For all the info on nice, of course, read the man page. Ditto on on convert (and the other ImageMagick commands such as identify, montage, mogrify and composite.).

Last edited by eravau; 10-24-2002 at 06:47 PM.
eravau is offline   Reply With Quote
Old 10-24-2002, 07:03 PM   #19
eravau
Triple-A Player
 
Join Date: Oct 2002
Location: Labadie, MO
Posts: 136
By the way, I'm a little bit confused by your compression results. I got very different results from you with JPEG and ZIP compression. I started with 3 color portraits as TIFFs (@ 2048 x 1536) that totaled 28.6 MB. The ZIP compressed PDF is 20.4 MB. The default JPEG compression produces a 917 KB PDF. The JPEG compressed PDF at 60% is 622 KB. I didn't see any distracting artifacts at either of the JPEG settings, but I doubt I would take the quality any lower.

I'm not sure what's causing the difference. Maybe you have a different kind of image. Are you scanning pure black and white (non-grayscale)? That would probably make ZIP a better choice. Whereas I'm working on color photos which compress beter with JPEG.
eravau is offline   Reply With Quote
Old 10-24-2002, 08:08 PM   #20
kerim
Major Leaguer
 
Join Date: Jan 2002
Posts: 311
Thanks for the help!

Yes, I am using B&W document images, although I'm not sure if they are greyscale or not. When I get my scanner and Vuescan set up, however, I will have more control over the nature of the initial TIFF files, so maybe I can figure a way to make the final result smaller.

Now the trick will be to write an applescript to automate the process. Ideally, it should take a folder of images, convert all the TIFs inside to a PDF file at the same level as the folder, give the PDF file the same name as the folder, and then delete the folder. Shouldn't be too hard to do, but it will take me a while!
kerim is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.