Profile Picture

A4 and A3 pages and the document

Posted By Hans Henrik Friis Pedersen... 5 Years Ago
Author
Message
Hans Henrik Friis Pedersen...
Question Posted 5 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 28, Visits: 136
Hi,
I have been construting some large diagrams and visualized these in a document1. Document1 is set with dimensions of Width = 900 and height = 900. How do I set the document settings so that it corresponds to - for instance - a A3 pages in landscape ?


Nevron Support
Posted 5 Years Ago
View Quick Profile
Supreme Being

Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)Supreme Being (3,954 reputation)

Group: Forum Members
Last Active: Yesterday @ 6:43 AM
Posts: 2,888, Visits: 3,074
In order to make a diagram of a specific size both on screen and when printing you should perform the following steps (I’m using the A5 paper size here, because my printer does not support A3):

1. Change the drawing document measurement unit and configure the document’s size
document.MeasurementUnit = NMetricUnit.Millimeter;
document.Width = 210;
document.Height = 148;

2. Configure the page settings of the drawing document, make sure to set the printing margins to 0
NPageSettings pageSettings = document.Settings.PageSettings;
pageSettings.Landscape = true;
pageSettings.PaperKind = PaperKind.A5;
pageSettings.MarginsLeft = 0;
pageSettings.MarginsTop = 0;
pageSettings.MarginsRight = 0;
pageSettings.MarginsBottom = 0;

3. When needed, create a print manager and configure it to print the document on a single page
NPrintManager printManager = new NPrintManager(document);
printManager.Layout = PagedLayout.FitToPages;
printManager.PageRows = 1;
printManager.PageColumns = 1;
printManager.ShowPrintPreview();

If you want to skip the print preview dialog, use the Print method instead of the ShowPrintPreview one.


Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic