Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Printing PDF with a transparent TextField

Guest
Oct 08, 2013 Oct 08, 2013

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?

TOPICS
ActionScript
553
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Oct 08, 2013 Oct 08, 2013

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?)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 08, 2013 Oct 08, 2013

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;

                    }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 08, 2013 Oct 08, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines