You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Jack Ring <ja...@gmail.com> on 2012/02/04 16:15:48 UTC

[Discussion] Printing from Flex

Hello everyone.
I'm half way into building an enterprise application using Flex, Air, Coldfusion and SQL. I feel that the framework lacks in the area of printing. For example Alive PDF and mx PrintDataGrid are not up to standard at all. I don't know much in the way of building frameworks but everything is so easy to work with and looks great on screen but when I want to generate reports for print I have to go to a 3 rd party solution or use that antiquated mx:PrintDataGrid component. I have a graphic arts background and I find myself fighting these components so hard that I always end up compromising on the way my application is represented on paper. Shouldn't there be at least a built in spark PrintDataGrid?

Thanks,
Jack Ring

Re: [Discussion] Printing from Flex

Posted by Leif Wells <le...@gmail.com>.
printAsBitmap has never been... satisfying. The quality has always been a
bit blurry in my opinion.

Build your on PDF files with AlivePDF: http://alivepdf.bytearray.org/

In most cases where I've needed to create a PDF of print something out, the
output I needed was not the application screen that was being shown, but
the data from that screen formatted for print. That is why I've used
AlivePDF in the past for these scenarios.

Leif



On Wed, Feb 8, 2012 at 2:49 AM, Martin Heidegger <mh...@leichtgewicht.at>wrote:

> On 08/02/2012 16:44, Dany Dhondt wrote:
>
>> Correct me on this if I'm wrong but isn't it so that swf printing engine
>> always creates bitmaps? Is there any postscript handling?
>>
>> -Dany
>>
> At least the api says that vectors are available too:
>
> http://help.adobe.com/en_US/**FlashPlatform/reference/**
> actionscript/3/flash/printing/**PrintJobOptions.html#**printAsBitmap<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/printing/PrintJobOptions.html#printAsBitmap>
>
> yours
> Martin
>

Re: [Discussion] Printing from Flex

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 08/02/2012 16:44, Dany Dhondt wrote:
> Correct me on this if I'm wrong but isn't it so that swf printing engine always creates bitmaps? Is there any postscript handling?
>
> -Dany
At least the api says that vectors are available too:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/printing/PrintJobOptions.html#printAsBitmap

yours
Martin

Re: [Discussion] Printing from Flex

Posted by Dany Dhondt <ar...@mac.com>.
Correct me on this if I'm wrong but isn't it so that swf printing engine always creates bitmaps? Is there any postscript handling?

-Dany

Op 8-feb.-2012, om 08:34 heeft Martin Heidegger het volgende geschreven:

> On 07/02/2012 11:32, Dany Dhondt wrote:
>> ... as long as the output is uncompromised and perfect.
> 
> As I have had (serious) problems with printing in flash my first step to action would be a test as to how far the current printing solution works.
> 
> The user test suite should consist of a swf that offers bitmap and vector printing in various dpis. The swf should contain at least various complex shapes, printing to the edges, fonts, bitmaps and masking over multiple pages - everything in color and b/w.
> 
> It will take a while for me to put that together, if someone could step-in that would be awesome.
> 
> yours
> Martin.
> 


Re: [Discussion] Printing from Flex

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 07/02/2012 11:32, Dany Dhondt wrote:
> ... as long as the output is uncompromised and perfect.

As I have had (serious) problems with printing in flash my first step to 
action would be a test as to how far the current printing solution works.

The user test suite should consist of a swf that offers bitmap and 
vector printing in various dpis. The swf should contain at least various 
complex shapes, printing to the edges, fonts, bitmaps and masking over 
multiple pages - everything in color and b/w.

It will take a while for me to put that together, if someone could 
step-in that would be awesome.

yours
Martin.


Re: [Discussion] Printing from Flex

Posted by Dany Dhondt <ar...@mac.com>.
Hi,

I never understood why pdf generation is so difficult on the client side. Is it because of the flash sandbox?
Printing reports, tables, stats and even booklets should be core functionality in the flex environment.
I ended up several times creating good looking UI's on the client and doing the work all over again on the server to create a server side pdf.
A superb pdf framework like TCPDF should be available in the flex framework. I never managed to get the same results with AlivePDF.
Personally, I don't mind to write complex code to achieve this, as long as the output is uncompromised and perfect.
I remember using (Macromedia) Adobe Director, for which there were excellent printing plugins available. Switching to the Flex environment was the right choice for me but it kept me frustrated when it came to printing.

-Dany

Op 6-feb.-2012, om 23:59 heeft Jack Ring het volgende geschreven:

> Thanks Nick.
> 
> I found myself setting up ColdFusion ReportBuilder to do what I want. ( a potentially worse solution)
> 
> See my original quote in this subject 
> 
> 
> Jack Ring
> 
> 
> On Feb 6, 2012, at 3:32 PM, Nicholas Kwiatkowski <ni...@spoon.as> wrote:
> 
>> While not a GREAT component, we do have the PrintDataGrid, which actually
>> handles the last two items you requested.  Multi-page printing is handled
>> by queuing multiple pages into the print queue.
>> 
>> The options to set the DPI, page size, etc. is pretty limited, but it does
>> exist...
>> 
>> I have a blog post on it from 2006, but it is still accurate for the most
>> part :  http://quetwo.com/2006/10/01/printing-in-flex-part-1/
>> 
>> -Nick
>> 
>> On Mon, Feb 6, 2012 at 2:40 AM, Haykel BEN JEMIA <ha...@gmail.com> wrote:
>> 
>>> Flex could also add features for making the native flash printing system
>>> easier to use. Some of the functionality I can think of:
>>> 
>>> - Handle scaling based on DPI and page setup options (page size,
>>> orientation etc.).
>>> - Handle multi-page printing.
>>> - Make Flex components printable, e.g. with skins for printing like CSS
>>> for different media. For example a DataGrid could have a skin for
>>> printing
>>> where it does not include scrollbars. Some components could also require
>>> more than just a special skin for printing.
>>> 
>>> 
>>> Haykel
>>> 
>>> 
>>> 
>>> On 5 February 2012 18:04, Martin Heidegger <mh...@leichtgewicht.at> wrote:
>>> 
>>>> Hello Omar,
>>>> 
>>>> as far as I can tell we were talking about flex specific printing. Having
>>>> problems with the flash player is a reality that needs to be dealt with.
>>>> For one: If we encounter bugs during implementation we should document &
>>>> report them properly. But also: We need to choose a implementation
>>> strategy
>>>> based on the things that work. There is a bunch of options to choose from
>>>> that I can think of:
>>>> 
>>>> *) A system that prints using a standardized online service
>>>> *) A system that uses native extensions
>>>> *) A system that generates pdf on the client
>>>> *) A system that works within the limitations of flash player printing
>>>> 
>>>> yours
>>>> Martin.
>>>> 
>>> 


Re: [Discussion] Printing from Flex

Posted by Jack Ring <ja...@gmail.com>.
Thanks Nick.

I found myself setting up ColdFusion ReportBuilder to do what I want. ( a potentially worse solution)

See my original quote in this subject 


Jack Ring


On Feb 6, 2012, at 3:32 PM, Nicholas Kwiatkowski <ni...@spoon.as> wrote:

> While not a GREAT component, we do have the PrintDataGrid, which actually
> handles the last two items you requested.  Multi-page printing is handled
> by queuing multiple pages into the print queue.
> 
> The options to set the DPI, page size, etc. is pretty limited, but it does
> exist...
> 
> I have a blog post on it from 2006, but it is still accurate for the most
> part :  http://quetwo.com/2006/10/01/printing-in-flex-part-1/
> 
> -Nick
> 
> On Mon, Feb 6, 2012 at 2:40 AM, Haykel BEN JEMIA <ha...@gmail.com> wrote:
> 
>> Flex could also add features for making the native flash printing system
>> easier to use. Some of the functionality I can think of:
>> 
>>  - Handle scaling based on DPI and page setup options (page size,
>>  orientation etc.).
>>  - Handle multi-page printing.
>>  - Make Flex components printable, e.g. with skins for printing like CSS
>>  for different media. For example a DataGrid could have a skin for
>> printing
>>  where it does not include scrollbars. Some components could also require
>>  more than just a special skin for printing.
>> 
>> 
>> Haykel
>> 
>> 
>> 
>> On 5 February 2012 18:04, Martin Heidegger <mh...@leichtgewicht.at> wrote:
>> 
>>> Hello Omar,
>>> 
>>> as far as I can tell we were talking about flex specific printing. Having
>>> problems with the flash player is a reality that needs to be dealt with.
>>> For one: If we encounter bugs during implementation we should document &
>>> report them properly. But also: We need to choose a implementation
>> strategy
>>> based on the things that work. There is a bunch of options to choose from
>>> that I can think of:
>>> 
>>> *) A system that prints using a standardized online service
>>> *) A system that uses native extensions
>>> *) A system that generates pdf on the client
>>> *) A system that works within the limitations of flash player printing
>>> 
>>> yours
>>> Martin.
>>> 
>> 

Re: [Discussion] Printing from Flex

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
I tried to summarize the discussion around Printing in the wiki. [1]

I am not sure which way to go from here. I got this crazy idea in my 
head to create a html representation of the UI that then can be printed 
using standard HTML printing and CSS. The problem with that would be 
that paging and printing to the borders are sort of dynamic.

Printing to a pdf is not without a reason not standardized. Its a 
complex topic - Any ideas?

yours
Martin.

[1] https://cwiki.apache.org/confluence/display/FLEX/Printing+for+flex



Re: [Discussion] Printing from Flex

Posted by Haykel BEN JEMIA <ha...@gmail.com>.
I'm aware of the existing options, but what I was suggesting is to use
these options that are low-level to make printing easier in Flex. For
example handling all the scaling and splitting into multiple pages based on
user's settings. But more interesting would be to add a way of defining
media-type specific skins (just an idea, perhaps there are other better
solutions) so that a developer  has  just to define special skins for
printing for his components and make a simple function call like
'Printer.print(myComponent)'.

Haykel



On 6 February 2012 21:32, Nicholas Kwiatkowski <ni...@spoon.as> wrote:

> While not a GREAT component, we do have the PrintDataGrid, which actually
> handles the last two items you requested.  Multi-page printing is handled
> by queuing multiple pages into the print queue.
>
> The options to set the DPI, page size, etc. is pretty limited, but it does
> exist...
>
> I have a blog post on it from 2006, but it is still accurate for the most
> part :  http://quetwo.com/2006/10/01/printing-in-flex-part-1/
>
> -Nick
>
> On Mon, Feb 6, 2012 at 2:40 AM, Haykel BEN JEMIA <ha...@gmail.com>
> wrote:
>
> > Flex could also add features for making the native flash printing system
> > easier to use. Some of the functionality I can think of:
> >
> >   - Handle scaling based on DPI and page setup options (page size,
> >   orientation etc.).
> >   - Handle multi-page printing.
> >   - Make Flex components printable, e.g. with skins for printing like CSS
> >   for different media. For example a DataGrid could have a skin for
> > printing
> >   where it does not include scrollbars. Some components could also
> require
> >   more than just a special skin for printing.
> >
> >
> > Haykel
> >
> >
> >
> > On 5 February 2012 18:04, Martin Heidegger <mh...@leichtgewicht.at> wrote:
> >
> > > Hello Omar,
> > >
> > > as far as I can tell we were talking about flex specific printing.
> Having
> > > problems with the flash player is a reality that needs to be dealt
> with.
> > > For one: If we encounter bugs during implementation we should document
> &
> > > report them properly. But also: We need to choose a implementation
> > strategy
> > > based on the things that work. There is a bunch of options to choose
> from
> > > that I can think of:
> > >
> > >  *) A system that prints using a standardized online service
> > >  *) A system that uses native extensions
> > >  *) A system that generates pdf on the client
> > >  *) A system that works within the limitations of flash player printing
> > >
> > > yours
> > > Martin.
> > >
> >
>

Re: [Discussion] Printing from Flex

Posted by Nicholas Kwiatkowski <ni...@spoon.as>.
While not a GREAT component, we do have the PrintDataGrid, which actually
handles the last two items you requested.  Multi-page printing is handled
by queuing multiple pages into the print queue.

The options to set the DPI, page size, etc. is pretty limited, but it does
exist...

I have a blog post on it from 2006, but it is still accurate for the most
part :  http://quetwo.com/2006/10/01/printing-in-flex-part-1/

-Nick

On Mon, Feb 6, 2012 at 2:40 AM, Haykel BEN JEMIA <ha...@gmail.com> wrote:

> Flex could also add features for making the native flash printing system
> easier to use. Some of the functionality I can think of:
>
>   - Handle scaling based on DPI and page setup options (page size,
>   orientation etc.).
>   - Handle multi-page printing.
>   - Make Flex components printable, e.g. with skins for printing like CSS
>   for different media. For example a DataGrid could have a skin for
> printing
>   where it does not include scrollbars. Some components could also require
>   more than just a special skin for printing.
>
>
> Haykel
>
>
>
> On 5 February 2012 18:04, Martin Heidegger <mh...@leichtgewicht.at> wrote:
>
> > Hello Omar,
> >
> > as far as I can tell we were talking about flex specific printing. Having
> > problems with the flash player is a reality that needs to be dealt with.
> > For one: If we encounter bugs during implementation we should document &
> > report them properly. But also: We need to choose a implementation
> strategy
> > based on the things that work. There is a bunch of options to choose from
> > that I can think of:
> >
> >  *) A system that prints using a standardized online service
> >  *) A system that uses native extensions
> >  *) A system that generates pdf on the client
> >  *) A system that works within the limitations of flash player printing
> >
> > yours
> > Martin.
> >
>

Re: [Discussion] Printing from Flex

Posted by Haykel BEN JEMIA <ha...@gmail.com>.
Flex could also add features for making the native flash printing system
easier to use. Some of the functionality I can think of:

   - Handle scaling based on DPI and page setup options (page size,
   orientation etc.).
   - Handle multi-page printing.
   - Make Flex components printable, e.g. with skins for printing like CSS
   for different media. For example a DataGrid could have a skin for printing
   where it does not include scrollbars. Some components could also require
   more than just a special skin for printing.


Haykel



On 5 February 2012 18:04, Martin Heidegger <mh...@leichtgewicht.at> wrote:

> Hello Omar,
>
> as far as I can tell we were talking about flex specific printing. Having
> problems with the flash player is a reality that needs to be dealt with.
> For one: If we encounter bugs during implementation we should document &
> report them properly. But also: We need to choose a implementation strategy
> based on the things that work. There is a bunch of options to choose from
> that I can think of:
>
>  *) A system that prints using a standardized online service
>  *) A system that uses native extensions
>  *) A system that generates pdf on the client
>  *) A system that works within the limitations of flash player printing
>
> yours
> Martin.
>

Re: [Discussion] Printing from Flex

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
Hello Omar,

as far as I can tell we were talking about flex specific printing. 
Having problems with the flash player is a reality that needs to be 
dealt with. For one: If we encounter bugs during implementation we 
should document & report them properly. But also: We need to choose a 
implementation strategy based on the things that work. There is a bunch 
of options to choose from that I can think of:

  *) A system that prints using a standardized online service
  *) A system that uses native extensions
  *) A system that generates pdf on the client
  *) A system that works within the limitations of flash player printing

yours
Martin.

Re: [Discussion] Printing from Flex

Posted by Omar Gonzalez <om...@gmail.com>.
On Sunday, February 5, 2012, Marc Pires <ma...@gmail.com> wrote:
> I agree with you guys, Flash player printing support is terrible. I'd like
> to work on solid solution for that. Let's see how it develops as soon as
> the source code is available.
>

I've lost track of the amount of times we've stated on this list that we
_are not_ receiving code for Flash Player, not will we be receiving that
code any time in the near or far future. So, printing solutions can be
worked on only using the currently exposed APIs in the Flash Player. Let's
please stop focusing on Flash Player, this is the Apache Flex project and
we do not have and will not have access to Flash Player source.

-omar

Re: [Discussion] Printing from Flex

Posted by Marc Pires <ma...@gmail.com>.
I agree with you guys, Flash player printing support is terrible. I'd like
to work on solid solution for that. Let's see how it develops as soon as
the source code is available.

On Sun, Feb 5, 2012 at 11:18 AM, Alex Harui <ah...@adobe.com> wrote:

>
>
>
> On 2/4/12 8:06 AM, "Martin Heidegger" <mh...@leichtgewicht.at> wrote:
>
> > Hello Jack,
> >
> > I came to the conclusion that printing is basically broken in flash. I
> > didn't manage to get a solid printing solution done with Flash even with
> > years of experience and two weeks time last October. Pages were
> > distorted, missing or black. I was rather astonished because I remember
> > a working printing solution in Flash Player 9. It seems it doesn't work
> > since Flash Player 10.2 or so. Don't get me wrong: It works for some
> > cases like if the sheet to print is simple enough as vector or small
> > enough as bitmap, but it has very narrow limits. Bugs have been filed
> > and marked fixed, even though they are not. I didn't take the time to
> > provide a solid test suite at that time for printing with broken results
> > as I got into serious deadline problems because of mentioned bugs.
> Sounds like you hit the advanced printing bug where the player will try to
> generate a 600DPI bitmap of the page, run out of spooling space and corrupt
> the print job.  Should have been alleviated a bit in 10.3.
>
> Otherwise, the Flex print components have issues, but player printing is
> good enough for digital yearbooks.
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>

Re: [Discussion] Printing from Flex

Posted by Dave Fisher <da...@comcast.net>.
Other choices that may not be well-known for the backend.

(1) Apache POI has the ability to produce PPT and PPTX. http://poi.apache.org/

(2) Apache ODF Toolkit (incubating) will produce ODF. http://incubator.apache.org/odftoolkit/ 

Both these projects help with reading Office files as well.

Regards,
Dave

On Feb 4, 2012, at 2:21 PM, Jarosław Szczepankiewicz wrote:

> Pdf from backend is superior for that
> 04-02-2012 23:17 użytkownik "Carlos Rovira" <ca...@codeoscopic.com>
> napisał:
> 
>> Normaly people use to solve in The backend layer.
>> 
>> El sábado 4 de febrero de 2012, Marcus Fritze <
>> marcus.fritze@googlemail.com>
>> escribió:
>>> Hi,
>>> 
>>> yes printing from Flash / Flex is really a pain. Years ago I filled 2
>> issues to the JIRA:
>>> 
>>> https://bugs.adobe.com/jira/browse/FLEXDMV-2532  [Dependent]
>> PrintAdvancedDataGrid not working correctly
>>> 
>>> https://bugs.adobe.com/jira/browse/SDK-29607  predefine custom page size
>> for printing with FlexPrintJob
>>> 
>>> But I think this is not a Flex issue. I think it's more a problem of the
>> Flash Player.
>>> 
>>> Printing is a big topic, which has to be fixed!
>>> 
>>> 
>>> Marcus
>> 
>> --
>> Sent from Gmail Mobile
>> 


Re: [Discussion] Printing from Flex

Posted by Filipe Freitas <fi...@gmail.com>.
On Sat, Feb 4, 2012 at 10:40 PM, Arnoud Bos <ar...@artim-interactive.nl>wrote:

> true, server side pdf creation is mostly used.
>
> but if you really want to create client side pdf's you can
> also try http://code.google.com/p/purepdf/ instead of alivepdf.
> didn't try it myself though, but seems more capable of alivepdf.


I ended up using alivePDF over purePDF mostly because of the swc size.
But I guess that depends on the project requirements.

Re: [Discussion] Printing from Flex

Posted by Arnoud Bos <ar...@artim-interactive.nl>.
true, server side pdf creation is mostly used.

but if you really want to create client side pdf's you can 
also try http://code.google.com/p/purepdf/ instead of alivepdf.
didn't try it myself though, but seems more capable of alivepdf.


On Feb 4, 2012, at 11:21 PM, Jarosław Szczepankiewicz wrote:

> Pdf from backend is superior for that
> 04-02-2012 23:17 użytkownik "Carlos Rovira" <ca...@codeoscopic.com>
> napisał:
> 
>> Normaly people use to solve in The backend layer.
>> 
>> El sábado 4 de febrero de 2012, Marcus Fritze <
>> marcus.fritze@googlemail.com>
>> escribió:
>>> Hi,
>>> 
>>> yes printing from Flash / Flex is really a pain. Years ago I filled 2
>> issues to the JIRA:
>>> 
>>> https://bugs.adobe.com/jira/browse/FLEXDMV-2532  [Dependent]
>> PrintAdvancedDataGrid not working correctly
>>> 
>>> https://bugs.adobe.com/jira/browse/SDK-29607  predefine custom page size
>> for printing with FlexPrintJob
>>> 
>>> But I think this is not a Flex issue. I think it's more a problem of the
>> Flash Player.
>>> 
>>> Printing is a big topic, which has to be fixed!
>>> 
>>> 
>>> Marcus
>> 
>> --
>> Sent from Gmail Mobile
>> 

Met vriendelijke groet,

Arnoud Bos
Artim interactive

E  arnoud@artim-interactive.nl
W  www.artim-interactive.nl
T  +31 6 246 40 216
A  Elisabeth Wolffstraat 77-3
   1053TT Amsterdam





Re: [Discussion] Printing from Flex

Posted by Jarosław Szczepankiewicz <js...@gmail.com>.
Pdf from backend is superior for that
04-02-2012 23:17 użytkownik "Carlos Rovira" <ca...@codeoscopic.com>
napisał:

> Normaly people use to solve in The backend layer.
>
> El sábado 4 de febrero de 2012, Marcus Fritze <
> marcus.fritze@googlemail.com>
> escribió:
> > Hi,
> >
> > yes printing from Flash / Flex is really a pain. Years ago I filled 2
> issues to the JIRA:
> >
> > https://bugs.adobe.com/jira/browse/FLEXDMV-2532  [Dependent]
> PrintAdvancedDataGrid not working correctly
> >
> > https://bugs.adobe.com/jira/browse/SDK-29607  predefine custom page size
> for printing with FlexPrintJob
> >
> > But I think this is not a Flex issue. I think it's more a problem of the
> Flash Player.
> >
> > Printing is a big topic, which has to be fixed!
> >
> >
> > Marcus
>
> --
> Sent from Gmail Mobile
>

Re: [Discussion] Printing from Flex

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
Using a backend is not an available option in a AIR application or a 
Projector (yes, there are still use-cases where Air can not be 
involved). Aside that: I think this is a sad statement. The Flash 
Players internal printing API is powerful enough in theory for good 
printing - printing works in computers for ages now. Going the way of 
pdf generation is always resulting in a usability drawback compared to 
direct printing.

However: I don't see why flex should restrict itself to client only. 
While we do not need to provide server components (written in language 
X) we can define a server protocol for creating pdfs. Workarounds for 
air applications in form of NativeExtensions might be worth a thought too.

yours
Martin.



On 05/02/2012 07:17, Carlos Rovira wrote:
> Normaly people use to solve in The backend layer.


Re: [Discussion] Printing from Flex

Posted by John Fletcher <fl...@gmail.com>.
2012/2/4 Carlos Rovira <ca...@codeoscopic.com>

> Normaly people use to solve in The backend layer.
>
I need to print pages containing a combination of charts with legends and
other components. Backend is therefore not an option. We got there, but
it was a nightmare and the current code just feels so hacked up. I think
printing is the most lacking part of Flex. One would assume that a
framework aimed at the frontend should really have good printing
capabilities.
John

Re: [Discussion] Printing from Flex

Posted by Carlos Rovira <ca...@codeoscopic.com>.
Normaly people use to solve in The backend layer.

El sábado 4 de febrero de 2012, Marcus Fritze <ma...@googlemail.com>
escribió:
> Hi,
>
> yes printing from Flash / Flex is really a pain. Years ago I filled 2
issues to the JIRA:
>
> https://bugs.adobe.com/jira/browse/FLEXDMV-2532  [Dependent]
PrintAdvancedDataGrid not working correctly
>
> https://bugs.adobe.com/jira/browse/SDK-29607  predefine custom page size
for printing with FlexPrintJob
>
> But I think this is not a Flex issue. I think it's more a problem of the
Flash Player.
>
> Printing is a big topic, which has to be fixed!
>
>
> Marcus

-- 
Sent from Gmail Mobile

Re: [Discussion] Printing from Flex

Posted by Marcus Fritze <ma...@googlemail.com>.
Hi,

yes printing from Flash / Flex is really a pain. Years ago I filled 2 issues to the JIRA:

https://bugs.adobe.com/jira/browse/FLEXDMV-2532  [Dependent] PrintAdvancedDataGrid not working correctly

https://bugs.adobe.com/jira/browse/SDK-29607  predefine custom page size for printing with FlexPrintJob

But I think this is not a Flex issue. I think it's more a problem of the Flash Player.

Printing is a big topic, which has to be fixed!


Marcus

Re: [Discussion] Printing from Flex

Posted by Alex Harui <ah...@adobe.com>.


On 2/4/12 8:06 AM, "Martin Heidegger" <mh...@leichtgewicht.at> wrote:

> Hello Jack,
> 
> I came to the conclusion that printing is basically broken in flash. I
> didn't manage to get a solid printing solution done with Flash even with
> years of experience and two weeks time last October. Pages were
> distorted, missing or black. I was rather astonished because I remember
> a working printing solution in Flash Player 9. It seems it doesn't work
> since Flash Player 10.2 or so. Don't get me wrong: It works for some
> cases like if the sheet to print is simple enough as vector or small
> enough as bitmap, but it has very narrow limits. Bugs have been filed
> and marked fixed, even though they are not. I didn't take the time to
> provide a solid test suite at that time for printing with broken results
> as I got into serious deadline problems because of mentioned bugs.
Sounds like you hit the advanced printing bug where the player will try to
generate a 600DPI bitmap of the page, run out of spooling space and corrupt
the print job.  Should have been alleviated a bit in 10.3.

Otherwise, the Flex print components have issues, but player printing is
good enough for digital yearbooks.

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [Discussion] Printing from Flex

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
Hello Jack,

I came to the conclusion that printing is basically broken in flash. I 
didn't manage to get a solid printing solution done with Flash even with 
years of experience and two weeks time last October. Pages were 
distorted, missing or black. I was rather astonished because I remember 
a working printing solution in Flash Player 9. It seems it doesn't work 
since Flash Player 10.2 or so. Don't get me wrong: It works for some 
cases like if the sheet to print is simple enough as vector or small 
enough as bitmap, but it has very narrow limits. Bugs have been filed 
and marked fixed, even though they are not. I didn't take the time to 
provide a solid test suite at that time for printing with broken results 
as I got into serious deadline problems because of mentioned bugs.

I am telling this because my attempt to a good printing solution would 
be first to see how much is working right now. With reproducible, 
complex tests. After that I think it would be interesting to elaborate 
about a nicer, easier-to-use API within the Flex context (that is long 
overdue).

yours
Martin.

Re: [Discussion] Printing from Flex

Posted by Martin Heidegger <mh...@leichtgewicht.at>.
On 05/02/2012 09:40, jude wrote:
> If you create an example like this, http...
I think the license under which that example posted this code is pretty 
unacceptable. Also it is easier to discuss code properly if we post code 
at github.

yours
Martin.

Re: [Discussion] Printing from Flex

Posted by jude <fl...@gmail.com>.
I agree. It should be solved. I think the best way is to get an example
project that tests the different print scenarios. I spent some time working
with printing and it was overly complex but eventually got it to work.

If you create an example like this,
http://www.judahfrangipane.com/examples/webview/WebViewExamples.fxp, then
you can send it to me or anyone else on who wants to help if you have any
issues. If we can get all the cases to work then the problem we need to
solve would be how to simplify it.

On Sat, Feb 4, 2012 at 9:15 AM, Jack Ring <ja...@gmail.com> wrote:

> Hello everyone.
> I'm half way into building an enterprise application using Flex, Air,
> Coldfusion and SQL. I feel that the framework lacks in the area of
> printing. For example Alive PDF and mx PrintDataGrid are not up to standard
> at all. I don't know much in the way of building frameworks but everything
> is so easy to work with and looks great on screen but when I want to
> generate reports for print I have to go to a 3 rd party solution or use
> that antiquated mx:PrintDataGrid component. I have a graphic arts
> background and I find myself fighting these components so hard that I
> always end up compromising on the way my application is represented on
> paper. Shouldn't there be at least a built in spark PrintDataGrid?
>
> Thanks,
> Jack Ring