ActionScript 3.0 :: Set Print Margins In PrintJob ?

Feb 21, 2009

I want print some sprite which is created by "draw(someSprite)" method in BitmapData.Everything is fine but... I want put some margins in my print page, and I don't know how .Of course I could set right position of my "someSprite" but I don't want change my site to print it. (Using Rect... in BitmapData.draw() and addPage() dont work.) Simple flashdevelop project is in zip file.

Code is below

ActionScript Code:
package
{
import flash.display.*;

[Code]....

I don't want to change position of "printBitmap" - alternatively "bitmapData" - or anything else.

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Get Control Over Page Margins When Working With PrintJob

Aug 29, 2011

I just step into the task of printing jobs in as3. All I have to do is to print the text in a dynamic text field which is in a movieclip. The text filed has a scroll bar to show the rest of the content. I am using the following lines of code to print the page.
 
pJ.addPage(txtContainer)
 
I have also tried printArea and pageHeight,pageWidth, paperHeight, paperWidth properties. But still I am not able to control the margins of page.

View 3 Replies

Flash CS3 :: Printing - Dynamically Set Print Page Margins?

Oct 29, 2009

//I can get the right margins by defining a rectangle and giving it the following dimensions:

var rect1:Rectangle = new Rectangle(0, 0, 792,612);

//When the print button is pressed the following code executes using the dimensions defined by rect1:

prntCover_btn.addEventListener(MouseEvent.CLICK, printCover);
function printCover(evt:MouseEvent):void {
front_mc.visible = false;

[Code]....

This is not working to place the mc correctly on the page. This is all the Adobe help provides. Also Googled and tried different variations but no success.

View 1 Replies

Flex :: Set Print Time For Printjob?

Nov 8, 2010

How can i set print time for flex printjob.

when the time is ripe my program will automatically print my job

eg. i want to print my job at 11.00 AM i will set print time in my program to 11.00 AM when time is 11.00 AM flex will automatically print my job

View 1 Replies

ActionScript 3.0 :: Get The Printjob To Print As Many Pages As Movieclip Needs?

Dec 7, 2007

how do I get the printjob to print as many pages as my movieclip needs? If I have this code:

[Code]....

how would I set pj.addPage to keep adding the mc till all the mc had been loaded?

View 6 Replies

ActionScript 3.0 :: Can't Print Large Images With PrintJob()

Dec 20, 2008

I'm having an issue where when I try to print a larger image via printjob one of two things happens. One either the job fails or two the output of the image is literally diagonally cut off. I am simply passing the stage to the print job. I've tried both with and without using printAsBitmap.

View 1 Replies

ActionScript 2.0 :: PrintJob Won't Print Multiple Pages?

Aug 11, 2009

im trying to print something from flash onto multiple pages, i have the most basic text box i know is too long to fit on one sheet of a4 paper. when i run the print job in flash it only prints the first page. very annoying. can't find anything online to reslove the issuee is my code.

ActionScript Code:
var pageCount:Number = 0;
objPrintJob = new PrintJob();

[code]......

View 9 Replies

ActionScript 2.0 :: Yet More Printjob Aliased Nonvector Test In Print?

Apr 5, 2006

I've made an mc with an attached txt field offstage from which to print from. The text that populates the off stage tf is all blocky and non vector looking...so are the printed sheets. I am using both html formatting and textformat formatting on the print text. It is a dynamic text field. It has this problem with both the printed result and when i peak off stage to look at the actual fields loaded with this text. I've already tried adding dummy fields offstage with the "embed" option activated.

View 7 Replies

ActionScript 3.0 :: Timeout - Load A Bunch Of External Images And Then Print Them All In The Same PrintJob

Apr 21, 2009

I'm trying to load a bunch of external images, and then print them all in the same PrintJob. For testing i tried 40 images at around 599kb. I load all images using Loaders and check that all images are fully loaded (by Event.INIT) and put the images in separate Sprites.When this is done i start a new PrintJob, loop throug all my images and add them to the PrintJob, and then PrintJob.send(); At least this is what i want to do. What happens is this:
 
[Code]....

View 8 Replies

ActionScript 3.0 :: Page Orientation - Bypass The Print Dialog Box While Using PrintJob.Start() Method?

Jan 28, 2009

is there anyway to bypass the print dialog box while using printJob.Start() method? is there anyway to set desired value for page orientation from the script.

View 0 Replies

ActionScript 3.0 :: TextFormat: Top And Bottom Margins?

Apr 10, 2008

I'm using TextFormat to format a text field and I've noticed that, while there are properties for leftMargin and rightMargin, there are non for top and bottom margins. Is there any way to add some padding to the top and bottom of a text field? My text field has a background color, and right now the text is flush with the top and bottom edges of the box, which looks ugly

View 4 Replies

ActionScript 3.0 :: IE Print Button Gets Around Print Movie Clip With Alpha?

Aug 24, 2010

I have a print button with this code in it:

Code:
var pj:PrintJob = new PrintJob();
var printOptions:PrintJobOptions = new PrintJobOptions();

[code].......

View 1 Replies

ActionScript 2.0 :: Print The Contents Of A Textfield Or String Using The Print Command?

Mar 16, 2004

Is there any way to print the contents of a textfield or string using the pring command in AS?

View 2 Replies

ActionScript 3.0 :: HtmlText And Stylesheets - No Control Over Indents/margins?

Jun 5, 2008

I'm trying to figure out htmlText in Flash, and a number of things don't seem to be working:

- The first line of each paragraph is slightly indented. I can't seem to find a setting to remove this.

- There doesn't seem to be any way to control the amount of space before or following a paragraph. Setting "marginBottom" doesn't do anything - and of course it's not defined in the class anyway.

- Can't control how indented <li> elements are, or how much space is before/after them.

Is there any way to get more precise control over formatting of text, using style sheets or some other method?

View 4 Replies

ActionScript 3.0 :: Set Left And Right Margins In Textfield To Be A Certain Amount Of Inches?

Dec 27, 2010

I am trying to set left and right margins in textfield to be a certain amount of inches. How can I do this if the margin can only be set in pixels?

Won't it change whenever the resolution change?

I want the textfield in the application to be exported as a document file and printed. Is there anyway to set the margins that they are always the same no matter what computer or resolution it is on?

View 2 Replies

ActionScript 2.0 :: TextFields Filled With XML Data - Setting Margins

Aug 18, 2011

I have a movie in which I created several boxes with textFields inside (they are filled with some xml data). The thing is, I have to set them in place within the box, but I don't how to get rid of the space up and down the text (with a autosize true textfield). Here is an image [URL]. I would like to have the same margin top and bottom, as the the margin right and left...

Code:
for (var i=0;
i<(newsletters[target_mc.num].length-1); i++) {
var txt_mc:MovieClip = target_mc.txt_mc.createEmptyMovieClip("txt"+i+"_mc", target_mc.txt_mc.getNextHighestDepth());
[Code] .....

View 2 Replies

ActionScript 3.0 :: Create A Print Button To Print One Frame?

Jan 3, 2012

I am trying to create a print button on the last frame that will allow the user to print just that frame. I've tried using the printjob object, but all that I can get to happen is print a blank sheet of paper. Here is the code that I have so far:

function printScore(event:MouseEvent):void
{
var printJob:PrintJob = new PrintJob();

[code].....

View 1 Replies

Print From Flex App By Clicking Print In Context Menu?

Jul 5, 2011

I want my flex 4 application to print proper picture when I click on print in context menu of Adobe Flash Player.Is it possible?

View 1 Replies

ActionScript 2.0 :: Print MovieClips When Press A Print Button

Jun 5, 2007

i want to simply print 2 movieClips when i press a Print button. so i have the "_root.container_mc" and "_root.logo_mc"... paste the simplest code for printing a "landscape" page with these 2?

View 3 Replies

ActionScript 2.0 :: Make A Print Button That Will Print The Contents Of A Mc?

Jan 14, 2008

I am trying to make a print button that will print the contents of a mc...this mc basically holds a dynamically drawn floorplan which can be zoomed and panned...I want to be able to print the contents of the mc, and only what is viewable in the mc at the time of the print...so if you are zoomed in, all that prints are the actual objects visibly seen in the mc...I think it may be with the print command using bmovie but I have no idea how to assign a #b lable to the frame.

View 3 Replies

ActionScript 2.0 :: Print Section And Then Check Out The Print Pieces?

Jul 15, 2004

[Code]... and go to the print section and then check out the print pieces. for some reason my resizing gallery movie is doing some weird stuff and i cant figure out how to fix it. my actionscript goes like this :

[Code]...

View 4 Replies

Flex :: Mxml - Change The Margins Inside Cells Of A DataGrid?

Nov 17, 2010

I am using the following code to insert a DataGrid object into a basic Panel:

<mx:DataGrid borderThickness="0"
height="120" dataProvider="{collection}"
rowHeight="12" fontSize="9"
showHeaders="false" verticalGridLines="false">
<mx:columns>

[Code]...

View 1 Replies

ActionScript 3.0 :: Unable To Print More Than 5 Pages In One Print Job?

Dec 19, 2008

I am not able to print more than 5 pages in one go. I want to print almost 12 pages in one print job. I am creating the movieclips of each page by adding the dynamic data in to it and store in an array. When all the movieclips created and stored in an array(pagesAry) then it call the following function to print those pages:

private function sendToPrinter():void
{
pj = new PrintJob();
try

[code]....

Getting error: Print job canceled as it took more than 15 seconds to complete.

View 5 Replies

ActionScript 2.0 :: Print Button Shows Up On Print Out?

Jul 19, 2005

how do you set a print button so that it does no show up in the print out?

View 1 Replies

ActionScript 2.0 :: Print Entire Page But When Text File Is Scrollable It Doesn't Print Whole Text?

Jul 14, 2005

how do I go about printing entire, scrollable text area in flash movie, I know how to print entire page but when text file is scrollable it doesn't print whole text.

View 8 Replies

ActionScript 3.0 :: PrintJob Not To Scale?

Apr 28, 2009

there is a print button , however when i try to print , it is not to scale.

View 1 Replies

Professional :: PrintJob Only Prints Once?

Jan 15, 2010

I am having a problem with my printJob.  I have a button setup to call the printJob.  When I click it the pages that I want to print, print properly the first time.  But then if I click the button again to print the same page, it does not work. The button continues to work and calls the function properly, but after that it does not work.   Here is the code that I am using:
 
public function Print_PTSD(event:MouseEvent):void{
trace("Print button clicked");
//Generate the Sprite to be printed

[Code]....

View 1 Replies

ActionScript 3.0 :: Printjob () Not Working On IE?

Jun 6, 2011

I got a very simple printjob that works on safari, but it doesnt work on IEAny ideas what Im doing wrong?

Code:
function printMe():void{
var my_pj:PrintJob = new PrintJob();

[code]....

View 0 Replies

ActionScript 2.0 :: CS3 Center And Rotate With PrintJob

Jul 1, 2008

I am looking to add a print job to my flash presentation. I have the basic code and can get it to print, but I have to manually set the printer to print landscape and the image is in the top left corner. If it was just for me it wouldn't be a big deal, but a lot of our presentations go to lawyers and judges so we would like to streamline their results as much as possible. Is there a way to tell it to rotate 90 degrees and center itself on the page. Below is the code I am using. I tried to use some parameters to set it for landscape, but they don't seem to work. My doc size is 720x540.[code]

View 4 Replies

ActionScript 3.0 :: Can PrintJob Add Pages For More Than 60 Seconds

Jan 10, 2010

Though Flash docs say: 15 second script timeout limit applies to the following intervals: PrintJob.start() and the first PrintJob.addPage() PrintJob.addPage() and the next PrintJob.addPage() The last PrintJob.addPage() and PrintJob.send() It looks like 15 seconds is the maximum interval between  the first and the last addPage() With Script time limits it can be changed up to 60 seconds, no more.
 
I have to print 50 and more pages of static text, it often takes more than 60 seconds, and I get #1502 Error (Time Out)
 
For test I use Flash file with that simple code at frame 1:
 
stop();
var count:Number = 0
var pj:PrintJob = new PrintJob()

[Code].....
 
"myMC" is a MovieClip with static TextField containing 1000 "a" characters. When it is published as AS2, prints all 150 pages - prints as long as necessary. With AS3 prints 14 pages only before timeout - prints for 15 seconds only.
 
how to overcome 60 seconds time limit? P.S. Timer event and EnterFrame event do not work after PrintJob.start().

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved