ActionScript 3.0 :: Too Much Data Being Sent To Printer
Apr 20, 2011
I've been building an AIR application in AS3 which includes a number of drawing tools, allowing the user to annotate a page with freehand drawings, lines, text etc. I'm almost done and everything tests well on my dev computer but testing on an old XP machine crashed every time I tried to print. Eventually I realised this was due to a mass of data being sent to the printer which that poor old XP machine just couldn't handle. All I'm doing is creating a new printJob with printAsBitmap set to true, and using addPage to add the MC I want to print.
When I look at the windows print jobs dialog I see it's sending 1.68Gb of data to the print spooler! I figured that there must be too much in the MC so I create a bitmapData of the same size and copy it to a bitmap, then add that to a blank MC and send that to the printer - same problem! The MC is 2480x3508 which equates to 300dpi on A4 paper. By my calculations that should be a bitmap of around 33Mb, so where is all the other data coming from.
Here's my PHP Code:
var myPrintJob:PrintJob = new PrintJob();
var result:Boolean = myPrintJob.start();
var options:PrintJobOptions = new PrintJobOptions();
options.printAsBitmap = true;
var thisRect:Rectangle = new Rectangle(0, 0, 2480, 3508);
myPrintJob.addPage(printTemplate, thisRect, options);
PrintTemplate is a simple MC containing a single bitmap. Both the bitmap and the printTemplate object are 2480x3508 pixels.
View 1 Replies
Similar Posts:
May 15, 2009
I have a presentation file I need to print out are ther any utilities or functions within flash that will allow me to print to printer or PDF?
View 4 Replies
Jun 2, 2005
I've created a print button. I now want to have it sent to the printer a picture that is in my .fla file. What is the best way to achieve this?
View 4 Replies
Feb 9, 2010
I want to make a button map to a local printer on the network.
View 6 Replies
Apr 19, 2010
i m trying to set the printer on the landscape mode but unable to do so.i also used the my_pj.orientation == "Landscape") but got no success in achieving the subject.
here is my code
on (release) {
var my_pj:PrintJob = new PrintJob ();
if (my_pj.start ())
[code]...
how can i achieve the printer in the landscape mode?
View 3 Replies
Feb 11, 2010
I'm running app in air. When I'm trying to print the print manager window show up, i choose printer and click 'ok' and nothing happens. Printer icon showup for few seconds but have no print tasks. Of course it's not becouse of the printer managar (it works fine when printing from e.g. word).My code looks like this:
[Code]....
View 1 Replies
Mar 7, 2008
Ok, this is a function that used to work...so I didn't check it for a while...and I did not edit it from when it was working in any way...but now the print function does not produce a page from the printer...when I click "Print View" the print dialog box comes up, and I can choose my printer, and when I click ok, there is a tooltip near the windows clock that says document sent to printer, but the printer never does anything...I have tested this in several printers and several computers...I have also tried to output to a pdf...and it allows me to choose a file name to save to but it never creates the file...
print button code:
Code:
printButton.onRelease = function()
{
var pj:PrintJob = new PrintJob();
[Code]....
View 2 Replies
Jun 16, 2010
I'm trying to programmatically print a movie clip to 8.5" x 11" plain paper regardless of the current paper size setting in the printer. e.g if the user's printer is currently set to use paper size A4, can I change the setting to Letter (8.5" x 11") from ActionScript at runtime? I use PrintJob class for printing the movieclip. According to the ActionScript online API spec [URL], I can only READ the paper size setting after the call to PrintJob.start. I can't believe that we are not allowed to change the setting.
View 1 Replies
Jun 16, 2010
I'm trying to programmatically print a movie clip to 8.5" x 11" plain paper regardless of the current paper size setting in the printer. e.g if the user's printer is currently set to use paper size A4, can I change the setting to Letter (8.5" x 11") from ActionScript at runtime? I use PrintJob class for printing the movieclip. According to the ActionScript online API spec [URL], I can only READ the paper size setting after the call to PrintJob.start. I can't believe that we are not allowed to change the setting.
View 1 Replies
Feb 25, 2011
I need direct-to-printer functionality for my website, with the ability to distinguish a physical printer from a virtual printer (file).has this functionality via a native binary which must be installed by the user. I'd prefer to avoid thatI dug through that Java APIs a bit, and don't see anything that would let you determine physical vs virtual, except looking at the name (that seems prone to misidentification). It would be nice to be able to do it in Java, because I already know how to write Java applets. Failing that, is there a way to do this in Flash or Silverlight?
View 3 Replies
Mar 29, 2011
A client needs a standard consumer color printer for printing name badges from my flash app. Last time we used the app, I couldn't do any pre-testing of their computer and printer beforehand. So, of course, the margins were completely wrong when the time came to print. Ideally, I'll have the flash app's bugs worked out for the next run, but for safety's sake does anyone know of a printer that has good controls for custom margins and offsets, in case some minor adjustments are needed?
View 1 Replies
Feb 9, 2010
I am making a floor map for the company I work for. And I want to make a button map to a local printer on the network...
View 1 Replies
Apr 5, 2007
I was wondering if it would be possible to use copyPixel to create a simple text printer for example you have a font as an image like this
[URL] then have some code that will transform your text ="hello world" into HELLO WORLD on your flash screen, but written in that font.
Because the font is spaced equally you could have the source x and y, times by 16pixels for each letter and move the Y source down 16 pixels when it reaches the right side of the image
View 2 Replies
Feb 10, 2010
does anyone know a way that you can print a selction on the stage to jpeg format or to a printer
View 3 Replies
Apr 25, 2008
I want to have flash set the default print orientation to landscape when it calls the print object...is this possible?
View 1 Replies
Feb 15, 2011
I have been working on a small Flash application. I want to add a "Print" button to it, and just dump the entire flash-window to the printer. Is this possible??
View 1 Replies
Oct 25, 2010
I am working on an Adobe AIR (2.0) application that contains a feature to allow users to print documents (such as salary slips). Those documents are originally in PDF format. Due to circumstances we cannot directly display those PDFs in the AIR application (for example using flash.html.HTMLLoader). Therefore we convert the PDFs to SWFs (using the pdf2swf tool, see The SWFs are loaded into the application using a mx.controls.SWFLoader, like so:
<mx:SWFLoader
id="salarySlipImage"
loaderContext="{someLoaderContext}"
[code].....
View 2 Replies
Oct 28, 2010
printing directly to a Photo ID Card printer in a web browser?I have a web application that manages user data, photo, and so forth. I'd like to add a Print ID Card feature to it. The web application is a single page javascript application that talks to a RESTful web service via JSON. I'd like to display what the printed card will look like on both the front and back for approval before the user clicks the print button.
Generate front and back JPG or PNG images to print on the server, send them to the client for display and approval, and then somehow send the images to the printer.Use javascript with SVG or Canvas to display the card to print in the UI for approval, then somehow send the SVG/canvas data to the printer.Generate a PDF and print the PDF to the printer.Use Flash to display and print Use a Java applet to display and print Something else?
View 3 Replies
May 23, 2007
I got a music portfolio web site running PHP, MySQL and Flash. There's a page showing all the artists my client worked for and when you click on a song title, this title is passed as a variable to a PHP page then to a Flash page. The Flash page contains an actionscript music player which then looks for the right audio file in the database and plays the song. Everything works great except for the dynamic text field which displays the song title. If the song title contains an apostrophe or a single quote, the Flash dynamic text field then shows the apostrophe.[code]
View 1 Replies
May 4, 2007
How to store the data text in Access databases using flash form and to search into the database. It is possible to work without server because I don't want to put this flash file on the net. how to make databases and to connect with flash and to have possibility to search the database, but to work database in the local computer.
View 1 Replies
May 7, 2010
Im trying to use dynamic SQL tables on my PHP server so I need to pass the table name to the PHP script. I don't understand why the Data Management system that sets up CRUD won't allow this extra parameter. It says it can only have one input: item. I can get all records, but when I try to create, update, or delete I get an error.
Or is there another way I can pass the tablename variable to the php file before I call any functions?
View 3 Replies
Jul 18, 2007
Im new to placing external data into Flash. I just got CS3 and Im trying to use Flash to dynamically load XML data via a FlashVars call in the HTML.
The problem is I have followed the very straight forward AS2 Help files for using FlashVars and URL variables.I have placed the code directly from the Help file into the Html between
<noscript> <noscript>and i keep getting undefined.I have tried saving the file as flash 8 and i am publish flash 8.
View 1 Replies
Jun 15, 2007
Is it possible to read/write data to and from Access with Flash in a offline format? I need to create a stand alone system that users can log into and pull information from - but it will not be networked or have any sort of internet connection.
View 2 Replies
Mar 14, 2011
I'm trying to read some data in from a sql source, some of which contains double quotes embedded in the text. I know I can strip the doublequotes, but don't want to go that route if I can avoid it. I've tried replacing to double quotes with hex codes before passing the text via parameter to my flash file, but the text string always cuts off at the hex code, the same as if the double quote were present in the string. For example:This is a "text" stringreplace double quotes with hex: This is a x22textx22 stringesults when read into flash: This is a <remainder is dropped>Yet if I type the same text string in a variable in flash, the string displays the double quotes properly:
View 1 Replies
Jun 17, 2009
In flex 3 I have a hierarchical data structure. I would like to display the content of it in a tree. My problem is that I have nodes which data calculated from children nodes. How to structure the hierarchy to make automatic changes to those parent nodes, if their children's data changed? For example:
Every node has a warning flag. If some of the children warning flag changed to true, then the parent warning flag should change automatically set to true. A node integer field is the sum of the children integer fields, and if any of the children changes, the parent integer field "calculates" the sum immediately. Is there an easy solution wit good structuring changes happen automatically, or I have to make some custom functions?
View 1 Replies
Dec 28, 2009
I have to populate an Advanced Data Grid which have the following fields: Continent->State->Society-->Actual Value-->Estimate Value I want to simulate a financial market so i have to change some of the values by asynchronous request from an HTTPService; If necessary i'll post the .as file, but it is generated automatically by Flex Builder.
Here's the code of the client side Flex/Air application:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
[Code].....
View 2 Replies
May 25, 2011
I want to separate the data from the PHP call to Different CollectionArrays So that I can use the data for a bar-graph;
I created a static version of the bar-graph and separated the Collection array manually I don't want this done manually I need to do it dynamically. So what I am trying to understand is where to put the event-listener how to add to a collectionArray then once the collection array(s) are built. use that information to build the bar graphs...
/*
*
36, > 2 years, Compliance
6, 0-90 Days, Compliance
[Code].....
View 2 Replies
Jan 10, 2012
I've got a Gridcolumn in a Datagrid (Spark). The Column's dataprovider is a Number value that gets updated via Binding.Now, without an item renderer the cell displays the correct values.If I set an item renderer, I can't access the values in this renderer.My renderer looks like this, so nothing really do here (for now) but to trace the value, but the value is always NaN.
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" width="100%" height="100%" >[code].......
without the renderer, the column displays the correct values, so apparently the DefaultGridItemRenderer works fine.As requested, here is my Datagrid;
<s:DataGrid id="dataGrid" dataProvider="{_listItems}">
<s:columns>
<s:ArrayList>[code]..........
_listItems is an ArrayList with instances of a model class, which has (amongst others) a property called change of type Number.
View 1 Replies
Mar 15, 2012
I have been goggling a lot to find anything with link-based data visualization in Flex 4. something like below screen shoot (made using Ravis). Where user can drag these nodes, without removing the links and on double click of any node we can set some properties for that particular node. I found this Ravis (Birdeye), but not much of examples and support is available for that.
View 1 Replies
Mar 21, 2008
Been butting my head against the wall on this one. Im making a news app that loads xml data and diplays the data onto 3 seperate textfields. The 3rd textfield has auto size set to true, so that the height of each instance of the attached movie is always going to be different from each other. I need to figure out how to get the height from each instance of the attached movie and use those numbers for the verticle tiling so that they dont run into each other.
heres what I got so far. Its the "duke news" box. If you scroll down in the news box, you will see that the text starts running into each other.
[Code]...
View 2 Replies