Copy link to clipboard
Copied
I have added a TextField to every page of PDF doc, and field have alpha .4. When pages were added to a printjob with a PrintJobOptions printAsBitmap = true, only first page of printed doc has a field with transparency and then it is gone on other pages. How to solve this problem?
Copy link to clipboard
Copied
how do you add the textfields to your flash document?
How do you separate the contents of your pages (is the document separated in scenes/keyframes or otherwise?)
Copy link to clipboard
Copied
I used FlexPaperViewer for a loading and preview of doc.
This is printing code:
public function printPaper():void{
if(_libMC.parent is DupImage){
(_swfContainer.getChildAt(0) as UIComponent).addChild(_libMC);
}
_libMC.alpha = 1;
var pj:PrintJob = new PrintJob();
if(pj.start()){
_libMC.stop();
if((pj.pageHeight/_libMC.height) < 1 && (pj.pageHeight/_libMC.height) < (pj.pageWidth/_libMC.width))
_libMC.scaleX = _libMC.scaleY = (pj.pageHeight/_libMC.height);
else if((pj.pageWidth/_libMC.width) < 1)
_libMC.scaleX = _libMC.scaleY = (pj.pageWidth/_libMC.width);
var watermark:TextField = waterMarkDoc();
var options:PrintJobOptions = new PrintJobOptions();
options.printAsBitmap = true;
for(var i:int=0;i<_libMC.framesLoaded;i++){
_libMC.gotoAndStop(i+1);
(_swfContainer.getChildAt(0) as UIComponent).addChild(waterMarkDoc());
pj.addPage(_swfContainer, null, options);
}
pj.send();
}
_libMC.scaleX = _libMC.scaleY = 1;
_libMC.alpha = 0;
}
Copy link to clipboard
Copied
Well, the problem was that I added watermark to every _swfContainer.getChildAt(0) as UIComponent. Adding if (i == 0) before statement: (_swfContainer.getChildAt(0) as UIComponent).addChild(waterMarkDoc()); solved my problem.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now