开发者

Is there an implementation of ACPrintFix (Flash printing fix) for Fusion Charts Free?

I have a page containing a mix of HTML and Flash content produced by Fusion Charts Free. I'd like people to be able to print this page, but it looks like browsers other than IE are not capable of doing that; content from plugins like Flash just turns up empty in the printout.

I did some research and came across 开发者_Python百科this fix, designed originally for AnyChart, but released as a stand-alone library. This appears to be what most people are using to solve the problem. Unfortunately, the fix is written in ActionScript 3, while Fusion Free is written in ActionScript 2.

I've spent some time trying to port the fix back to AS2, but that's proving difficult. And I'm not looking forward to migrating all of Fusion Free to AS3. I have some Flash experience, but that was pre-AS3, and not on the level required for this project.

I also came across this question, which has one promising answer, but it appears to apply only to Flash Open Charts.

Since Fusion is a pretty popular package, it seems like someone should have run into this problem before me. Has anyone already implemented a print-fix for Fusion?


A solution would be to make a dedicated print view (much like a print stylesheet in CSS) and use that for printing : http://livedocs.adobe.com/flex/3/html/help.html?content=printing_4.html#127813

You should be able to access the bitmap data for the image of the component from inside your own component, if you had one that wrapped FusionCharts.


The answer to this question is no; there is not. It is also impractical to port ACPrintFix to AS1/AS2, because ACPrintFix relies on the ByteArray class, which is only available in AS3.

In the end I solved this problem by porting Fusion to AS3. This was laborious, since the existing AS1/AS2 code was not terribly well written; there were many instances, for example, of variables being referenced with different case, i.e. xpos v.s. xPos; these all had to be reviewed and standardized.

The end result, however, works quite well. And since the Fusion code is now modern AS3, applying custom modifications is much easier than when it was in its original state.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜