עבודה עם סימן מים
Contents
[
Hide
]הוסף סימן מים בקובץ DGN
לפעמים אתה רוצה להוסיף סימני מים לציורים כדי לציין מה מטרת הציורים או מי יצר אותם. Aspose.CAD עבור Python מאפשרת לך להוסיף סימן מים בקובץ DGN.
דוגמת קוד
הקוד למטה מראה כיצד להשיג את אותו יעד באמצעות Aspose.CAD עבור JavaScript
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
async onFileSelected(event) { | |
const file: File = event.target.files[0]; //file.dgn | |
file.arrayBuffer().then(async buff => { | |
let x = new Uint8Array(buff); | |
this.imgFile = await Image.load(x); | |
let option = new PngOptions(); | |
option.userWatermarkColor = new Color(); | |
option.userWatermarkText = 'Aspose.CAD'; | |
var exportedFile = await Image.save(this.imgFile, option); | |
var blob = new Blob([exportedFile], { type: 'application/octet-stream' }); | |
}); | |
} |