워터마크 작업
Contents
[
Hide
]DWG에 워터마크 추가하기
때때로 도면에 워터마크를 추가하여 도면의 목적이나 작성자를 나타내고 싶을 때가 있습니다. Aspose.CAD for Python을 사용하면 DWG 파일에 워터마크를 추가할 수 있습니다.
샘플 코드
아래 코드는 Aspose.CAD for Python을 사용하여 동일한 목표를 달성하는 방법을 보여줍니다.
This file contains hidden or 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
import aspose.cad as cad; | |
cadImage = cad.Image.load("file.dwg"); | |
rasterizationOptions = cad.imageoptions.CadRasterizationOptions(); | |
rasterizationOptions.page_width = 1200 | |
rasterizationOptions.page_height = 1200 | |
pdfOptions = cad.imageoptions.PdfOptions() | |
pdfOptions.vector_rasterization_options = rasterizationOptions | |
pdfOptions.user_watermark_text = "text"; | |
cadImage.save("result.pdf", pdfOptions) |