Solved

PostScript Conversion Problem

Posted on 2004-09-01
7
1,069 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
  • 3
  • 3
7 Comments
 
LVL 8

Expert Comment

by:mxjijo
Comment Utility

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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Angel-Cake
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now