AlivePDF icon indicating copy to clipboard operation
AlivePDF copied to clipboard

addImage cuts off the image if it does not fit in page

Open GoogleCodeExporter opened this issue 10 years ago • 4 comments

hi,

i want to print to pdf through flex.
alive pdf does this but i am printing a vbox to pdf if the height of vbox is 
more than A4 size it cuts off the content and doesn't add new page.

i tried adding a new page but it doesn't do the needfull it gets added as a 
blank page. :(

please help
its vey urgent 


thanks in advance.

Original issue reported on code.google.com by [email protected] on 21 Apr 2011 at 6:03

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter

I am facing the same problem. Any solutions?

Original comment by [email protected] on 12 Jul 2011 at 2:41

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter

Hi,

Use below code, hope it will help you.

myPDF.addImage(img.content, new Resize ( Mode.FIT_TO_PAGE, Position.CENTERED ));

Thanks,
Ravi

Original comment by [email protected] on 7 Sep 2011 at 11:28

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter

Thank you for the answer! I was having the same problem and now I managed to 
resize my image.

Original comment by [email protected] on 25 Feb 2012 at 8:06

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter

The solution provided by ravichandran96 only works if the image you are trying 
to add is the only content on that page. In my case, the image is positioned at 
the bottom half of the page since the upper half has other content (e.g. grids, 
image and text). So, I need the rather long image to start at the bottom half 
and continue, if needed, on subsequent pages.

Again, this is still an issue.

Original comment by [email protected] on 10 May 2012 at 3:10

GoogleCodeExporter avatar Oct 22 '15 18:10 GoogleCodeExporter