Class PageSettings
Namespace: Aspose.Note.Saving
Assembly: Aspose.Note.dll (25.6.0)
Represents the layout settings for a page.
public class PageSettings
{
public bool FitToWidth { get; set; }
public double Width { get; set; }
public double StartPageNumber { get; set; }
public int OddAndEvenPagesHeaderDistance { get; set; }
}
Inheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Shows how to save a document in Pdf format with Letter page layout.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "OneNote.one");
var dst = Path.Combine(dataDir, "SaveToPdfUsingLetterPageSettings.pdf");
oneFile.Save(dst, new PdfSaveOptions { PageSettings = PageSettings.Letter });
Shows how to save a document in Pdf format with A4 page layout without height limit.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "OneNote.one");
var dst = Path.Combine(dataDir, "SaveToPdfUsingA4PageSettingsWithoutHeightLimit.pdf");
oneFile.Save(dst, new PdfSaveOptions()
{
PageSettings = PageSettings.A4NoHeightLimit
});
Properties
A4
Gets settings for the A4-format page.
public static PageSettings A4
{
get
{
return new PageSettings()
{
Orientation = Orientation.Portrait,
PaperSize = new PaperSize(595, 842), // A4 paper size in points
Margins = new MarginOptions()
{
Left = 72,
Right = 72,
Top = 72,
Bottom = 72
}
};
}
}
Property Value
A4NoHeightLimit
Gets settings for the A4-format page with limitless height.
public static PageSettings A4NoHeightLimit
{
get
{
return new PageSettings
{
PaperSize = PaperKind.A4,
Orientation = Orientation.Portrait,
Margins = new MarginSettings
{
Left = 28,
Right = 28,
Top = 28,
Bottom = 28
},
Borders = new BorderOptions
{
AllBorderColor = Color.Black,
AllBorderWidth = 0.5F
}
};
}
}
Property Value
Examples
Shows how to save a document in Pdf format with A4 page layout without height limit.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "OneNote.one");
var dst = Path.Combine(dataDir, "SaveToPdfUsingA4PageSettingsWithoutHeightLimit.pdf");
oneFile.Save(dst, new PdfSaveOptions { PageSettings = PageSettings.A4NoHeightLimit });
Letter
Gets settings for the Letter-format page.
public static PageSettings Letter
{
get;
}
Property Value
Examples
Shows how to save a document in Pdf format with Letter page layout.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
Document oneFile = new Document(dataDir + "OneNote.one");
var dst = Path.Combine(dataDir, "SaveToPdfUsingLetterPageSettings.pdf");
oneFile.Save(dst, new PdfSaveOptions() { PageSettings = PageSettings.Letter });
LetterNoHeightLimit
Gets settings for the Letter-format page with limitless height.
public static PageSettings LetterNoHeightLimit
{
get
{
return new PageSettings
{
Orientation = Orientation.Portrait,
PaperKind = PaperKind.Letter,
Margin = new Margin(72, 72, 72, 72), // 1 inch margin on each side
Margins cm = Margins.GetByCentimeters(2, 2, 2, 2); // 2 centimeters margin on each side
};
}
}