I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
Asked
Active
Viewed 623 times
1 Answers
0
I think if you use the fit_to_page option should work.
printPDF.addImage(this , 0 , 0 , 0 , 0 , 'PNG' , 100 , 1 , ResizeMode.FIT_TO_PAGE);

Claudio Sermenghi
- 318
- 1
- 8
-
it is not working anymore now my code have been executed for your kind if information the code that should be us used for scaling is like this: print to PDF with the settings established var printPDF:PDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.A4); printPDF.setDisplayMode(Display.FULL_WIDTH, Layout.SINGLE_PAGE); printPDF.addPage(); printPDF.addImage(whatToPrint, 0, 0, 0, 0, 'PNG', 100, 1, ResizeMode.RESIZE_PAGE); printPDF.save(Method.REMOTE, serverScript, howToOutput, 'alivePDFExample.pdf'); } – Flex SDK Jan 31 '11 at 11:38
-
I dont understand what your problem is. I think you should paste your code using the correct formatting option in orde to make it readable. Anyway what kind of error are you getting when you compile the application? – Claudio Sermenghi Jan 31 '11 at 15:23