A little clarification about PDF export.
First the PageSize of NPdfExporter is specified in points, while the NDrawingDocument Width and Height are by default in pixels (but can virtually be in any measurement unit)
- see Diagram for .NET > User's Guide > Document Object Model > Drawing Documents - Measurement Units and Drawing Scale for complete discussion.
So the first thing would be to calculate a PDF page size that is equal to the drawing document Width and Height.
Then there is the Layout property which can be of the following values:
ZoomTo - Zooms the drawing to a user defined zoom percent. Aspect is preserved.
The pages grid is automatically determined. This means that the PageColumns and PageRows are not used when this layout mode is effective.
FitToPages - User selects PageColumns and PageRows count. Zoom is automatically determined.
Aspect is preserved. This means that ZoomFactor is not used when FitToPages is effective.
FitToPagesWidth - User selects PageColumns count.
The number of pages in rows and zoom is automatically determined. ZoomPercent is used. Aspect is preserved.
FitToPagesHeight - User selects PageRows count.
The number of pages in cols and zoom is automatically determined. ZoomPercent is used. Aspect is preserved.
If you simply want to display a drawing document in a single PDF page - you need to use this code:
pdfExporter.Layout = PageLayout.FitToPages;
pdfExporter.PageSize = new NSizeF(595, 842); // A4 size in points
pdfExporter.PageColumns = 1;
pdfExporter.PageRows = 1;
If you want to create a drawing document in A4 format you can use this code:
drawingDocument.MeasurementUnit = Nevron.GraphicsCore.NGraphicsUnit.Point;
drawingDocument.Width = 595;
drawingDocument.Height = 842;
Hope this helps - questions or comments - please feel free...