Difference in Preview Printing and Direct Printing

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Difference in Preview Printing and Direct Printing

Postby IDEAL Software Support » Tue Nov 23, 2004 5:06 pm

Version: VPE3.5
Software: Progress 9.1D
Printer: Zebra LP 2844 (paper size in Windows defined as 6.25" x
1.5")

We're trying to print 6.25" x 1.5" barcode labels using a Zebra
printer. We are printing labels to adhere to our inventory bins.
The barcodes themselves will be 2-4 characters and a check digit i.e.
A1 or AF6 or DB89 (1-2 characters + 1-2 numbers)

If I define the paper size as Letter, go to the preview page, and
print from there it looks and prints fine.

If I print directly to the printer using PrintDoc, it apparently
tries to add a 1.25" margin, thereby leaving me with only .25" of the
barcode and text printed.

I tried adding:
chReport:SetDefOutRect(0, 0, 380, 1580).
but it seemed to have no effect.

Why would the preview window print it differently than printing
directly?


Now, if I define the paper size within VPE as user-defined 380 x
1580, it will lock up and become a runaway process if I try to define
the text size greater than 40. I want the letters of the bin to be
as big as possible. If I don't go higher than 40 it prints fine
either directly or through the preview.

Question 2 would be why does it lock up if I go higher than 40?

If anyone has a solution for either method, I'll be happy!


The code looks like this:

chReport:opendoc.
chReport:PenSize = 0.

chReport:TextAlignment = {&ALIGN_CENTER}.
chReport:Write(0,805,380,1575, SUBST("[B S 92 'ARIAL']
&1", "A1")).

chReport:setbarcodeparms(2,2).
chReport:barcode(10,10,800,375, 6, c_bin + STRING(iLoop),"").

IF c_preview THEN DO:
chReport:Previewdoc(-1,-1,-1,-1,1).
PAUSE 60000.
END.
ELSE DO:
chReport:SetUpPrinter(c_prt,{&PRINTDLG_ONFAIL}).
chReport:PrintDoc(FALSE).
END.
chReport:closedoc.

Regards,
Ron
Last edited by IDEAL Software Support on Tue Nov 23, 2004 5:07 pm, edited 1 time in total.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 5:06 pm

>>
Why would the preview window print it differently than printing
directly?
<<

There is no such reason, except your code does something different when
the preview is shown. I examined your code and in fact: if you are NOT
showing the preview, you call SetupPrinter() which is not done when the
preview is shown.

Solution: call SetupPrinter() in either case, i.e. move the call to
SetupPrinter() a few lines higher in your code.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 5:07 pm

we have just experienced some major headaches with a
Zebra XiIIIPlus printer. A label I needed to print
showed perfectly nice in VPE but when printing the
Zebra printer started doing weird things.
The printer crashed, printed the label off-position
etc.

Having called in help from both our key-customer and
the printer supplier we determined that the
'automatic' paper length configuration executed by the
printer itself was the problem. We have now removed
this automatic feature and do it by hand. This has
solved all our problems.

The document prints out fine now.

Regards,
Ron
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 16 guests