comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Printing Woes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Printing Woes [message #23989] Thu, 01 March 2001 16:32
Anthony Davis is currently offline  Anthony Davis
Messages: 1
Registered: March 2001
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: thumbnails
Next Topic: Widget event handlers

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:21:33 PDT 2025

Total time taken to generate the page: 1.04181 seconds