Solved

PostScript Conversion Problem

Posted on 2004-09-01
7
1,080 Views
Last Modified: 2013-12-03
Hi,

I'm making an app to convert scanned images to PDF documents. I do this in 3 steps:
1 - Scan the document to a mulitpage TIFF format
2 - Convert the TIFF file to a PostScript File
3 - Using Acrobat Distiller, convert the PostScript file to PDF.

Steps 1 and 3 I've managed easily enough, but step 2 (Converting TIFF {or jpeg} image files to postscript) is where I'm having some trouble.

I'm using a Fujitsu fi-4120C scanner, which comes with Adobe 6 Standard (this is where I got Distiller). It also has a small command-line application included in the scanning utility - TIFF2PS.exe.

Using Device Manager, I've discovered that the scanner's application uses this program to convert scanned images to ps before pdf'ing them. I'm trying to do the same, but I think my parameters are wrong. I'm using -- tiff2ps 00001.tif > 00001.ps. The output file is being created, but without any data in!

I've done a number of searches (on google), and this application seems to be a standard Linux/Unix conversion tool. But the scanner's default software uses this same app in Windows XP (successfully), so I'm obviously doing something wrong on my side!

The reason I'm not using the default scanning sw, is because I'm writing my own app to control the scanner usage - it logs the users who scan documents, as well as the actual docs... (basically its a small doc-management app). I need to get this done as soon as I can, so any help would be much appreciated!

Thanks in advance to all of you!

Regards,

Angela
0
Comment
Question by:Angel-Cake
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 8

Expert Comment

by:mxjijo
ID: 11956668

You must have already seen the link
http://www.die.net/doc/linux/man/man1/tiff2ps.1.html

Usually it should accept the same command line syntax on Windows as well.
try tiff2ps /?
or
tiff2ps --help
or just
tiff2ps
to get the supported options
try tiff2ps 00001.tif and see it it outputs anything ..

I would say try -p and -e option as well.




Have you tried any of the command line options ?
0
 
LVL 1

Expert Comment

by:rpz
ID: 11957996
Actually, Ghostscript can make PDF files directly, using ps2pdf. Without checking the syntax for each command, I guess you could just do something like
cat scan.tif | tiff2ps| ps2pdf > scan.pdf
If you got Photoshop with your scanner, you can easily convert your scanned images to PDF (either directly from the scanner source or by importing the TIFF). You can even make a small EXE file that allows you to drop TIFF files and output PDF files.
0
 
LVL 1

Expert Comment

by:rpz
ID: 11958014
Sorry, I forgot. About your scanner's version of tiff2ps, maybe it's not exactly the same version. Try
tiff2ps < input.tiff > output.ps
Just a thought. :)
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

by:Angel-Cake
ID: 11960959
Hi mxjijo,
Thanks for the quick response,
The help params have no response with my tiff2ps, neither does just calling it with no params. Calling it without specifying an output creates no output. I've tried all the params on the site you mentioned (I've come across many with the same info in my google searches), with no results. Each results in a 400kb ps file, which, when run in Distiller, produces no PDF. The only repsonse I get is when I call tiff2ps -f <filename>. Here I get a 600kb ps from an 11Mb tiff. Converting this ps to PDF, I get a pdf - blank.

Hi rpz,
Thanks to you, too,
I tried Ghostscript before discovering that Adobe's Distiller works as well, and since Distiller is shipped with the particular scanner I'm working with, I'd prefer to use it if possible. I do not have Photoshop. The aim of my app is to control the scanning around the office. The scenario is this: there are a number of scanners around the office. To scan a document, a user logs into my scanning app (which logs all of his/her actions), places the documents in the scanner, names the doc, and presses scan. In the background, the app scans the doc to tiff, converts the tiff to ps, and the ps to pdf, which is saved on a pre-set network drive for future reference.
 The scanner comes with ScandAll 21, which can scan direct to PDF, but this way there is no control over the scanner usage (the reason I'm having this problem in the first place). This is why I'm creating my own app.
I tried your recommendation on the tiff2ps, and as with all my previous attempts got a 0kb ps as an output.

Thanks to both of you for your advice. If you have any more ideas, please let me know. I'm willing to try anything at this point!

Thanks again! I appreaciate your efforts!

Angela
0
 
LVL 1

Accepted Solution

by:
rpz earned 500 total points
ID: 11962199
I'm in a hurry so I hadn't time to test this, but check out
http://gnuwin32.sourceforge.net/packages/tiff.htm
There's a tiff2ps inside the "Binaries" ZIP file. You probably need the whole thing, so maybe you should try the Setup choice. It's mentioned on libtiff.org, so it should be syntax compatible with the previous posting (I think).
Good luck!
0
 

Author Comment

by:Angel-Cake
ID: 11962387
Thanks, I'll definitely try that! I'll let you know if it works. Thanks again for all your help!
0
 

Author Comment

by:Angel-Cake
ID: 11970698
Thanks, rpz,
It works! Now all I have to do is round up the smaller bits of my app! I appreciate all your help! Thanks again,

Angela
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
In a previous article here at Experts Exchange (http://www.experts-exchange.com/articles/18414/Create-a-PDF-file-with-Contact-Sheets-montage-of-thumbnails-for-all-JPG-files-in-a-folder-and-each-of-its-subfolders-using-an-automated-batch-method.html)…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question