Page 1 of 1

Prepending a pdf and printing

Posted: 2009-02-26T12:45:36-07:00
by Decimator
I am attempting to use Imagemagick to clean up a carbon copy scanned pdf, then append it to another pdf, then send it to an output pdf. The problem I'm having is that I either end up with the two pages out of order, or it runs levels on both. I only want it to run levels on the carboncopy, because it makes info.pdf look terrible.

How do I make it only run the levels on the carbon copy, and place info.pdf first in the sequence?

Current command(via a windows shortcut)
"C:\Program Files\ImageMagick-6.4.9-Q16\convert.exe" -density 600 info.pdf -density 600 carboncopy.pdf -level 0%,100%,0.15 output.pdf

Re: Prepending a pdf

Posted: 2009-02-26T16:42:15-07:00
by el_supremo
You can put brackets around the carbon copy operation like this:

Code: Select all

"C:\Program Files\ImageMagick-6.4.9-Q16\convert.exe" -density 600 info.pdf ( -density 600 carboncopy.pdf -level 0%,100%,0.15 ) output.pdf
Pete

Re: Prepending a pdf

Posted: 2009-02-27T08:59:44-07:00
by Decimator
Thanks, that worked.

Now, instead of sending it to output.pdf, how do I print it to a printer named "Automated PDF Converter"

I am trying to use this command(via a windows batch file):

Code: Select all

"C:\Program Files\ImageMagick-6.4.9-Q16\convert.exe" -density 600 pack.pdf ( bill.pdf -level 0%%,100%%,0.15 ) | "C:\Program Files\gs\gs8.63\bin\gswin32c.exe"  -sDEVICE=mswinpr2  -dNoCancel -sOutputFile="%%printer%%Automated PDF Converter"
Which outputs this:

Code: Select all

C:\Program Files\ImageMagick-6.4.9-Q16>"C:\Program Files\ImageMagick-6.4.9-Q16\convert.exe" -density 600 pack.pdf ( bill.pdf -level 0%,100%,0.15 )   | "C:\Program Files\gs\gs8.63\bin\gswin32c.exe" -sDEVICE=mswinpr2  -dNoCancel -sOutputFile="%printer%Automated PDF Converter"
GPL Ghostscript 8.63 (2008-08-01)
Copyright (C) 2008 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>convert.exe: unbalanced parenthesis `)' @ convert.c/ConvertImageCommand/2762.