Dear All,
I am facing a problem for pdf page.i
var bitmapData:BitmapData=new BitmapData(map.width,map.height);
bitmapData.draw(map);
var byteArray:ByteArray =jpEncoder.encode(bitmapData);
var page:Page = new Page ( Orientation.LANDSCAPE, Unit.POINT,Size.A4);
fileRefPDF = new PDF(Orientation.LANDSCAPE, Unit.POINT,Size.A4);
fileRefPDF.setDisplayMode(Display.FULL_PAGE, Layout.SINGLE_PAGE);
fileRefPDF.addPage (page);
fileRefPDF.addImageStream(byteArray,ColorSpace.DEVICE_RGB,new Resize(Mode.FIT_TO_PAGE,Position.LEFT),0,0,1150,900,0,1,"NORMAL",null);
the above code for pdf page.my actual height of map is 487 and i want it 900.when i do it in pdf.addimagestream(byteArray,ColorSpace.DEVICE_RGB,new Resize(Mode.FIT_TO_PAGE,Position.LEFT),0,0,1150,900,0,1,"NORMAL",null);
My map image become stretched.there is any way that my image should not stretched n pdf?
Thanks for all in advance.
Waiting for reply.
I am facing a problem for pdf page.i
var bitmapData:BitmapData=new BitmapData(map.width,map.height);
bitmapData.draw(map);
var byteArray:ByteArray =jpEncoder.encode(bitmapData);
var page:Page = new Page ( Orientation.LANDSCAPE, Unit.POINT,Size.A4);
fileRefPDF = new PDF(Orientation.LANDSCAPE, Unit.POINT,Size.A4);
fileRefPDF.setDisplayMode(Display.FULL_PAGE, Layout.SINGLE_PAGE);
fileRefPDF.addPage (page);
fileRefPDF.addImageStream(byteArray,ColorSpace.DEVICE_RGB,new Resize(Mode.FIT_TO_PAGE,Position.LEFT),0,0,1150,900,0,1,"NORMAL",null);
the above code for pdf page.my actual height of map is 487 and i want it 900.when i do it in pdf.addimagestream(byteArray,ColorSpace.DEVICE_RGB,new Resize(Mode.FIT_TO_PAGE,Position.LEFT),0,0,1150,900,0,1,"NORMAL",null);
My map image become stretched.there is any way that my image should not stretched n pdf?
Thanks for all in advance.
Waiting for reply.