Page Index Toggle Pages: [1] 2 3  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) Envelopes from print spec (Read 10212 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Envelopes from print spec
Apr 23rd, 2005 at 4:51pm
Print Post Print Post  
Hi -

Well I need to revisit prininting an envelope using print specs.

Unfortunately, I have never been able to get Windows to recognize an "alternate" printer, using Sesame.  So, for now at least, I have set my default printer for envelopes.

I am using the following code:

Code
Select All
AlternateDefaultPrinter("Envelopes")
PrintPagePaper(20)
Newpage(950,412)
PrintString("Herbert Teicher", 30, 25, 0, "Arial", 14, 0)
PrintString("26 McDonald Street", 30, @PageExtentY(), 0, "Arial", 14, 0)
PrintString("Staten Island, NY  10314-5055", 30, @PageExtentY(), 0, "Arial", 14, 0)

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

PrintString("Thanks for supporting The Middle Villager Newsletter", 30, 800, 0, "Arial", 8, 0)

FinishPage()
 



The return address prints just fine.  The merged data prints just fine.  But, for some reason, the last line "Thanks, etc." will  not print at all.  I have varied the coordinates to be sure that I wasn't going "off the page" or trying to "back-up" etc. but nothing seems to work.  HELP!!!

Also, is there any way to provide a code to tell Sesame to print an envelope for the entire set of retrieved records?

Thanks!

  

- 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: Envelopes from print spec
Reply #1 - Apr 23rd, 2005 at 5:53pm
Print Post Print Post  
Quote:
Hi -

Well I need to revisit prininting an envelope using print specs.

Unfortunately, I have never been able to get Windows to recognize an "alternate" printer, using Sesame.  So, for now at least, I have set my default printer for envelopes.

I am using the following code:

Code
Select All
AlternateDefaultPrinter("Envelopes")
PrintPagePaper(20)
Newpage(950,412)
PrintString("Herbert Teicher", 30, 25, 0, "Arial", 14, 0)
PrintString("26 McDonald Street", 30, @PageExtentY(), 0, "Arial", 14, 0)
PrintString("Staten Island, NY  10314-5055", 30, @PageExtentY(), 0, "Arial", 14, 0)

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

PrintString("Thanks for supporting The Middle Villager Newsletter", 30, 800, 0, "Arial", 8, 0)

FinishPage()
 



The return address prints just fine.  The merged data prints just fine.  But, for some reason, the last line "Thanks, etc." will  not print at all.  I have varied the coordinates to be sure that I wasn't going "off the page" or trying to "back-up" etc. but nothing seems to work.  HELP!!!

Also, is there any way to provide a code to tell Sesame to print an envelope for the entire set of retrieved records?

Thanks!



The coordinates of 30 by 800 would be off the page, by a good bit. The height limit specified in the NewPage command is 412. Have you tried using a y coordinate of less than 412?

To print every record in a result set - use mass update.
  

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: Envelopes from print spec
Reply #2 - Apr 23rd, 2005 at 8:16pm
Print Post Print Post  
Mark -

The truth be known, I believe I got confused with the X,Y coordinates but believe I had tried less than 400.

In any event, I just tried it with 300 and it still didn't print.

The mass update info will be helpful, providing I can get that last line to print.

Any other suggestions?

Thanks!
  

- 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: Envelopes from print spec
Reply #3 - Apr 23rd, 2005 at 8:37pm
Print Post Print Post  
Try using coordinates that are printing already, like 450, 200 or 30, 25. Also, remember to place a space in front of the font name if it is not bold or italic - i.e. " Arial". (page 136 of the programming manual).

Once you have it printing, then move it gradually in the direction you want, until some portion of it doesn't print.
  

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: Envelopes from print spec
Reply #4 - Apr 23rd, 2005 at 10:26pm
Print Post Print Post  
Mark -

Finally, I got the line to print.  I think the problem was that I didn't have a space in front of the font name.  I did want it to print in italics, so I added the letter "I" without any space and that worked.

I trust that I will understand how to use the mass update feature to print the retrieved records.  If I have a problem with that issue, I'll come back here.

The last thing I would like to know is when you think the new print specs will be released. It is a real nuisance to have my default printer set to envelopes, because most of my routine printing is done on letter size paper .... and the envelope printing is intermittent.

Thanks!
« Last Edit: Apr 25th, 2005 at 3:30pm by SpencerWulwick »  

- 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: Envelopes from print spec
Reply #5 - Apr 25th, 2005 at 2:15pm
Print Post Print Post  
Hello Spencer,

What new print specs? If you have version 1.1.1 you should have all you need to make this happen. In 1.1.1 there is an SBasic command named PrintPageTray() which allows you to set which tray the printer should get paper from. 5 is Envelope so put the following line in your programming and see what happens. You will want it after AlternateDefaultPrinter.

Code
Select All
PrintPageTray(5) 



-Ray

p.s. This is Ray, The Cow is Mark.

-edit- I forgot to mention this command is undocumented and only lightly tested.

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
  

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
AlternateDefaultPrintRe: Envelopes from print spec
Reply #6 - Apr 25th, 2005 at 4:09pm
Print Post Print Post  
Ray -

You asked:

Quote:
What new print specs?


A while ago, on the forum, I was told that commands "were coming out" (or words to that effect) that would tell the printer which tray to use.  I assumed that when they were developed, they would be communicated.  So ...... I was waiting for them to be developed.

In any event, I tried using the PrintPageTray command and still no luck.

Perhaps you (or Mark) can look at my code and see if I am overlooking something. 

Code
Select All
AlternateDefaultPrinter("Auto HP LaserJet 5 - Envelopes")
PrintPagePaper(20)
PrintPageTray(5)
Newpage(950,412)
PrintString("Spencer Wulwick (MVR)", 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(Street Address + " " + Apt, 450, @PageExtentY(), 0, "BArial", 16, 0)
PrintString(City + ", " + State + "  " + Zip, 450, @PageExtentY(), 0, "BArial", 16, 0)

FinishPage()
 



I am, by the way, using an HP LaserJet 5M with an envelope feeder that inserts into a slot on the printer.

One variation I tried was in the name of the printer.  The windows setup for the printer is just as it is shown in the above code.

The programming guide says to use the name of the "shared printer."  So, I made the printer shareable (even though I don't need it set up that way) and assigned the share name ENVELOPES.  Even if I change the printer name from AUTO HP LASERJET 5 - ENVELOPES to ENVELOPES, it makes no difference.

I also tried the "auto" setting (7) and neither did that make a difference.

The envelope feeder works perfectly from other programs, such as MS Word, etc.

It would be a great help if I could get this to work so that I can set my default printer back to the way I want it.

Thanks!
  

- Spencer

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



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Envelopes from print spec
Reply #7 - Apr 25th, 2005 at 4:33pm
Print Post Print Post  
Ray/Mark -

I'm wondering whether the numbers in the Programming guide - for the type of paper to use - are correct ..... of if possibly they are printer-specific dependant.

Originally, I was told to use "20" for envelopes.

I just looked in the programming guide and here's what I found.

1 = A0
2 = A1
3 = A2
4 = A3
5 = A4
6 = A5
7 = A6
8 = A7
9 = A8
10 = A9
11 = B0
12 = B1
13 = B2
14 = B3
15 = B4
16 = B5
17 = B6
18 = B7
19 = B8
20 = B9
21 = B10
22 = C5E
23 = DLE
24 = Executive
25 = Folio
26 = Ledger
27 = Legal
28 = Letter
29 = Tabloid
30 = Envelope

So, I tried modifying my programming by changing "20" to "30" for the paper type.

I got a message (on my printer) that told me to load legal-size paper .... and indeed, when printed, it was formatted for legal-size paper.

Likewise, I tried "27" and that, too, told me to load legal-size paper.

« Last Edit: Apr 26th, 2005 at 6:32am by SpencerWulwick »  

- 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: Envelopes from print spec
Reply #8 - Apr 25th, 2005 at 4:42pm
Print Post Print Post  
Hello Spencer,

I had forgotten that PrintPageTray was undocumented which was why I was wondering what other commands you were looking for. I though Mark had said it would be out in 1.1.1 but undocumented. anyways

Quote:
The programming guide says to use the name of the "shared printer."  So, I made the printer shareable (even though I don't need it set up that way) and assigned the share name ENVELOPES.  Even if I change the printer name from AUTO HP LASERJET 5 - ENVELOPES to ENVELOPES, it makes no difference.


No difference as it still prints to the Laserjet 5 on letter paper or no difference as it doesn't print?

The AlternateDefaultPrinter() command can use both the local name for the printer and the shared name for the printer. The 1.1 documentation has been updated to say this.

-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: Envelopes from print spec
Reply #9 - Apr 25th, 2005 at 4:49pm
Print Post Print Post  
Ray -

"Makes no difference" meaning it prints to the letter tray.

You may have responded before you saw my later post regarding the numbers to use for the paper type.

Repeating, using "20" (which I was told to use for envelopes) prints to letter size paper.

Using "30" - which the programming guide says to use for envelopes - tells me to load legal-size paper.

Using "27" - which the programming guide says to use for legal-size paper - tells me to load legal-size paper.

  

- 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: Envelopes from print spec
Reply #10 - Apr 25th, 2005 at 5:03pm
Print Post Print Post  
Quote:
Ray/Mark -

I'm wondering whether the numbers in the Programming guide - for the type of paper to use - are correct ..... of if possibly they are printer-specific dependant.

Originally, I was told to use "20" for envelopes.


Hello Spencer,

Who told you to use 20 for envelopes?

As far as I am aware the numbers in the documentation are correct.

From what I remember you have two printers correct? A LaserJet5 and an OfficeJet all-in-one.
Which one do you want to be your normal day to day default printer?
Change your system so that printer is the default printer.
Try using the below code. Replace "Auto HP LaserJet 5" witht he name of your plain jane LaserJet 5 not the one you set up for envelopes

Code
Select All
AlternateDefaultPrinter("Auto HP LaserJet 5")
PrintPageTray(5)
Newpage(950,412)
PrintString("Am I on a Letter?", 30, 25, 0, "Arial", 14, 0)
FinishPage()
 



If it is not on a letter try PrintPageTray(6).

-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: Envelopes from print spec
Reply #11 - Apr 25th, 2005 at 5:53pm
Print Post Print Post  
Ray -

This is getting more and more complicated and I am getting more and more confused.

First, yes, I do have two printers on this particular computer.  My most common default setting is for the HP LaserJet 5 - One-sided.  From time-to-time, I might periodically change it to the HP Officejet 7210 All-In-One. 

Regarding use of 20 for envelopes, I went back to my original post on the forum and couldn't find anyone telling me to use 20 for envelopes .... unless I misread your "code" (the print is rather small).

It was you who told me to use 30.   Every time I try 30 (and I just tried it again), it tells me to load legal-size paper.

Until now I never had a "plain jane" LaserJet 5 setting (other than when I first installed the printer). 

The reason is that I have many options for my printer.  I can print:

letter one-sided
Letter head-to-head
letter head-to-foot
legal size
manual feed
envelope feeder

When I first started with a simple LaserJet 5 setting, I found that I kept having to change the properties when using different paper options.  So, I simply set up a paper-specific printer for each option I might want and that has always worked very well for me.

In any event, I just added a "new" printer as simply HP LaserJet 5 and didn't change the default settings.

I tried the code you provided and it printed on letter (I was a bit confused because I would have thought the question would be "Am I on an Envelope?" ... because that is my objective). 

In any event, it printed on letter.  I tried changing the PrintPageTray to 6 and it still printed on letter.

Any chance I could call to clarify any of this?
  

- 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: Envelopes from print spec
Reply #12 - Apr 26th, 2005 at 12:54am
Print Post Print Post  
Spencer, try this:


Make both of your printers shareable.
Write down the names they use as Shared Printers
Write down the name of your computer as a network name.


Go to a command prompt
Type NET VIEW to see the printers and their names.

Try to capture them with NET USE:
NET USE LPT2:  \\computername\sharedprintername

Does that work?  If yes, try using those names in the Sesame commands for printers.  Remember to use the double quotes.

AlternateDefaultPrinter("\\computername\sharedprintername")
Do your print stuff:
PrintString("STUFF")
FinishPage()
RestoreDefaultPrinter()

  



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: Envelopes from print spec
Reply #13 - Apr 26th, 2005 at 6:31am
Print Post Print Post  
Bob -

This is going to get me "old" before my time.  (What do you mean "too late")  lol

I am only using one printer for printing envelopes, so I only made that one shareable (I can't imagine why the other printer would come into play at all).

When I type NET VIEW, it only gives me the computer name as
\\OFFICE and tells me that "The command completed successfully"

Quote:
Try to capture them with NET USE:
NET USE LPT2:  \\computername\sharedprintername


I wasn't sure whether you meant to literally type computername\sharedprintername ....  or office\envelopes, so I tried it both ways (substituting LPT1 which is my actual printer port used).

In either case I get "System error 85 has occurred.  The local device name is already in use.

In any event, I went ahead and tried the programming you recommended using

Code
Select All
AlternateDefaultPrinter("\\office\envelopes")
 




The printer status window bounces between 1 to 4 documents in queue and reads spooling, printing, deleting ad infinitium.  It never prints and just goes on and on until I cancel the job.

My hair is already gray.  What color do you think it will turn after this?   lol
  

- 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: Envelopes from print speccat
Reply #14 - Apr 26th, 2005 at 1:04pm
Print Post Print Post  
Spencer,
Most printer drivers on MS OSs, have a set of dialog boxes that control two aspects of the behavior of the printer. The "pages" of these two aspects appear almost identical - yet are not identical. The first of these appears on the "General" tab under the button labeled "Printing Preferences". The other appears on the "Advanced" tab, under the button labeled "Printing Defaults". On the defaults dialog there are settings for Paper/Quality, and "Advanced". Under the "Advanced" button on the "Defaults" dialog there are setting for Paper Sizes. On the "Paper/Quality" tab of the "Defaults" dialog, there are settings for "Paper Source" and tray selection.

Do not confuse these settings for the identical settings that appear on the "General" tab of the main printer dialog box - though it would be wise to make sure that they both agree and that they both agree with your expectations for that printer in regard to paper sizes and trays.
Microsoft has attempted to generalize the trays/paper sizes with the following table:

DMBIN_USER;
DMBIN_ONLYONE;
DMBIN_LOWER;
DMBIN_MIDDLE;
DMBIN_MANUAL;
DMBIN_ENVELOPE;
DMBIN_ENVMANUAL;
DMBIN_AUTO;
DMBIN_TRACTOR;
DMBIN_SMALLFMT;
DMBIN_LARGEFMT;
DMBIN_LARGECAPACITY;
DMBIN_CASSETTE;
DMBIN_FORMSOURCE;

Unfortunately, this table can only roughly correspond to the actual settings as devised by the author of the actual printer driver. For example, by no means can this table accomodate the likelihood that there may be more than one manual feed, or tray containing envelopes. Because, this may be non-specific, Microsoft, has also, incorporated in the development tools the ability to specify a paper size. The driver is then supposed to use the assignment of paper size to a particular tray to determine the appropriate tray to use for any selected paper size. This works only as well as the driver will let it, based on the settings that have been assigned to that driver.

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send Topic Send Topic Print Print