کار با واترمارک
Contents
[
Hide
]اضافه کردن واترمارک در یک DWG
گاهی اوقات میخواهید واترمارکهایی به نقشهها اضافه کنید تا نشان دهید نقشهها چه هدفی دارند یا چه کسی آنها را ایجاد کرده است. Aspose.CAD برای Python به شما این امکان را میدهد که یک واترمارک در فایل DWG اضافه کنید.
کد نمونه
کد زیر نشان میدهد که چگونه میتوانید به همان هدف با استفاده از Aspose.CAD برای 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) |