locked
How do I set the page margin with ABCPdf .NET? RRS feed

  • Question

  • User-889161296 posted

    Hi,

    I've downloaded the lastest version of the ABCPdf component and it was easy to generate my first pdf file however I would like to be able to add margins to the page, like 3cm top, 2 cm right, 3cm bottom and 2cm left. I just can't seem to find that property, I tried a few settings and it completely screws up the page, can you guys help me?

    Thanks a lot

    Thursday, April 16, 2009 4:13 PM

All replies

  • User742805821 posted

    I can't tell you how to do that right now but I can advise you against using it. My version of ABCpdf.NET keeps on spontaneously uninstalling itself. The fix is to reenter the license key. Doing that means I have to restart a production server. I would never have used it if I knew that beforehand.

     

    Friday, May 15, 2009 1:28 PM
  • User1048284955 posted

    Been using ABCPdf for several years now, never with your problem. You want problems? Try using ActivePDF. Never wanted to trash a piece of software so badly in my life.

    Friday, January 29, 2010 6:50 PM
  • User-1630432755 posted

    I know this is an old thread, but it came up very high in the Google results when I searched for this topic.

    The short answer is to use Doc.Rect.Inset:

    Doc doc = new Doc();
    doc.Rect.Inset(20, 20);

    this will inset the drawing rectangle by the given distance vertically and horizontally, and will apply to any pages added to the document after the inset is set.  After the Inset() is called, Rect.Position can be used to move the origin point of the rectangle to allow it to be moved from the page center.

    Friday, April 26, 2013 11:55 AM