SetViewPortOrg


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant Foraker on May 11, 2012 at 13:02:05:

Just used (SetViewPortOrg) on a project. See code below. Like it a lot. But it could be a little easier to use.

To make the left and top margins 1/4 inch requires asking the printer for its physical settings then calculating how much the top and left adjustment should be. This isn't always the true physical settings. It's what the driver returns. But that's a different issue.

To add (SetViewPortOrg) to a program means making it a WDL program with extra use files and overhead.

Sometimes, all I want, is to make sure the margin is 1/4" regardless of the printer settings. PDF Comet might be 0,0 while pdfFactory is 360,360. I'd like the command to do the dirty work.

PRINT (1) (TR);(SetViewPortOrg = 360, 360)

would always give me 1/4 margins. This would make it quick and easy to retofit all my print programs.

When customers eliminate their green bar printers and get laser sized reports, they often ask that important reports and registers be indented an extra 1/4 or so. Report data sometimes gets lost when they 3-hole punch the report for filing in a binder. Up until now, I'd move all the print lines to the right and squeeze things down a bit. It would be much easier and faster to do ...

PRINT (1) (TR);(SetViewPortOrg = 720, 360)
PRINT (1) (TR);(SelectSysFont=18)

This gives the report a 1/2" margin on the left on the 18cpi keeps the report inside the 7 3/4" of remaining print space.


SetPrinterSpecifications:
OPEN (1) ZLP$, EXCP = 9890
LET MESSAGE$ = QPNBR$ + '-' + QCOPY$ + '-' + QREV$
PRINT (1) (TR);(SpoolMessage = MESSAGE$)
PRINT (1) (TR);(SetOrientation = DMOrient.Landscape)

GOSUB INITPAGEINFO

! Exclude non-printable area
PRINT (1) (TR);(GetPageInfo = PTR.PAGEINFO.PHYSICALOFFSET)
GOSUB GETRESULT
XOFF = 360 - LORESULT
YOFF = 360 - HIRESULT
!
PRINT (1) (TR);(SetViewPortOrg = XOFF, YOFF) ! 1/4" margin on PDF
RETURN



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]