[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Printing Woes
- Subject: Printing Woes
- From: "Anthony Davis" <diftil(at)earthlink.net>
- Date: Thu, 1 Mar 2001 17:32:48 -0700
- Newsgroups: comp.lang.idl-pvwave
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23810
I am having difficulty printing to the Windows printer device from IDL
5.3.1. The origin of the printed image is always halfway down the page
(instead of at the bottom where I'd like it.) The returned size is correct,
but I can't get the thing to print on the whole page. Here's the code I'm
using. Any ideas. (As a suggestion, why doesn't anything change in the !D
structure when I adjust the /XOFFSET or /YOFFSET keywords?)
PRO PrintImage
result=DIALOG_PRINTJOB()
IF result GT 0 THEN BEGIN
currdevice=!d.name
image=BYTARR(3,100,600)
image[0,*,*]=BYTSCL(DIST(100,600))
SET_PLOT, 'PRINTER'
DEVICE, SCALE_FACTOR = 1
DEVICE, XSIZE = 17.7
DEVICE, YSIZE = 25
help, !d, /str
print, !d.origin
print, !d.zoom
DEVICE, /TRUE_COLOR
; Get the printer device size.
;
xSize = !D.X_SIZE
ySize = !D.Y_SIZE
PRINT, xSize, ySize
; Compute the controlling aspect ratio.
;
sz = SIZE(image, /DIMENSION)
aspX = sz[1]
aspY = sz[2]
aspC = (xSize / FLOAT(aspX) ) < (ySize / FLOAT(aspY))
DEVICE, SCALE_FACTOR = aspC
TV, image, /TRUE
DEVICE, /CLOSE_DOC
SET_PLOT, currdevice
ENDIF
END ; END PrintImage