sivarajankumar / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

AddImage crops PNG image in PDF #160

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Add am image to a PDF file. See code below. I am looping over an array of
Canvas objects and adding them to the PDF file.

private function doPrint():void {
        var printPDF:PDF = new PDF( Orientation.PORTRAIT, Unit.POINT, Size.LETTER );
        printPDF.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE  );
        printPDF.setMargins(10,10,10,10)
        for (var j:uint = 0; j < number_log_pages; j++) {
            printPDF.addPage();
            printPDF.addImage( pageArray[j], 10, 10, 575, 710, "PNG", 100, 1,
ResizeMode.NONE );
        }
        printPDF.save( Method.REMOTE, "pdfCreator.cfm", Download.INLINE,
"borehole.pdf" );
    } 

What is the expected output? What do you see instead?
I should see the full Canvas object as a PNG image on the page. Instead the
bottom is always cut off no matter how I resize the object and change the
width/height - it seems the bottom 5% of the image is always cut off. 

What version of the product are you using? On what operating system?
AlivePDF 0.1.4.9 on Windows

Please provide any additional information below.
See attached file. The bottom is cut off - the scale should finish at 15
and 30 on the two pages and there should be a bottom horizontal line. Also
why does the top margin look so much greater than 10, the value I am using
in the code?

Original issue reported on code.google.com by NEMACSt...@gmail.com on 11 Oct 2009 at 7:58

Attachments: