HTML
JPG
PDF
XML
DOCX
PDF
Cloud .NET SDK を使用して PDF ドキュメントからテキスト注釈を削除する方法
PDF ドキュメントからテキスト注釈を削除するには、 Aspose.PDF Cloud .NET SDK この Cloud SDK を使用すると、C#、ASP.NET、またはその他の .NET 言語で、さまざまなクラウド プラットフォーム向けのクラウド ベースの PDF 作成、編集、および変換アプリを簡単に構築できます。開く NuGet パッケージ マネージャを開き、 Aspose.PDF Cloud を検索してインストールします。また、パッケージ マネージャ コンソールから次のコマンドを使用することもできます。
パッケージ マネージャ コンソール コマンド
PM> Install-Package Aspose.Pdf-Cloud
.NET SDK を使用して注釈を削除する手順
Aspose.PDF Cloud 開発者は、わずか数行のコードで PDF ドキュメントに注釈を簡単にロードおよび削除できます。
- ドキュメントをクラウドにアップロードします。
- DeleteTextAnnotation() を使用して特定の注釈を削除します。
- 応答を処理して成功を確認します。
- 関連するポップアップ注釈を削除します。
- 更新されたドキュメントをダウンロードします。
このサンプルコードは、C# を使用して PDF ドキュメントからテキスト注釈を削除する方法を示しています
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_");
}
}
}
}