Page 1 of 1

Select printing paper based on pdf size

Posted: Thu Apr 09, 2015 6:18 pm
by doh
Hi,

I wonder i can create flow if the overall image is less than 8"*10.5" then it would choose to print to 8.5"*11" paper but if it is a larger image it would set to print 11" * 17" paper using switch or pittstop pro server.

thank you.

Re: Select printing paper based on pdf size

Posted: Thu Apr 09, 2015 7:50 pm
by dkelly
Sure you can. Switch's metadata can collect statistics about a job including PDF page size. You can route jobs using the connection line's "Condition with variables" with 2 conditions that check the page width and height are less than or equal to 612 and 792 respectively (8.5 x 11 inches in point units). If the page size is greater than that you would route to the other connection.

A couple of gotchas:
  • Switch only collects stats about the 1st page in the PDF
  • The units are in points not inches
  • Be careful about rounding problems. Set the precision value to 0 or 2 so the page size values are consistently formatted
If you need to examine more than the 1st page of a PDF I'd recommend using Apago's PDFspy software. There's a configurator includes with every Switch install.

Re: Select printing paper based on pdf size

Posted: Thu Apr 09, 2015 7:56 pm
by doh
thank you for the quick response.
now i know that switch can assign different route based on size of paper but where i set the size of printing paper?

Re: Select printing paper based on pdf size

Posted: Thu Apr 09, 2015 10:18 pm
by dkelly
I gave the detail above. The variables are: [Stats.PageWidth:Precision="2"] and [Stats.PageHeight:Precision="2"]

Re: Select printing paper based on pdf size

Posted: Thu Apr 09, 2015 11:41 pm
by doh
Yes i understand that i can set the route depends on paper of the size.
But how and where can i make printer to print pdf on 11*17 size paper if its bigger than letter size pdf?

Thank you very much.

Re: Select printing paper based on pdf size

Posted: Fri Apr 10, 2015 3:16 pm
by dkelly
Scale the page size with Pitstop, pdfToolbox, PDF Enhancer or an Acrobat script.

Re: Select printing paper based on pdf size

Posted: Fri Apr 10, 2015 3:34 pm
by doh
Image Image

Image Image

I thought i would be able to let switch automatically select those paper sizes and paper sources like what i would do manually in the picture.
Problem is if i set Yes for the 'Auto-choose paper source' in property. it would choose best fitting paper size for pdf so that is not always either letter or 11*17.
I want printer to choose only letter or 11*17 if its bigger than letter size.

Thank you

Re: Select printing paper based on pdf size

Posted: Fri Apr 10, 2015 7:29 pm
by dkelly
Switch has no built-in support for sending files to a printer via print driver.

Re: Select printing paper based on pdf size

Posted: Fri Apr 10, 2015 7:36 pm
by doh
okay
thank you for your time

Re: Select printing paper based on pdf size

Posted: Mon Apr 13, 2015 9:36 am
by _olq
Hello,
you can do it using the "Execute command" and Ghostscript.
There is parameter -sPAPERSIZE, but I don't see parameter for Paper source.

Re: Select printing paper based on pdf size

Posted: Tue Apr 14, 2015 6:23 pm
by doh
can you show me screenshot of flow and property panel? I would very appreciate.
also, i wonder if i need to install something to learn ghost script on switch.

Thank you

Re: Select printing paper based on pdf size

Posted: Wed Apr 15, 2015 1:31 pm
by _olq
Hi,
flow might look like this
Image

In Arguments line:

Code: Select all

-sDEVICE=mswinpr2 -dBATCH -dNOPAUSE -dNoCancel -sPAPERSIZE=a3 -sOutputFile="%printer%HPLaserJet" "%1"
Where "HPLaserJet" is name of your printer
Output: None

Re: Select printing paper based on pdf size

Posted: Wed Apr 15, 2015 8:44 pm
by doh
Sorry.. forgot to tell you that switch is running on mac. do you know what should i have instead of "mswinpr2"

thank you

Re: Select printing paper based on pdf size

Posted: Thu Apr 16, 2015 9:25 am
by _olq
Unfortunately, I do not know mac.
See this page: http://www.gnu.org/software/ghostscript/devices.html
I suspect that you can use os2prn, or specified driver.

Re: Select printing paper based on pdf size

Posted: Thu Apr 16, 2015 3:47 pm
by doh
thank you so much for your help. :)