HTML JPG PDF XML DOCX
  Product Family
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 بسهولة في بضع سطور من الشيفرة.

  1. تحميل المستند إلى السحابة.
  2. حذف تعليق معين باستخدام DeleteTextAnnotation().
  3. معالجة الاستجابة لضمان النجاح.
  4. إزالة أي تعليقات منبثقة ذات صلة.
  5. تنزيل المستند المحدث.
 

تظهر هذه الشيفرة المثال إزالة تعليقات النص من مستند 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_");
                }
            }
        }
    }