Select to view content in your preferred language

AlivePdf ??? Export issue ??? Unable to hide Scalebar , zoomSliderBar and logo in the pdf

948
2
10-07-2010 03:29 AM
nidhiarora
Deactivated User
Hi ,
  I am using  Flex 2.1 and Alive pdf to  export  map object to pdf. I am able to export the Map object  to pdf .
Before exporting , I have removed the scalebar , zoomSliderbar  and logo  from com.esri.ags.Map object.
but the updated map object  is not reflected in the  pdf.

private function exportToPdf():void
{
   
portPDF=new PDF(Orientation.LANDSCAPE,Unit.MM,Size.LETTER);
portPDF.setDisplayMode(Display.FULL_PAGE,Layout.SINGLE_PAGE);
portPDF.setMargins(2,2,2,2);
portPDF.addPage();
var rs:org.alivepdf.layout.Resize=new org.alivepdf.layout.Resize("FitToPage","left");
myMap.scaleBarVisible=false;
myMap.zoomSliderVisible=false;
myMap.logoVisible=false
portPDF.addImage(myMap,rs,3,3,420,300,0,1,false,ImageFormat.JPG,100,"Normal",null);
const fileReference:FileReference = new FileReference();
fileReference.save(portPDF.save(Method.LOCAL,"",Download.INLINE,"portPDF.pdf"),"map.pdf");
   
myMap.scaleBarVisible=true;
myMap.zoomSliderVisible=true;
myMap.logoVisible=true;
   
}

I am not sure , if i am missing something.
Thanks in anticipation of your help.
Regards,
Nidhi
Tags (2)
0 Kudos
2 Replies
TonyCollins
Regular Contributor
Hi ,
  I am using  Flex 2.1 and Alive pdf to  export  map object to pdf. I am able to export the Map object  to pdf .
Before exporting , I have removed the scalebar , zoomSliderbar  and logo  from com.esri.ags.Map object.
but the updated map object  is not reflected in the  pdf.

private function exportToPdf():void
{
   
portPDF=new PDF(Orientation.LANDSCAPE,Unit.MM,Size.LETTER);
portPDF.setDisplayMode(Display.FULL_PAGE,Layout.SINGLE_PAGE);
portPDF.setMargins(2,2,2,2);
portPDF.addPage();
var rs:org.alivepdf.layout.Resize=new org.alivepdf.layout.Resize("FitToPage","left");
myMap.scaleBarVisible=false;
myMap.zoomSliderVisible=false;
myMap.logoVisible=false
portPDF.addImage(myMap,rs,3,3,420,300,0,1,false,ImageFormat.JPG,100,"Normal",null);
const fileReference:FileReference = new FileReference();
fileReference.save(portPDF.save(Method.LOCAL,"",Download.INLINE,"portPDF.pdf"),"map.pdf");
   
myMap.scaleBarVisible=true;
myMap.zoomSliderVisible=true;
myMap.logoVisible=true;
   
}

I am not sure , if i am missing something.
Thanks in anticipation of your help.
Regards,
Nidhi



After you hide/show the map elements use map.validateNow();
0 Kudos
nidhiarora
Deactivated User
t0ny;44674 wrote:
After you hide/show the map elements use map.validateNow();[/QUOTE

Thanks a ton. It is working now
Regards
Nidhi
0 Kudos