Since there doesn't appear to be any follow-up to this topic, I'll provide
an example.  I recently started working with printing (using 2.0.1) and
noticed this problem of the background colour "bleeding" through into the
margin of the printed output.  This might be printer/driver specific,
though.  It happens on my HP Photosmart 2575 printer, but doesn't happen
when I print to a PDF using CutePDF Writer.  A quick example follows below.
It would be good to know if this happens with other people's printers, and
hopefully someone has a workaround.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
backgroundColor="0xff0000">
   <mx:Script>
       <![CDATA[
       import mx.printing.FlexPrintJobScaleType;
       import mx.printing.FlexPrintJob;

       private function doPrint(): void
       {
           var job: FlexPrintJob = new FlexPrintJob();
           job.printAsBitmap = false;
           if (job.start())
           {
               job.addObject(preview, FlexPrintJobScaleType.SHOW_ALL);
               job.send();
           }
       }
       ]]>
   </mx:Script>

   <mx:Button x="24" y="31" label="Print" click="doPrint()"/>
   <mx:HBox id="preview" x="24" y="61" backgroundColor="0xffffff"
paddingLeft="20" paddingRight="20" paddingTop="10" paddingBottom="0">
       <mx:Canvas height="665" width="500" backgroundColor="0xffffff">
           <mx:DataGrid x="0" width="100%">
               <mx:columns>
                   <mx:DataGridColumn headerText="Column 1"
dataField="col1"/>
                   <mx:DataGridColumn headerText="Column 2"
dataField="col2"/>
                   <mx:DataGridColumn headerText="Column 3"
dataField="col3"/>
               </mx:columns>
           </mx:DataGrid>
       </mx:Canvas>
   </mx:HBox>
</mx:Application>


On 11/6/06, Samuel Reuben <[EMAIL PROTECTED]> wrote:

  can you send a the isolated printing code that you are seeing the
problem in?

Are you by any chance mentioning the corners that show the bg color,
specially when the component has rounded corners?

Thanks,
-sam

On 11/6/06, Tom Bray <[EMAIL PROTECTED]> wrote:
>
>   The background color of my application is printing in the margins of
> the page when I print my component in landscape mode.  In portrait mode,
> there's a tiny sliver of the bg color on each side.  Is there a way to
> prevent that besides using a white background?  It seems like a bug since I
> can't actually print my component in those areas (it gets cropped at the
> margins) but the background color shows anyway.  Any thoughts?
>
> Thanks,
>
> Tom
>

Reply via email to