Weird, Inconsistent Output when using "printTheDocument" api

Using Print2Flash Document API
Post Reply
rchoquette
Posts:1
Joined:Sun Oct 05, 2008 2:33 pm
Weird, Inconsistent Output when using "printTheDocument" api

Post by rchoquette » Sun Oct 05, 2008 2:44 pm

Re: Weird, Inconsistent Document Printer Output when using "printTheDocument" api function.

I have a flex application which performs an SWFLoader on an application which calls Print2FlashDoc; and here they are:

1) Main application:
**********

Code: Select all

<?xml version="1.0"?>
<!-- Simple example to demonstrate the Print2FlashDoc control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%">
    <mx:SWFLoader id="myLoader" width="100%" height="100%" source="Print2FlashDocExample.swf"/>
</mx:Application>
**********
and...

2) The application which is called by the main application, and subsequently calls "Print2FlashDoc".

**********

Code: Select all

<?xml version="1.0"?>
<!-- Simple example to demonstrate the Print2FlashDoc control. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:ns1="Print2Flash.*">
    <ns1:Print2FlashDoc width="100%" height="100%" source="sample.swf" id="doc"/>
</mx:Application>
**********

When I print within a fully expanded IE full screen, the sample.swf prints just fine; however, when I shrink the IE browser - even in the slightest - although the document prints, for each page that prints, only about two thirds of the page actually prints correctly - the other third is blanked out with whatever background color is set by the index.html! It’s a major serious drain on my color toner cartridges.

Now when I do not use an SWFLoader to load an application with a call to Print2FlashDoc which interfaces with the Print2Flash flex API, provided that the call of the Print2FlashDoc is isolated the root of the application hierarchy - everything is hunky-dory and it works just fine! Now this problem only occurs when I use the SWFLoader to load the Print2FlashDoc application which interfaces with the Print2Flash flex API. Now, to me, it sounds like we have some sort of inheritance issues in the API. It’s just my first hunch.

So there you have it! And I have provided this sample code (which compiles and runs) and you should be able to duplicate it on your end.

I am running Adobe flash player 9 (i.e. "9,0,124,0"); and flex 3.

If you have any work around for this sort of thing, it would be greatly appreciated.

I'm a registered user.

Thank you,

Robert.

bvkimball
Posts:2
Joined:Mon Oct 13, 2008 11:04 am

Re: Weird, Inconsistent Output when using "printTheDocument" api

Post by bvkimball » Mon Oct 13, 2008 11:24 am

Hi,

I am also getting this error when i load p2f .swf file into my Flash application. I am using the AS2 Loader component. I am having my clients download the source document and print that but this is not really an acceptable workaround.

The issue is not consistent. Some documents work fine others don't. I can consitently reproduce the problem with an image based pdf. I think the issue might be caused by the version of the PDF i am converting, which is (1.6). But to be honest i have no idea why it does it. Any help on this will be greatly appreciated.

Robert what is the source of your .swf files?

Regards,
Brian

bvkimball
Posts:2
Joined:Mon Oct 13, 2008 11:04 am

Re: Weird, Inconsistent Output when using "printTheDocument" api

Post by bvkimball » Tue Feb 03, 2009 9:23 am

I finnally had time to go back and debug this issue. It was cause because i place my p2f MovieClip inside a Scrollpane and the mask of the scrollpane was messing up the printjob.

All you need to do is.
----------------------------------------------------------------
myScrollPane.setMask(null);
p2f.printTheDocument();
myScrollPane.setMast(myScrollPane.mask_mc);
----------------------------------------------------------------
mask_mc is the default MovieClip name for the scrollpane's mask

I hope this helps anyone else that gets this error.

ithrasher
Posts:2
Joined:Mon Apr 13, 2009 1:29 pm

Re: Weird, Inconsistent Output when using "printTheDocument" api

Post by ithrasher » Mon Apr 13, 2009 1:33 pm

I'm having the same printing problem as well in Flash 10.0.12/22, but not in version 9.0.124.

Unfortunately, I cannot figure out a way to fix this.

Robert, did you find a solution? Exactly, what did you do when you said you "do not use an SWFLoader to load an application with a call to Print2FlashDoc?"

thanks for the help!

Post Reply