2 Replies Latest reply on Sep 1, 2009 9:13 PM by Varun Bajaj (PHP)

    Printing font's are blur

    Varun Bajaj (PHP)

      HI

       

      I am using advancedPrinDataGrid to display my data on paper but my output format shows blur text.

      My code is as follows.

       

      var printJob:FlexPrintJob = new FlexPrintJob();
                  if (printJob.start()) {

       

                      var thePrintView:FormPrintView = new FormPrintView();
                     Application.application.addChild(thePrintView);
                     
                      //Set the print view properties.
                      thePrintView.width=printJob.pageWidth;
                      thePrintView.height=printJob.pageHeight;
                      thePrintView.title = tableTitleInput.text;
                     
                      // Set the data provider of the FormPrintView component's data grid
                      // to be the data provider of the displayed data grid.
                      thePrintView.myDataGrid.source = adg2;
                      thePrintView.myDataGrid.sizeToPage = true;
                      thePrintView.myDataGrid.allowInteraction = false;
                      thePrintView.myDataGrid.wordWrap=true;
                      thePrintView.myDataGrid.headerWordWrap=true;
                      thePrintView.myDataGrid.variableRowHeight=true;
                      thePrintView.horizontalScrollPolicy = ScrollPolicy.OFF;
                      thePrintView.myDataGrid.percentWidth = 98;
                      thePrintView.myDataGrid.percentWidth = 100;
                      thePrintView.myDataGrid.styleName = "textStyle";
                      thePrintView.myDataGrid.setStyle("headerStyleName","mydataGridHeaderStyle");
                      //thePrintView.myDataGrid.height = 792;
                      thePrintView.myDataGrid.validateNow();
                      //Update the DataGrid layout to reflect the results.

       

       

       

                    
                                  printJob.addObject(thePrintView);
                                  thePrintView.footer.pageNumber++;
                  
                                   Application.application.removeChild(thePrintView);
                  }
                  // Send the job to the printer.
                  printJob.send();

       

      }//end fucntion

       

       

      <mx:Style>
              .textStyle{
                   fontFamily: Arial;
                   fontWeight: normal;
                   fontSize: 8;
                   fontStyle: normal;
                   textDecoration: none;
              }

       

              .mydataGridHeaderStyle {
                 fontFamily: Arial;
                 fontWeight: bold;
                 fontSize: 8;
                 fontStyle: normal;
                 textDecoration: none;
              }
          </mx:Style>

       

       

      thanks for your help.