العمل مع العلامة المائية
Contents
[
Hide
]إضافة علامة مائية في DWG
في بعض الأحيان، تريد إضافة بعض العلامات المائية إلى الرسومات لتشير إلى الهدف من الرسومات أو من أنشأها. تتيح لك Aspose.CAD لبايثون إضافة علامة مائية في ملف DWG.
كود العينة
يوضح الكود أدناه كيفية تحقيق نفس الهدف باستخدام Aspose.CAD لبايثون
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
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) |