Prepending a pdf and printing

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Decimator

Prepending a pdf and printing

Post 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
Last edited by Decimator on 2009-02-27T12:21:13-07:00, edited 1 time in total.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Prepending a pdf

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Decimator

Re: Prepending a pdf

Post 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.
Post Reply