Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Create a virtual PDF printer' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Create a virtual PDF printer
Authored by: xandros on Mar 21, '05 04:44:19AM

well i ran across an application that only allowed direct printing without the print dialog .. :/

added to that came that the files that were printed were named the same with a singlepage printout .. so i added a little snippet to the code that prevents the overwrite of an existing pdf file in the output directory .. the distinction gets made by adding multiple x to the end of the filename

the snippet has to be placed before
echo "Output file name: $OUTPUTFILENAME" >> $LOGFILE

[code]
counter=""
while [ -e ${OUTPUTFILENAME//.pdf/}$counter".pdf" ]; do
counter=$counter"x"
done

OUTPUTFILENAME=${OUTPUTFILENAME//.pdf/}$counter".pdf"
[/code]

ohh btw .. the previous poster n9yty made nearly the same modification to his refined script ..



[ Reply to This | # ]