HTML
JPG
PDF
XML
DOCX
PDF
حذف تعليقات النص من PDF عبر .NET SDK
API لإزالة التعليقات إلى مستندات PDF باستخدام Aspose.PDF Cloud .NET SDK.
Get Startedكيفية حذف تعليقات النص من مستندات PDF باستخدام Cloud .NET SDK
لإزالة تعليقات النص من مستندات PDF، سنستخدم Aspose.PDF Cloud .NET SDK يتيح لك هذا Cloud SDK بسهولة بناء تطبيقات خالقة، محررة ومحولة لملفات PDF قائمة على السحابة باستخدام C#، ASP.NET، أو لغات .NET أخرى لمنصات السحابة المختلفة. افتح NuGet مدير الحزم، وابحث عن Aspose.PDF Cloud وقم بتثبيته. يمكنك أيضًا استخدام الأمر التالي من وحدة تحكم مدير الحزم.
أمر وحدة تحكم مدير الحزم
PM> Install-Package Aspose.Pdf-Cloud
خطوات إزالة التعليقات باستخدام .NET SDK
يمكن لمطوري Aspose.PDF Cloud تحميل وحذف التعليقات إلى مستندات PDF بسهولة في بضع سطور من الشيفرة.
- تحميل المستند إلى السحابة.
- حذف تعليق معين باستخدام DeleteTextAnnotation().
- معالجة الاستجابة لضمان النجاح.
- إزالة أي تعليقات منبثقة ذات صلة.
- تنزيل المستند المحدث.
تظهر هذه الشيفرة المثال إزالة تعليقات النص من مستند PDF عبر C#
using Aspose.Pdf.Cloud.Sdk.Model;
namespace Annotations
{
public class DeleteTextAnnotation
{
public async static Task MakeDeleteAsync(AnnotationsHelper helper, string documentName, string annotationId, string outputName, string remoteFolder)
{
// Delete annotation from the PDF document.
await helper.UploadFile(documentName);
AsposeResponse response = await helper.pdfApi.DeleteAnnotationAsync(documentName, annotationId, folder: remoteFolder);
if (response == null)
Console.WriteLine("DeleteTextAnnotation(): Unexpected error!");
else if (response.Code < 200 || response.Code > 299)
Console.WriteLine("DeleteTextAnnotation(): Failed to delete annotation from the document.");
else
{
await helper.DeletePopupAnnotationsAsync(documentName, annotationId, remoteFolder);
Console.WriteLine("DeleteTextAnnotation(): annotations '{0}' deleted from the document '{1}.", annotationId, documentName);
await helper.DownloadFile(documentName, outputName, "del_text_annotations_");
}
}
}
}