Git Product home page Git Product logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
Confirmed, same story but with image.

Original comment by [email protected] on 29 Sep 2008 at 7:54

from alivepdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
Actually margins don't work at all:

var myPDF:PDF = new PDF(  Orientation.LANDSCAPE, Unit.MM, Size.LETTER);
myPDF.setDisplayMode ( Display.DEFAULT);
myPDF.setTitle("Report");

myPDF.addPage();
myPDF.setMargins(10,10,10,10);
myPDF.addPage();
myPDF.setMargins(10,10,10,10);
myPDF.addImage(objectReference, 0,0,0,0, ImageFormat.JPG, 100,
1,ResizeMode.FIT_TO_PAGE,"Normal",false);

Original comment by [email protected] on 29 Sep 2008 at 8:15

from alivepdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
I am having a similar issue with the margins not working correctly.

I am trying to add the a canvas into the PDF using the following method:

var myPDF:PDF = new PDF( Orientation.PORTRAIT, Unit.MM, Size.A4 );
                myPDF.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE );

                myPDF.addPage();

                var c:Canvas = SecondAlarm(parent.parent).mapPanel.drawing_area;

                myPDF.addImage(c,0,0,0,0, ImageFormat.PNG);

                var f:FileStream = new FileStream();
                file = File.desktopDirectory.resolvePath("pdf/generate.pdf");
                f.open( file, FileMode.WRITE);
                var bytes:ByteArray = myPDF.save(Method.LOCAL);
                f.writeBytes(bytes);
                f.close();

The resulting PDF has the right hand side of the canvas cropped.

I have also attempted to adjust the margins with no affect. I have attached a 
copy of
the resulting PDF. The canvas has a 1px black border which makes it easy to see 
the
problem.

Original comment by [email protected] on 16 Feb 2009 at 10:17

Attachments:

from alivepdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
Just downloaded the library and seem to have the same problem with setting 
margins.
Has this been fixed?
I hope I'm just doing something wrong. :)

My pdf is just straight text:

pdf = new PDF();
pdf.setDisplayMode (Display.FULL_PAGE, Layout.SINGLE_PAGE);
pdf.addPage();
pdf.setMargins(10,10,10,10);
pdf.setFont(FontFamily.ARIAL);
pdf.addText("Sample No.",1,10);

Original comment by [email protected] on 25 Jun 2009 at 6:15

from alivepdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
I am facing the same issue while plotting images.
I tried out with both the options, setleftMargin n all and setMargin.
The only workaround i see is we can achieve a left margin by positioning our 'x'
value with 10 or something while plotting the image.

Original comment by [email protected] on 10 Nov 2009 at 6:26

from alivepdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
I had the same problem with addCell methods, I had text inside the cell, but 
the text
was ignoring the margins and was getting out from there.

I started using addMultiCell method and I realized that addMulticell method is
wrapping the text into the cell.

Original comment by [email protected] on 10 Mar 2010 at 4:48

from alivepdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
Seems like it is still not fixed, I have same problem with image

Original comment by [email protected] on 25 Nov 2013 at 6:51

from alivepdf.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 20, 2024
Hi there, I'm actually experiencing this problem too. Is there a workaround 
regarding this? Thank you

Original comment by [email protected] on 13 Jan 2015 at 4:13

from alivepdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.