WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Plugins >> PDF Fit To Page
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1187246183

Message started by AndyH on Aug 16th, 2007 at 8:36am

Title: PDF Fit To Page
Post by AndyH on Aug 16th, 2007 at 8:36am
Hi all,

Can I modify my batch file so that it forces acrobat to fit the document to the printable area prior to printing it?

What other options are available to pass to acrobat? (/p /h etc....)

Thanks in advance

Andy

Title: Re: PDF Fit To Page
Post by Gert on Aug 16th, 2007 at 11:04am
Hello Andy,

Acrobat doesn't have a commandline option for that - it is quite limited. If you want all PDF's resized to, for example, 80% of their original size you could use ImageMagick to do that: http://www.imagemagick.org/script/index.php

Change the wd.bat file found in the directory
<task directory>\<yourtaskname>

<task directory>: press CTRL+9 inside the watchDirectory Control Center to explore this directory
<yourtaskname>: the name of your task

Use notepad to open wd.bat, and find the following lines

Code (]
"%GDPUTIL%" -runkill %SECONDS% "%ACROCMD%" %OPTIONS% "%WD_FILE%"
%ANNOTATE% Info done
[/code):

Now change this to
[code]SET WKDIR=C:\Temp
"C:\Program Files\ImageMagick\convert.exe" -resize 80% "%WD_FILE%" "%WKDIR%\%WD_FILE_N%"
"%GDPUTIL%" -runkill %SECONDS% "%ACROCMD%" %OPTIONS% "%WKDIR%\%WD_FILE_N%"
%ANNOTATE% Info done


This will create a new (resized) PDF in the C:\Temp directory (make sure that directory is not monitored by WD), and print that PDF instead.

Hope this helps,

Gert

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.