Previous Thread
Next Thread
Print Thread
APEX Preview Error #1447 22 May 08 01:50 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
I'm printing a file from A-Shell on linux to ATE via AUXLOC: to use the windows printer selection dialog. I was running ATE 5.1.1110.1 and the print preview was working fine.

But, after installing ATE 5.1.1113.3, I'm now receiving the following error message.

[Linked Image]


Stephen Funkhouser
Diversified Data Solutions
Re: APEX Preview Error #1448 22 May 08 02:11 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
I'm not sure what is going on there. Can you turn on the SET TRACE LP ON, and/or check the debug box on the Connection Properties | Printer dialog so we can get some tracing info.

Most likely, we're going to have to work through all the pieces, which include:

1. The actual PRINT.LIT command line (presuming that it can be reproduced that way; else the XCALL SPOOL arguments.)

2. The printer init file on the host (presumably this is just DEVICE=AUXLOC: )?

3. The Settings..Preview Preferences options.

4. The Connection Properties | Printer options.

Re: APEX Preview Error #1449 22 May 08 05:06 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
Ok,

Here is the debug info with LP turned on the the debug window:

2 16:54:15 Preview launch: "C:\PROGRA~1\MICROS~4\ATE51\bin\ASHW32.exe" -i "C:\Program Files\MicroSabio\ATE51\miame.ini" -n -e -atecfg "VMWARE_KK" -pv1024 -debug PRINT prtpmt="C:\Documents and Settings\Stephen\My Documents\APEX\tskaaa-4.t0a"/SW:524288

The answer to question 2 is DEVICE=AUXLOC:prtpml. There is a prtpmt.pqi file in ASHCFG: on the ATE client; which is DEVICE=PROMPT: plus some other formatting.

This seems to have happened after changing the printer under "Print Setup" in the XTREE print preview. I accessed this via ctrl+shift+double-right-click. If I change the selected printer I get a different, random character stream, in the same error message I posted before.

Hopefully that helps.


Stephen Funkhouser
Diversified Data Solutions
Re: APEX Preview Error #1450 22 May 08 06:05 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
More questions:

1. Can I assume that DEVICE=AUXLOC:prtpml is a typo and should read DEVICE=AUXLOC:prtpmt? Otherwise, that would generate the printer not found error message (although it should give "prtpml" as the name that is not found, rather than some garbage. And the generate PRINT command line does mention prtpmt= so I'm assuming this is not the issue.)

2. The error message is occurring before the preview window displays, and after clicking OK, it reactivates the ATE window with no preview?

3. Do you have PRINT.LIT 3.0(123) in the ATE 001004 directory? (Use File | Open Local Session to check it.)

4. What happens when you use the File|Open Local Session option and issue this print command:

.PRINT PRTPMT=ASHCFG:PRTPMT.PQI/SW:524288

If that works ok, try:

PRINT prtpmt="C:\Documents and Settings\Stephen\My Documents\APEX\tskaaa-4.t0a"/SW:524288

If it doesn't work ok, use SET TRACE LP ON and then repeat it, and lets see what kind of trace messages you get then.

It seems that the printer name is getting garbled entirely on the ATE side, either in PRINT.LIT failing to pricess the command line properly, or in the processing of the printer init file. So I think we can take the host side out of the picture to simplify matters.

As for the connection with using Print Setup from the XTREE print preview window, that escapes me so far.

Re: APEX Preview Error #1451 22 May 08 06:45 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
1. Yes that was a typo.

2. That is the exact behavior

3. yes

4. I get the same error when trying the first print statement and here's the debug info:

Code
  0 18:41:23 <PRINT> Trace: prtpmt.INI : DEVICE=		PROMPT:
1 18:41:23 <PRINT> Trace: prtpmt.INI : FORMFEED=       ON
2 18:41:23 <PRINT> Trace: prtpmt.INI : PASSTHROUGH=    OFF
3 18:41:23 <PRINT> Trace: prtpmt.INI : ORIENTATION=    PORTRAIT
4 18:41:23 <PRINT> Trace: prtpmt.INI : TMARGIN=        1
5 18:41:23 <PRINT> Trace: prtpmt.INI : LMARGIN=        1
6 18:41:23 <PRINT> Trace: prtpmt.INI : LPP=            66
7 18:41:23 <PRINT> Trace: prtpmt.INI : CPP=            80,AUTO
8 18:41:23 <PRINT> Trace: prtpmt.INI : FONT=           Courier New
9 18:41:23 <PRINT> Trace: prtpmt.INI : PITCH=          AUTO
10 18:41:23 <PRINT> SPOOL file=C:\Documents and Settings\Stephen\My Documents\APEX\prtpmt-3.apf, ptr=prtpmt, switches=524288, copies=1, form=, totpages=0
11 18:41:23 <PRINT>    prefix=, suffix=, overlay=
12 18:41:23 <PRINT> Trace: PRTPMT.INI : DEVICE=		PROMPT:
13 18:41:23 <PRINT> Trace: PRTPMT.INI : FORMFEED=       ON
14 18:41:23 <PRINT> Trace: PRTPMT.INI : PASSTHROUGH=    OFF
15 18:41:23 <PRINT> Trace: PRTPMT.INI : ORIENTATION=    PORTRAIT
16 18:41:23 <PRINT> Trace: PRTPMT.INI : TMARGIN=        1
17 18:41:23 <PRINT> Trace: PRTPMT.INI : LMARGIN=        1
18 18:41:23 <PRINT> Trace: PRTPMT.INI : LPP=            66
19 18:41:23 <PRINT> Trace: PRTPMT.INI : CPP=            80,AUTO
20 18:41:23 <PRINT> Trace: PRTPMT.INI : FONT=           Courier New
21 18:41:23 <PRINT> Trace: PRTPMT.INI : PITCH=          AUTO
22 18:41:23 <PRINT> lpp=66, cpp=80, cppw=-1, width=0, tmar=1, lmar=1, fnh=-9999, fnw=0, land=1, flags=0x10005
23 18:41:23 <PRINT> Comparing 'â' to 'LPT1:' and 'QUICKEN PDF PRINTER'
24 18:41:23 <PRINT> Comparing 'â' to 'NE00:' and 'PDF-XCHANGE 3.0'
25 18:41:23 <PRINT> Comparing 'â' to 'NE01:' and 'MICROSOFT XPS DOCUMENT WRITER'
26 18:41:23 <PRINT> Comparing 'â' to 'NE02:' and 'MICROSOFT OFFICE DOCUMENT IMAGE WRITER'
27 18:41:23 <PRINT> Comparing 'â' to 'NE03:' and 'HP COLOR LASERJET 2600N'
28 18:41:23 <PRINT> Comparing 'â' to 'NE04:' and 'FAX'
29 18:41:23 <PRINT> Comparing 'â' to 'NE05:' and 'CANON IP1700'
30 18:41:23 <PRINT> Comparing 'â' to 'NE06:' and 'AUTO MICROSOFT XPS DOCUMENT WRITER ON PAIGEFLAPTOP'
31 18:41:23 <PRINT> Comparing 'â' to 'NE07:' and 'AUTO MICROSOFT OFFICE DOCUMENT IMAGE WRITER ON PAIGEFLAPTOP'
32 18:41:23 <PRINT> Comparing 'â' to 'NE08:' and 'AUTO HP COLOR LASERJET 2600N ON PAIGEFLAPTOP'
33 18:41:23 <PRINT> Comparing 'â' to 'NE09:' and 'ADOBE PDF'
34 18:41:23 <PRINT> Comparing 'â' to 'NE10:' and '\\KKVET0\PRT08'
35 18:41:23 <PRINT> Comparing 'â' to 'NE11:' and '\\KKVET0\CLP01'
36 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'LPT1:' and 'QUICKEN PDF PRINTER'
37 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE00:' and 'PDF-XCHANGE 3.0'
38 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE01:' and 'MICROSOFT XPS DOCUMENT WRITER'
39 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE02:' and 'MICROSOFT OFFICE DOCUMENT IMAGE WRITER'
40 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE03:' and 'HP COLOR LASERJET 2600N'
41 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE04:' and 'FAX'
42 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE05:' and 'CANON IP1700'
43 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE06:' and 'AUTO MICROSOFT XPS DOCUMENT WRITER ON PAIGEFLAPTOP'
44 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE07:' and 'AUTO MICROSOFT OFFICE DOCUMENT IMAGE WRITER ON PAIGEFLAPTOP'
45 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE08:' and 'AUTO HP COLOR LASERJET 2600N ON PAIGEFLAPTOP'
46 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE09:' and 'ADOBE PDF'
47 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE10:' and '\\KKVET0\PRT08'
48 18:41:23 <PRINT> Comparing 'êâ|t&#9612;' to 'NE11:' and '\\KKVET0\CLP01'
I'll plan on installing 5.1.1113.3 on another machine in the morning, and I'll let you know what happens.


Stephen Funkhouser
Diversified Data Solutions
Re: APEX Preview Error #1452 22 May 08 07:36 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
My guess is that we're picking up the corrupted printer name when attempting to get the default printer.

DEVICE = PROMPT: causes a bit of a chicken-and-egg issue with the print preview, since it would seem silly to prompt for the printer before previewing, but in order to preview, we have to establish some printer metrics. So APEX retrieves the "default" printer for the initial preview, in one of two ways:

a) If you've ever printed in APEX before, then it uses whatever printer was the current printer the last time you exited from APEX.

b) Otherwise, it makes a Windows API call to WINSPOOL.DRV to get the default printer according to Windows.

I've added a couple of trace messages to indicate which of these two is responsible. You can download the test version here: http://www.microsabio.net/dist/51dev/temphold/ash-5.1.1113.5-w32-upd.zip
If you re-run your test above, I'm only interested in the trace line that starts with GetDefaultPrinter.

If the garbage is coming from the registry, i.e. option (a) above, then the simple fix is to use RegEdit to delete the HKCU\Software\MicroSabio\A-Shell\ASHW32 folder and let it get recreated by APEX.
Otherwise, it suggests something messed up in Windows.

In either case, I should add some kind of fail-safe code to check whether the default printer we get is valid, and if not, to perhaps use the first listed printer (or maybe go ahead and prompt before the preview). But I'd first like to find out what the real cause is.

P.S. What version of Windows is this? It may well be that the Windows function that I'm using to get the default printer doesn't work prior to W2K. In that case, the workaround will be to first change your DEVICE=PROMPT: to some real printer, and use the APEX printer selection dialog to confirm that. Then exit from APEX, which will save the last settings in the registry folder above, after which you should be able to revert to DEVICE=PROMPT: (Obviously, if this is the case, I need to come up with a better method of dealing with it.)

Re: APEX Preview Error #1453 23 May 08 07:42 AM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
First, this my laptop that has the problem, so it's XP SP2. The print preview was working.

I tested my hunch that it has something to do with changing the printer under "Print Setup" in the XTREE preview. I upgraded from 5.1.1110.1 to 5.1.1113.3 on a test pc just like I did on my laptop. I tested the preview and it worked fine. Then I ran a program with an XTREE and previewed the XTREE. And, I changed the printer under the "Print Setup". I then ran the same report to test the preview, and I got the same error message with a garbled printer name.

Here is the GetDefaultPrinter trace
Code
  23 07:32:01 <PRINT> GetDefaultPrinter (from last-used in registry): â|êâ|t&#9612;
Deleting the ASHW32 folder from the registery does indeed fix this.

Also, after fixing it I changed the printer using the "Print Setup" on the preview window and it didn't cause this behavior; however, doing the same thing from the XTREE preview does.


Stephen Funkhouser
Diversified Data Solutions
Re: APEX Preview Error #1454 23 May 08 09:07 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Thanks for the analysis. Clearly the XTREE preview is saving a set of uninitialized or otherwise corrupted values to that registry folder. I should be able to track it down and resolve it in 1113.6 or 1114.0, shortly.

Re: APEX Preview Error #1455 23 May 08 10:27 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
OK, try this 5.1.1113.6 update:
http://www.microsabio.net/dist/51dev/temphold/ash-5.1.1113.6-w32-upd.zip

It also fixes a problem with the XTREE preview not remembering the previous preview window settings.

Re: APEX Preview Error #1456 23 May 08 12:52 PM
Joined: Nov 2006
Posts: 2,192
S
Stephen Funkhouser Online Content OP
Member
OP Online Content
Member
S
Joined: Nov 2006
Posts: 2,192
This does fix it!


Stephen Funkhouser
Diversified Data Solutions

Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3