Normal Topic Printing to pdf file (Read 738 times)
magicfish
Member
*
Offline



Posts: 47
Joined: Mar 18th, 2011
Printing to pdf file
Jun 19th, 2013 at 4:51pm
Print Post Print Post  
I have a mass update that I use to print invoices on paper. I also have a similar mass update that used to print the same thing to a pdf file on my Windows XP computer but it doesn't work on my new Windows 8 machine.

The code is:
//Testing for printing to a .pdf file
//AlternateDefaultPrinter("Nitro PDF Creator")
AlternateDefaultPrinter("Nitro PDF Creator (Reader 3")

The first AlternateDefault is what worked on XP. Neither works on Win 8. The second one is what Nitro is called on Win 8.

Am I missing something?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Printing to pdf file
Reply #1 - Jun 19th, 2013 at 5:16pm
Print Post Print Post  
Does it works if you simply set the PDF printer as the system default and print (without using AlternateDefaultPrinter) from Sesame or from MSWord, notepad, etc....?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Printing to pdf file
Reply #2 - Jun 19th, 2013 at 7:06pm
Print Post Print Post  
magicfish wrote on Jun 19th, 2013 at 4:51pm:
AlternateDefaultPrinter("Nitro PDF Creator (Reader 3")

Is this a typo in your posting, or is it a possible typo in your code? Shouldn't it be:
AlternateDefaultPrinter("Nitro PDF Creator (Reader 3)")
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
magicfish
Member
*
Offline



Posts: 47
Joined: Mar 18th, 2011
Re: Printing to pdf file
Reply #3 - Jun 19th, 2013 at 7:47pm
Print Post Print Post  
Carl,
You got it! A missing bracket.
I'm surprised it tested ok. It didn't give an error, it just didn't do anything.
Thanks.
Glenn
Smiley
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Printing to pdf file
Reply #4 - Jun 19th, 2013 at 8:55pm
Print Post Print Post  
There is no syntax checking on anything inside quoted strings. But, at runtime, it may have set @error and associated functions.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged