Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Printer Commands - Envelope Feeder (Read 2890 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Printer Commands - Envelope Feeder
Mar 18th, 2006 at 4:07am
Print Post Print Post  
Ray -

I'm addressing this to you since you provided the following code (except that I changed the printer name from HP LaserJet 5 to HP LaserJet 4250, to reflect my new printer).
Code
Select All
AlternateDefaultPrinter("HP LaserJet 4250")
PrintPagePaper(20)
Newpage(950,412)
PrintString("Spencer Wulwick", 30, 25, 0, "Arial", 14, 0)
PrintString("210 South Hale Avenue", 30, @PageExtentY(), 0, "Arial", 14, 0)
PrintString("Tampa, FL 33609-3933", 30, @PageExtentY(), 0, "Arial", 14, 0)

PrintString(Mail Name, 450, 200, 0, "BArial", 16, 0)
PrintString(Address1 + " " + Apt, 450, @PageExtentY(), 0, "BArial", 16, 0)
PrintString(City + ", " + State + "  " + Zip, 450, @PageExtentY(), 0, "BArial", 16, 0)

FinishPage()  



I just installed the new printer and I am having the same problem that I had with the old printer.  The envelope prints fine except that it prints on letter pager instead of an envelope which is in an envelope feeder inserted into tray 1.

Is there any other portion of the code (other than the printer name which I already changed) that I could use to have it print on an envelope pulling it from the envelope feeder?

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Printer Commands - Envelope Feeder
Reply #1 - Mar 18th, 2006 at 6:36am
Print Post Print Post  
Can you add and define another Windows printer, same physical unit, but using envelope feeder as default paper source?  Name it as "Envelope Printer" for easy distinction.

Then you could use Sesame to use alternate default printer when printing the envelope, then switching back to normal default printer.

Print letter(s)......
AlternateDefaultPrinter(printername)
Print envelope(s)......
RestoreDefaultPrinter()

See page 43 of Programming Guide.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Printer Commands - Envelope Feeder
Reply #2 - Mar 18th, 2006 at 2:35pm
Print Post Print Post  
Bob -

I had tried that with both the HP 5 and the new printer and that does not work.

The new printer has quickset features so I am trying to avoid setting up more than one printer definition for the new printer.  (Had it worked I would have at least used it for the "time being.")

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Foster
Ex Member


Re: Printer Commands - Envelope Feeder
Reply #3 - Mar 20th, 2006 at 3:32pm
Print Post Print Post  
At work we use HP Laserjet printers with 1 regular paper tray and 1 door that opens an optional tray for letterhead paper, envelopes, etc.  Just opening this tray causes printer to try there first and if empty then goes to regular paper tray.  I did not do setup so do not know if this is default setting or something you change.  Hopefully your printer can be set do try tray one first.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Printer Commands - Envelope Feeder
Reply #4 - Mar 20th, 2006 at 3:33pm
Print Post Print Post  
Hello Spencer,

PrintPagePaper(20) is going to print on B9 paper which is a european paper, I believe. You will want to use PrintPagePaper(30).


-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Printer Commands - Envelope Feeder
Reply #5 - Mar 20th, 2006 at 5:05pm
Print Post Print Post  
Ray -

I remember there was some confusion about paper size 20 vs 30 (for me at least -- when I first tried it with my laserjet 5).

I have, however, changed it to 30 and it still pulls from paper tray 2 which is letter size paper.

In our earlier conversation, I remember you saying something to the effect that you were going to add a command to identify which paper tray to pull from.  Has that been done yet?  If not, any idea when it can be expected?

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Printer Commands - Envelope Feeder
Reply #6 - Mar 20th, 2006 at 6:55pm
Print Post Print Post  
Hello Spencer,

It has been in since 1.1.1, I believe. The command you are looking for is PrintPageTray(). I do not believe it is in the programming guide.

Syntax is 

PrintPageTray(Tray Number as Int)

Tray Numbers are
0: USER
1: ONLYONE
2: LOWER
3: MIDDLE
4: MANUAL
5: ENVELOPE
6: ENVMANUAL
7: AUTO 
8: TRACTOR
9: SMALLFMT
10: LARGEFMT 
11: LARGECAPACITY
12: CASSETTE
13: FORMSOURCE

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: Printer Commands - Envelope Feeder
Reply #7 - Mar 20th, 2006 at 7:03pm
Print Post Print Post  
Is there also a @PrintPageTray() to return the value of the current tray so it can be restored to current value?

  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Printer Commands - Envelope Feeder
Reply #8 - Mar 20th, 2006 at 7:11pm
Print Post Print Post  
Hello obfusc88,

No there is not. However, passing a value of -1 to PrintPageTray() will clear the value. The printer will then use the same tray that it would have used if PrintPageTray() was  not called.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: Printer Commands - Envelope Feeder
Reply #9 - Mar 20th, 2006 at 7:40pm
Print Post Print Post  
Thank you, I think that should work OK.

  
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Printer Commands - Envelope Feeder
Reply #10 - Mar 21st, 2006 at 10:07pm
Print Post Print Post  
Ray -

I tried using the code for the envelope (and, since letter size paper is my "default," I preceded each attempt with -1)

PrintPageTray(-1)
PrintPageTray(5)

I tried using the code for the "middle" tray (since there is no choice for "upper" & the letter feed is on the bottom

PrintPageTray(-1)
PrintPageTray(3)

I even tried using the code for the "manual" feed

PrintPageTray(-1)
PrintPageTray(4)

I tried using the code for "auto" to see if the page size would be sufficient to id the envelope)

PrintPageTray(-1)
PrintPageTray(7)

I tried "tractor" hoping that might somehow id the envelope feeder

PrintPageTray(-1)
PrintPageTray(8)

In every case, the printing was done on letter size paper from the lower tray.

Is there anything else you can suggest?  Just give me a few minutes while I run out to buy another ream of paper.  lol

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Printer Commands - Envelope Feeder
Reply #11 - Mar 21st, 2006 at 10:13pm
Print Post Print Post  
Hello Spencer,

You do not need to say PrintPageTray(-1) before each call. You would  only need to say this if you wanted to switch back to the printer's defaults.

Where are you putting the call to PrintPageTray() in your code?

What is your complete code?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Printer Commands - Envelope Feeder
Reply #12 - Mar 21st, 2006 at 11:31pm
Print Post Print Post  
Ray -

Code
Select All
	AlternateDefaultPrinter("HP LaserJet 4250")
	PrintPagePaper(20)
	PrintPageTray(5)
	Newpage(950,412)
	PrintString("Spencer Wulwick", 30, 25, 0, "Arial", 14, 0)
	PrintString("210 South Hale Avenue", 30, @PageExtentY(), 0, "Arial", 14, 0)
	PrintString("Tampa, FL 33609-3933", 30, @PageExtentY(), 0, "Arial", 14, 0)

	PrintString(Mail Name, 450, 200, 0, "BArial", 16, 0)
	PrintString(Address1 + " " + Apt, 450, @PageExtentY(), 0, "BArial", 16, 0)
	PrintString(City + ", " + State + "  " + Zip, 450, @PageExtentY(), 0, "BArial", 16, 0)

	FinishPage()
 

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Printer Commands - Envelope Feeder
Reply #13 - Mar 22nd, 2006 at 12:01am
Print Post Print Post  
Spencer,

Try setting that printer (temporarily) as your system's default printer and remove the AlternateDefaultPrinter() call from your code. Also, you seem to still be printing to B9 paper.
  

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



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Printer Commands - Envelope Feeder
Reply #14 - Mar 22nd, 2006 at 2:31am
Print Post Print Post  
Ray -

I changed the code to PrintPagePaper(30).

Here's the story about the 20 vs 30.  I use the program Stamps.Com. Stamps.com prints an image that is LARGER than a #10 envelope.  The reason is that it doesn't want a border (even 1/8th inch) that most printers will leave.  In order for the Post Office to accept their image, the bar code needs to print at the exact edge of the page.  When I use Stamps.Com, I tell the printer that the envelope size is B9 (OR acutally I think it's B5 and I got mixed up); it leaves the border for the larger size requested but since it actually prints on a #10 envelope, it prints right to the edge of the paper.  On my old printer, I used to get a message that said "Load B9 (or B5)"; however, this printer is set to accept any size and it prints fine on the #10 envelope.

Back to the issue.  My HP LaserJet 4250 IS my default printer; however, it is set for letter paper.  When I left it "as is" and removed the AlternateDefaultPrinter() call from the code, I got a message from the printer telling me to load tray 1. The envelope feeder IS IN tray 1; however, there is still a "slot" available for manual feed.

When I inserted an envelope into tray 1 (the manual feed slot), the printer printed; however, it printed in portrait mode rather than landscape mode ... so all that showed on the envelope was the return address SIDEWAYS.

I even tried changing the printer default setup to automatically select envelope and it still printed on letter paper from tray 2.

I then changed the default printer to show tray 2 NOT available and it STILL printed from tray 2.

Please keep in mind that my normal setting for the default printer is letter size paper with the envelope feeder available.  If I use MS Word and use the wizard to print an envelope, it prints correctly on the envelope.

If I use Stamps.Com with my normal printer default setting, it prints from on an envelope.

Everything works except for the printer codes in Sesame. 

Any other ideas?
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print