How to Set variou PDF Properties

5 posts, 0 answers
  1. Dan
    Dan avatar
    124 posts
    Member since:
    Feb 2011

    Posted 07 Jul 2015 Link to this post

    I have been scouring the documentation looking for help on the following:

    1. How to set the Overall PDF Orientation to Landscape
    2. How to set the Margins
    3. How to set Footer and Header on all or some pages

    My scenario is fairly simple.  I am creating a Table and inserting it into the RadFixedDocument using ​.InsertTable(MyTable).  Now I need to set the PDF to Landscape, reduce the Margins and set some Header / Footer information

  2. Dan
    Dan avatar
    124 posts
    Member since:
    Feb 2011

    Posted 07 Jul 2015 in reply to Dan Link to this post

    Also - what units are the PageMargins and PageSize attributes in exactly?  I have tried mm and inches - but neither seem right.  I am trying to match a Landscape Letter and Landscape A4 print targets with the PDF.
  3. Dan
    Dan avatar
    124 posts
    Member since:
    Feb 2011

    Posted 08 Jul 2015 in reply to Dan Link to this post

    Update:

    First off it seems that all sizes are in Pixels.  So I went ahead and multiplied 96 pixels per inch by the dimensions of a Landscape Letter stock and it seems pretty close.  But is this a safe assumption?

    1. By setting the RadFixedDocumentEditor​.SectionProperties.PageSize

    2. By setting the RadFixedDocumentEditor​.SectionProperties.PageMargins

    3. After I have inserted the Table, I then loop through the pages and insert at specific positions and seem to be able to get header and footers in there like that.

    It seems my only remaining questions here are: Is my assumption on Pixels as the basic unit of size correction?  And am I doing this right based on my comments above?

  4. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 09 Jul 2015 Link to this post

    Hi Dan,

    Thank you for writing.

    Everything seems right from your explanations. I am glad you have managed to find the answer to your questions by yourself. If you have any recommendations for improving our help articles to be more helpful do not hesitate to share them with us we will appreciate it.

    The size unit used in the RadPdfProcessing APIs is DIP (Device-independent pixel).

    Regards,
    Nikolay Demirev
    Telerik
  5. Dan
    Dan avatar
    124 posts
    Member since:
    Feb 2011

    Posted 09 Jul 2015 in reply to Nikolay Demirev Link to this post

    Thank you for confirming.  It would be helpful if this was added to the documentation:

    Sizes are in Device-independent pixels.  96 pixels = 1 inch

Back to Top