3DS 도면
Contents
[
Hide
]3DS 형식을 PDF로 내보내기
Aspose.CAD for .NET은 개발자가 3DS 파일을 PDF 형식으로 내보낼 수 있도록 합니다. 3DS에서 PDF로 변환하는 방법은 다음과 같습니다:
- Image.Load 팩토리 메서드를 사용하여 3DS 도면 파일을 로드합니다.
- CadRasterizationOptions 클래스의 객체를 생성하고 PageHeight 및 PageWidth 속성을 설정합니다.
- PdfOptions 클래스의 객체를 생성하고 VectorRasterizationOptions 속성을 설정합니다.
- Image.Save를 호출하면서 PdfOptions 객체를 두 번째 매개변수로 전달합니다.
샘플 코드
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
string inputFile ="file.3ds"; | |
using (Image image = Image.Load(inputFile)) | |
{ | |
// Initialize PdfOptions class object | |
PdfOptions options = new PdfOptions(); | |
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions(); | |
cadRasterizationOptions.PageHeight = 500; | |
cadRasterizationOptions.PageWidth = 500; | |
options.VectorRasterizationOptions = cadRasterizationOptions; | |
// Export 3DS to PDF | |
string outPath = "output.pdf"; | |
image.Save(outPath, options); | |
} |