Community Forum

Printing to a non-default printer

Profile Image 2 Posts 2 Karma
shirls posted this 04 June 2018

Hi,

Does scriptX contain anything that would allow me to print to a non-default printer?

I have already captured the printer name(s) that I am interested in. I was hoping that I could remove some old VBScript with a cleaner solution. 

thanks.

Scot.

Profile Image 189 Posts 189 Karma
Jerry posted this 04 June 2018
Profile Image 2 Posts 2 Karma
shirls posted this 05 June 2018

Hi Jerry,

Thanks for the reply. I have tried this out and it is working but with a new side effect. 

When the printer prints It now includes padding top and left of around 1cm. If  I remove the printer set line and manually set the printer to default I get no padding when printing. 

My current script is:

factory.printing.portrait = false

    factory.printing.header = ""

    factory.printing.footer = ""

    factory.printing.leftMargin = 0

    factory.printing.topMargin = 0

    factory.printing.rightMargin = 0

    factory.printing.bottomMargin = 0

    factory.printing.copies = <%=Convert.ToInt16(Session["sCopies"])%>

   ' factory.printing.printer = "<%=Session["printToMe"]%>"     

	factory.printing.Print(false)

 Any ideas?

Scot.

 

Post Edited 05 June 2018

Profile Image 189 Posts 189 Karma
Jerry posted this 05 June 2018

1/. If you're targeting a printer, make 'factory.printing.printer' your first line so that every subsequent attribute is called against that specific printer.

 

2/. Unprintable areas:

 

Open a 'vanilla' pane in IE and go to File | Page Setup.

 

Set each margin measure at "0" and OK out of the dialog.

 

Now go to File | Page Setup.again.

 

The margin values shown now are the unprintable area values that the printer driver returns to Windows, and less than which you can't set. 

 

Cheers

 

Jerry

Post Edited 05 June 2018

Profile Image 189 Posts 189 Karma
Jerry posted this 05 June 2018

BTW, if you're a licensee please talk to us on feedback@meadroid.com

 

Tx