-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace ACadSharp.Pdf.Examples | ||
{ | ||
public static class PdfExporterExamples | ||
{ | ||
/// <summary> | ||
/// Example of how to print the model space in a pdf page. | ||
/// </summary> | ||
/// <param name="document"></param> | ||
/// <param name="pdfPath"></param> | ||
public static void AddModelSpace(CadDocument document, string pdfPath) | ||
{ | ||
PdfExporter exporter = new PdfExporter(pdfPath); | ||
|
||
//Add the model space into the file, page size will be adapted to include all entities | ||
exporter.AddModelSpace(document); | ||
|
||
exporter.Close(); | ||
} | ||
|
||
/// <summary> | ||
/// Example of how to add all paper layouts into the pdf document. | ||
/// </summary> | ||
/// <param name="document"></param> | ||
/// <param name="pdfPath"></param> | ||
public static void AddPaperLayout(CadDocument document, string pdfPath) | ||
{ | ||
PdfExporter exporter = new PdfExporter(pdfPath); | ||
|
||
//Add all paper layouts in the pdf document | ||
exporter.AddPaperLayouts(document); | ||
|
||
exporter.Close(); | ||
} | ||
} | ||
} |