Author Topic: Envelope Printer program not sending data to any printer  (Read 19051 times)

0 Members and 1 Guest are viewing this topic.

Offline retiredtech

  • Newbie
  • *
  • Join Date: Aug 2014
  • Posts: 4
  • Karma: 0
    • View Profile
Envelope Printer program not sending data to any printer
« on: August 19, 2014, 09:10:33 am »
Prior to 1.4.0 the program printed just fine on my network printers.  With both 1.4.0 and 1.4.1 when you hit the "print envelope" the button blinks but no data is sent to any printer.  I tried various envelope sizes and trays but none of the printers show any data in their print queue.   All existing programs will print (Word, WordPerfect etc.)
Running Windows 7 Pro. 
Any ideas?

By the way your verification is a real pain!!

Richard

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #1 on: August 19, 2014, 09:35:14 am »
Quote
By the way your verification is a real pain!!

That is all built into the forum software, I dont control it. But you dont have to worry about it now after you make your first post it wont ask again :-)

Quote
Prior to 1.4.0 the program printed just fine on my network printers.  With both 1.4.0 and 1.4.1 when you hit the "print envelope" the button blinks but no data is sent to any printer.  I tried various envelope sizes and trays but none of the printers show any data in their print queue.   All existing programs will print (Word, WordPerfect etc.)

The print code in the program hasnt changed at all. Same in the current version as it has been in all the others. Have you restarted the system yet to allow everything to refresh? I know some people leave their systems on all the time and sometimes windows just needs rebooted to refresh everything. The program is priting fine for me on 5 different systems that I have all printing to different printers.

So lets start with the basics and do a reboot first.

The code in the program is very basic, I just use the printer.print command and the OS itself handles it from there. So if it isnt printing then something else is going on, so we need to cover all the bases :wink:

Shane

Offline retiredtech

  • Newbie
  • *
  • Join Date: Aug 2014
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #2 on: August 21, 2014, 09:40:32 am »
Resolved (kind of)

I finally loaded the program on my 8.1 machine and it works just fine.  So there is no issue with your program.  My Win 7 machine has got something that is preventing that print routine from working.  I will work on it and it I find a definitive solutions I will post it here.
Sorry for the "cry wolf".

Richard

Offline retiredtech

  • Newbie
  • *
  • Join Date: Aug 2014
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #3 on: August 21, 2014, 10:01:54 am »
Resolved (fully!)

Should have done this in the beginning....Removed program and cleaned up all traces, then download and re-install....All is well!

Richard

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #4 on: August 21, 2014, 11:49:56 am »
So reinstalling my program got it to work again?

Thats odd, same code, came version program.

Of course the installer for the program does include the VB6 runtime files and will update them if for any reason a runtime file is missing or out of date.

Shane

Offline retiredtech

  • Newbie
  • *
  • Join Date: Aug 2014
  • Posts: 4
  • Karma: 0
    • View Profile
SOLVED - Envelope Printer program not sending data to any printer
« Reply #5 on: August 21, 2014, 01:03:05 pm »
See previous posts for resolution...

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: SOLVED - Envelope Printer program not sending data to any printer
« Reply #6 on: August 21, 2014, 01:10:13 pm »
See previous posts for resolution...

I did. You said it worked fine o your other system, but didnt on windows 7 system. Then your next post was
Quote
Should have done this in the beginning....Removed program and cleaned up all traces, then download and re-install....All is well!

You said program, so I guess you mean the envelope printer. So I was confirming that. :cheesy:

Shane

Offline rpesq

  • Newbie
  • *
  • Join Date: Jul 2014
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #7 on: August 22, 2014, 04:27:30 pm »
RPESQ again--
Same problem here -- not printing on Win 7 64-bit, running as Limited User.  I had not tried the newest version.  It just does nothing when you press print.

Older versions worked.  I will try to retrieve one from my recycle bin and post back when the problem arose.  So now, though, only older version works.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #8 on: August 22, 2014, 04:31:54 pm »
Does it print fine on a admin user on the same system?

Also on the system as the limited user, does all the printer info show up? Such as printer supported sizes, the paper bin and dpi?

Reason why I ask is I am trying to find out if there might be something that is simply not giving permissions to the program to print.

I also wouldnt mind connecting to you and taking a look as well :-)

Shane

Offline rpesq

  • Newbie
  • *
  • Join Date: Jul 2014
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #9 on: August 22, 2014, 04:34:09 pm »
FOUND THE PROBLEM in 1.4.1-

Problem exists when you uncheck ENABLE PICTURE PRINTING -- won't print.

If you leave that enabled, then it will print.

So there is your bug.  Since I never print a picture, I would prefer that the bug be fixed.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #10 on: August 22, 2014, 04:46:58 pm »
Quote
So there is your bug.  Since I never print a picture, I would prefer that the bug be fixed.

Well even if you did print a picture I would still fix the bug :-D

I will dig in and try to find the bug and get a fix and a new version out on monday :-)

Also I just tried it and you are correct, since I can replicate it I can fix it :-)

Shane

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #11 on: August 22, 2014, 05:09:04 pm »
Fixed.

Now I just need you to test. I have attached the new exe. it is v1.4.2, extract it from the zip file and then replace the current exe of the program.

This was a odd bug and was actually in the vb6 runtimes and Windows API.

In the old version of the program I was calling "Printer.Print" to print out the text, nice and easy. Well in the newer versions I needed to be able to print Unicode characters (Such as Japanese and others) and "Printer.Print" doesn't handle it well. So instead I call a Windows API called TextOut
http://msdn.microsoft.com/en-us/library/windows/desktop/dd145133%28v=vs.85%29.aspx

So this works fine. But here is where the bug is. When you print and use the logo with it the "Printer.PaintPicture" is called first (The logo prints first), then the call to TextOut (Which prints out the 2 addresses). But when you dont use the logo TextOut is called first and that is where it failed.

By simply adding in 1 line of code
Printer.Print " "    (Printing a blank space)

It then works just fine without the logo. Seems to be a bug where you have to print something to the printer first BEFORE calling TextOut in Windows.

So it was just that 1 line of code to fix it. Test it out and let me know how it does for you :-)

Shane

Offline rpesq

  • Newbie
  • *
  • Join Date: Jul 2014
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #12 on: August 22, 2014, 05:19:18 pm »
Seems to work.  But the exe, windows is asking whether I want to run it or not.  Your previous Printer exe's, this did not require me to give such permission.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #13 on: August 22, 2014, 05:21:42 pm »
They should have, the .manifest file in the program folder tells windows to ask to run it as an administrator. I only have that for people who need to load a picture file outside of their profile.

The exe doesnt control windows asking for permissions, the manifest file does.

Shane

Offline rpesq

  • Newbie
  • *
  • Join Date: Jul 2014
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #14 on: August 22, 2014, 05:23:44 pm »
It is definitely behaving different.  I did drop it in the folder (Portable version) with that manifest file present.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #15 on: August 22, 2014, 05:26:11 pm »
No, it should have always been asking for permission to run (Only if the UAC is on), but I think I know what is happening.

Since you downloaded it off the net windows may have a security warning on it. Right click on the exe and go to properties, then down towards the bottom you should have an unblock button, if you do click that and that should make the security warning go away.

Shane

Offline rpesq

  • Newbie
  • *
  • Join Date: Jul 2014
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #16 on: August 22, 2014, 05:43:05 pm »
1) I always DL and run the PORTABLE version.  It has a security shield on its logo always, but never asks for permission to run.  I edit the manifest to eliminate the Admin requirement.

2) this new EXE does not have the shield on it, and it always aks me to run.

3) FWIW, previous versions of this app (always Portable), it DID work when you uncheck the Print photo option, so you must have made changes to the code from earlier versions that I DL'd.  They worked fine.  I will try to figure out when the bug started, I will try to do that later tonight.

Offline rpesq

  • Newbie
  • *
  • Join Date: Jul 2014
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #17 on: August 22, 2014, 05:50:16 pm »
Regarding not printing when Picture is unchecked...

OK, version 1.2.0 worked fine.  Printed fine with Picture unchecked.

1.3.0 does not work.
1.4.0 does not work.
1.4.1 does not work.

Suggestion.  If you like your old code, you could always include (and default to using) a 1px clear.gif for people who do not want a photo printed.  So unchecking that option would simply enable your 1px clear.gif.  Sort of like the old webpage HTML hacks.
« Last Edit: August 22, 2014, 05:52:35 pm by rpesq »

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Re: Envelope Printer program not sending data to any printer
« Reply #18 on: August 22, 2014, 05:57:23 pm »
Quote
1) I always DL and run the PORTABLE version.  It has a security shield on its logo always, but never asks for permission to run.  I edit the manifest to eliminate the Admin requirement.

2) this new EXE does not have the shield on it, and it always aks me to run.

Yes, but that is because you are downloading it from the main site, this new exe you are getting from the forums. Windows adds a data stream to a file to show that it came from another system. (I use this tool to remove those streams from a file)
http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx

This page here just has some more deeper info on the data streams
http://blog.case.edu/bes7/2009/06/18/remove_the_security_warning_on_files_downloaded_with_firefox_30_and_35

So because you got the new exe off the forum I have a feeling that is what is causing the prompt, because the manifest file is hard coded with the exe, I keep them separate. So there is no way for my program to tell windows to ask for permissions to run without it. (Limitation of VB6)

The 1.4.2 exe and the 1.4.1 exe is like maybe 5 lines of code different. So if it isn't the admin prompt coming up then it is the stream on the file causing it.

Quote
OK, version 1.2.0 worked fine.

1.3.0 does not work.
1.4.0 does not work.

Yes I explained that. Look at the change log here
http://www.tweaking.com/content/page/tweaking_com_envelope_printer.html

Quote
v1.3.0
Per user request, the program now supports Unicode!

Which a few posts ago I said how in the newer versions I had to use a windows api to print the unicode and the bug is the api fails unless you print something, anything to the printer first. :wink:

I found the bug and fixed it :-)

Shane