Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3443354
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:46:51+00:00 2026-05-18T08:46:51+00:00

Hopefully someone can see something which I’ve missed out or something, because this is

  • 0

Hopefully someone can see something which I’ve missed out or something, because this is really odd!
Basically I’ve created a print class which has all the print job code in to print a sprite, however when I print it, the sprite which I’ve created acts like a mask and the area where the sprite graphic should be is filled with my background colour.

So for example, my 100×100 black sprite looks like this in preview:
http://www.willdonohoe.com/examples/print_job_fail.png

When I scale the image to the width and height of the print width and height, obviously I’ve got a page full of purple.

Anyway here’s my code:

public function print():void {

 //bitmap_to_print.smoothing = true;

 var print_page:Sprite = new Sprite();
 var sp:Sprite = new Sprite();
 sp.graphics.beginFill(0x000000, 1);
 sp.graphics.drawRect(0, 0, 100, 100);
 sp.graphics.endFill();
 print_page.addChild(sp);

 var print_job:PrintJob = new PrintJob();
 addChild(print_page);

 if (print_job.start()) {

   trace(">> pj.orientation: " + print_job.orientation);
   trace(">> pj.pageWidth: " + print_job.pageWidth);
          trace(">> pj.pageHeight: " + print_job.pageHeight);
          trace(">> pj.paperWidth: " + print_job.paperWidth);
          trace(">> pj.paperHeight: " + print_job.paperHeight);

   print_page.height = print_job.pageHeight;
   print_page.scaleX = print_page.scaleY;

   print_job.addPage(print_page);
   print_job.send();

   print_job = null;

 } else {

  //User does not have printer or user cancelled print action
 }
 removeChild(print_page);
}

If anybody has any idea, or had this problem before then any help will be greatly appriciated.
Many thanks,
Will

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:46:52+00:00Added an answer on May 18, 2026 at 8:46 am

    I just noticed that this thread isn’t answered, and I forgot to say I found a fix. For some reason I needed to add the object I wanted to print directly to the stage, for example stage.addChild(movieclip), oddly it didn’t seem to work if I added it in a child on the stage, it has to be added on the stage directly.

    The good thing is, if you don’t want the movieclip/bitmap/sprite to be shown when you print, if you set the visiblity to false, it will still print for you.

    A bit of an odd one, but seemed to work.

    Cheers,
    Will

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This issue is something which has me stumped, so hopefully someone can help. I
I can't figure this out..hopefully someone else can. I have an image button .
I'm not really sure how to word this exactly, so hopefully someone can make
I've been working at this all morning hopefully someone can see the problem, I've
Alright, hopefully someone can help me with this because I'm at a loss here.
Quick question hopefully someone can help out here. I'm trying to copy and paste
This is a weird one, but hopefully someone can give me an idea here.
Hopefully someone can shed some light on this 'seemingly' straight forward issue. I need
This is a problem I regularly bump into - hopefully someone can clarify to
Have seen multiple posts on this but I can't see any which answer my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.