This is a migrated thread and some comments may be shown as answers.

How to Set variou PDF Properties

4 Answers 352 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 07 Jul 2015, 11:10 PM

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

4 Answers, 1 is accepted

Sort by
0
Dan
Top achievements
Rank 1
answered on 07 Jul 2015, 11:57 PM
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.
0
Dan
Top achievements
Rank 1
answered on 08 Jul 2015, 05:10 PM

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?

0
Nikolay Demirev
Telerik team
answered on 09 Jul 2015, 10:45 AM
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
0
Dan
Top achievements
Rank 1
answered on 09 Jul 2015, 12:05 PM

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

Tags
PdfProcessing
Asked by
Dan
Top achievements
Rank 1
Answers by
Dan
Top achievements
Rank 1
Nikolay Demirev
Telerik team
Share this question
or