Skip to main content
August 30, 2013
Answered

Using PrintArea when printing?

  • August 30, 2013
  • 1 reply
  • 1204 views

Have never had to use printArea before... and not entirely sure I need to now, but am having some issues trying to print an image to a large format, roll fed, printer (HP DesignJet). The printer prints at 24" wide... It reports as so:

trace(printJob.pageWidth, printJob.pageHeight);

1700,2564

So, I do the standard:  page.width = printJob.pageWidth; page.scaleY = page.scaleX;

It's a square so when I trace page.width, page.height I get 1700,1700... so far so good.

However when I print, I get a good amount of the image cropped - on the right and bottom.

Tried setting printArea but it's not helping... and based on the docs I wouldn't think I need it:

If you omit the printArea parameter, or if it is passed incorrectly, the full area of the sprite parameter is printed.

This topic has been closed for replies.
Correct answer

To verify it's not my image, I created a 1700x1700 white image - with a solid red border... prints exactly like mine. Cropped on right and bottom. Frustrating... printing through Photoshop with scale to fit works everytime.


Well... I got it. Sort of. Turning off printAsBitmap in the print options, prints full size properly. Though I am printing bitmaps and would prefer to use the higher quality printAsBitmap offers, but I can live without it for this.

1 reply

kglad
Community Expert
Community Expert
August 30, 2013

is page's reg point at 0,0?

August 30, 2013

Do you mean the Sprite I'm printing? It's never even on stage... I create it, dump a bitmap into it, scale it, and then print it...

For a test, instead of printing, I've stuck the sprite on stage, and did a startDrag on it... it's the correct size, and it's all there.

kglad
Community Expert
Community Expert
August 30, 2013

it still has a reg point.  make sure the bitmap is added at 0,0.