diff --git a/uses_cases/annotations/annotations_helper.go b/uses_cases/annotations/annotations_helper.go new file mode 100644 index 0000000..0137e3b --- /dev/null +++ b/uses_cases/annotations/annotations_helper.go @@ -0,0 +1,118 @@ +package main + +import ( + "fmt" + "os" + "path" + "path/filepath" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +const ( + LOCAL_FOLDER = "C:\\Samples" + REMOTE_FOLDER = "Your_Temp_Pdf_Cloud" + PDF_DOCUMENT_NAME = "sample.pdf" + PDF_OUTPUT = "output_sample.pdf" + PAGE_NUMBER = 1 + + ANNOTATION_ID = "GE5TAOZTHA2CYMRZGUWDIMBZFQZTEMA" + + NEW_HL_ANNOTATION_TEXT = "NEW HIGHLIGHT TEXT ANNOTATION" + NEW_HL_ANNOTATION_DESCRIPTION = "This is a sample highlight annotation" + NEW_HL_ANNOTATION_SUBJECT = "Highlight Text Box Subject" + NEW_HL_ANNOTATION_CONTENTS = "Highlight annotation sample contents" + + NEW_SO_ANNOTATION_TEXT = "NEW STRIKEOUT TEXT ANNOTATION" + NEW_SO_ANNOTATION_DESCRIPTION = "This is a sample strikeout annotation" + NEW_SO_ANNOTATION_SUBJECT = "Strikeout Text Box Subject" + NEW_SO_ANNOTATION_CONTENTS = "Strikeout annotation sample contents" + + NEW_UL_ANNOTATION_TEXT = "NEW UNDERLINE TEXT ANNOTATION" + NEW_UL_ANNOTATION_DESCRIPTION = "This is a sample underline annotation" + NEW_UL_ANNOTATION_SUBJECT = "Underline Text Box Subject" + NEW_UL_ANNOTATION_CONTENTS = "Underline annotation sample contents" + + NEW_FT_ANNOTATION_TEXT = "NEW FREE TEXT ANNOTATION" + NEW_FT_ANNOTATION_DESCRIPTION = "This is a sample annotation" + NEW_FT_ANNOTATION_SUBJECT = "Free Text Box Subject" + NEW_FT_ANNOTATION_CONTENTS = "Free Text annotation sample contents" + + REPLACED_CONTENT = "This is a replaced sample annotation" +) + +func InitPdfApi() *asposepdfcloud.PdfApiService { + // Initialize Credentials and create Pdf.Cloud service object + AppSID := "*********" // Your Application SID + AppKey := "*********" // Your Application Key + + pdfApi := asposepdfcloud.NewPdfApiService(AppSID, AppKey, "") + return pdfApi +} + +func UploadFile(pdf_api *asposepdfcloud.PdfApiService, name string) { + // Upload local file to the Pdf.Cloud folder + args := map[string]interface{}{ + "folder": REMOTE_FOLDER, + } + file, _ := os.Open(filepath.Join(LOCAL_FOLDER, name)) + _, httpResponse, err := pdf_api.UploadFile(filepath.Join(REMOTE_FOLDER, name), file, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("Unexpected error!") + } else { + fmt.Println("Result file'" + name + "' successfully uploaded!") + } +} + +func SaveByteArrayToFile(local_folder string, file_name string, data []byte) { + // Save byte array data to the local folder + fileName := path.Join(local_folder, file_name) + f, err := os.Create(fileName) + if err != nil { + fmt.Println(err) + } else { + size, err := f.Write(data) + if err != nil || size == 0 { + fmt.Println("Failures in downloading result!") + } else { + fmt.Println("Result file'" + fileName + "' successfully downloaded!") + } + } +} + +func DownloadFile(pdf_api *asposepdfcloud.PdfApiService, name string, output_name string, prefix string) { + // Download modified Pdf document to local folder from the Pdf.Cloud folder + args := map[string]interface{}{ + "folder": REMOTE_FOLDER, + } + result_data, _, _ := pdf_api.DownloadFile(path.Join(REMOTE_FOLDER, name), args) + SaveByteArrayToFile(LOCAL_FOLDER, prefix+output_name, result_data) +} + +func DeletePopupAnnotations(pdf_api *asposepdfcloud.PdfApiService, document_name string, parent_annotation string) { + // Delete popup annotations for typed parent annotation in the page in the PDF document. + args := map[string]interface{}{ + "folder": REMOTE_FOLDER, + } + result, httpResponse, err := pdf_api.GetDocumentPopupAnnotations(document_name, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("Unexpected error!") + } else { + for _, annotation := range result.Annotations.List { + if annotation.Parent.Id == parent_annotation { + _, response, err2 := pdf_api.DeleteAnnotation(document_name, annotation.Id, args) + if err2 != nil { + fmt.Println(err2) + } else if response.StatusCode < 200 || response.StatusCode > 299 { + fmt.Println("delete_popup_annotations(): Failed to delete popup annotation in the document.") + } else { + fmt.Println("delete_popup_annotations(): popup annotation id = '" + annotation.Id + "' for '" + annotation.Contents + "' deleted in the document '" + PDF_DOCUMENT_NAME + "'.") + } + } + } + } +} diff --git a/uses_cases/annotations/annotations_launch.go b/uses_cases/annotations/annotations_launch.go new file mode 100644 index 0000000..8030a18 --- /dev/null +++ b/uses_cases/annotations/annotations_launch.go @@ -0,0 +1,22 @@ +package main + +func main() { + pdfApi := InitPdfApi() + + AppendHighlightAnnotation(pdfApi, PDF_DOCUMENT_NAME, PAGE_NUMBER, PDF_OUTPUT, "add_highlight_annotation_", REMOTE_FOLDER) + + AppendStrikeoutAnnotation(pdfApi, PDF_DOCUMENT_NAME, PAGE_NUMBER, PDF_OUTPUT, "add_strikeout_annotation_", REMOTE_FOLDER) + + AppendTextAnnotation(pdfApi, PDF_DOCUMENT_NAME, PAGE_NUMBER, PDF_OUTPUT, "add_freetext_annotation_", REMOTE_FOLDER) + + AppendUnderlineAnnotation(pdfApi, PDF_DOCUMENT_NAME, PAGE_NUMBER, PDF_OUTPUT, "add_underline_annotation_", REMOTE_FOLDER) + + annotation_id := RequestAnnotations(pdfApi, PDF_DOCUMENT_NAME, PAGE_NUMBER, REMOTE_FOLDER) + RequestAnnotationById(pdfApi, PDF_DOCUMENT_NAME, annotation_id, REMOTE_FOLDER) + + DeleteAnnotation(pdfApi, PDF_DOCUMENT_NAME, ANNOTATION_ID, PDF_OUTPUT) + + DeletePageAnnotations(pdfApi, PDF_DOCUMENT_NAME, PAGE_NUMBER, PDF_OUTPUT) + + ModifyAnnotation(pdfApi, PDF_DOCUMENT_NAME, PDF_OUTPUT, ANNOTATION_ID, REMOTE_FOLDER) +} diff --git a/uses_cases/annotations/delete_page_annotations.go b/uses_cases/annotations/delete_page_annotations.go new file mode 100644 index 0000000..e9add56 --- /dev/null +++ b/uses_cases/annotations/delete_page_annotations.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func DeletePageAnnotations(pdf_api *asposepdfcloud.PdfApiService, document_name string, page_num int32, output_name string) { + // Delete annotation from the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": REMOTE_FOLDER, + } + + _, httpResponse, err := pdf_api.DeletePageAnnotations(document_name, page_num, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("DeletePageAnnotations(): Failed to delete annotation from the document.") + } else { + fmt.Println("DeletePageAnnotations(): annotations on page '", page_num, "' deleted from the document '"+document_name+"'.") + DownloadFile(pdf_api, document_name, output_name, "del_page_annotations_") + } +} diff --git a/uses_cases/annotations/delete_text_annotation.go b/uses_cases/annotations/delete_text_annotation.go new file mode 100644 index 0000000..b2b839e --- /dev/null +++ b/uses_cases/annotations/delete_text_annotation.go @@ -0,0 +1,26 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func DeleteAnnotation(pdf_api *asposepdfcloud.PdfApiService, document_name string, annotation_id string, output_name string) { + // Delete annotation from the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": REMOTE_FOLDER, + } + + _, httpResponse, err := pdf_api.DeleteAnnotation(document_name, annotation_id, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("DeleteAnnotation(): Failed to delete annotation from the document page.") + } else { + DeletePopupAnnotations(pdf_api, document_name, annotation_id) + fmt.Println("DdeleteAnnotation(): annotation '" + annotation_id + "' deleted from the document '" + document_name + "'.") + DownloadFile(pdf_api, document_name, output_name, "del_annotation_") + } +} diff --git a/uses_cases/annotations/get_annotation_by_id.go b/uses_cases/annotations/get_annotation_by_id.go new file mode 100644 index 0000000..f097076 --- /dev/null +++ b/uses_cases/annotations/get_annotation_by_id.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func RequestAnnotationById(pdf_api *asposepdfcloud.PdfApiService, document_name string, annotation_id string, remote_folder string) { + // Get annotation by Id in the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": remote_folder, + } + result, httpResponse, err := pdf_api.GetTextAnnotation(document_name, annotation_id, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("RequestAnnotationById(): Failed to request text annotation from the document page.") + } else { + fmt.Println("RequestAnnotationById(): annotation '" + annotation_id + "' successfully found '" + result.Annotation.Contents + "' in the document '" + document_name + "'.") + } +} diff --git a/uses_cases/annotations/get_annotations.go b/uses_cases/annotations/get_annotations.go new file mode 100644 index 0000000..fee03e3 --- /dev/null +++ b/uses_cases/annotations/get_annotations.go @@ -0,0 +1,32 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func RequestAnnotations(pdf_api *asposepdfcloud.PdfApiService, document_name string, page_num int32, remote_folder string) string { + // Get annotations from the page in the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": remote_folder, + } + annotation_result := "" + result, httpResponse, err := pdf_api.GetPageAnnotations(document_name, page_num, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("RequestAnnotations(): Failed to delete annotation from the document page.") + } else { + for _, annotation := range result.Annotations.List { + if annotation.AnnotationType == asposepdfcloud.AnnotationTypeText { + fmt.Println("RequestAnnotations(): annotation id=", annotation.Id, " with '"+annotation.Contents+"' content get from the document '"+document_name+"' on ", annotation.PageIndex, " page.") + annotation_result := annotation.Id + return annotation_result + } + } + } + fmt.Println("RequestAnnotations(): Failed to get annotation in the document.") + return annotation_result +} diff --git a/uses_cases/annotations/new_highlight_annotation.go b/uses_cases/annotations/new_highlight_annotation.go new file mode 100644 index 0000000..c686bd2 --- /dev/null +++ b/uses_cases/annotations/new_highlight_annotation.go @@ -0,0 +1,44 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func AppendHighlightAnnotation(pdf_api *asposepdfcloud.PdfApiService, document_name string, page_num int32, output_document string, prefix string, remote_folder string) { + // Append a new highlight text annotation to the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": remote_folder, + } + new_annotation := asposepdfcloud.HighlightAnnotation{ + Name: "Highlight_Text_Annotation", + Rect: &asposepdfcloud.Rectangle{LLX: 100, LLY: 350, URX: 450, URY: 400}, + Flags: []asposepdfcloud.AnnotationFlags{asposepdfcloud.AnnotationFlagsDefault}, + HorizontalAlignment: asposepdfcloud.HorizontalAlignmentLeft, + VerticalAlignment: asposepdfcloud.VerticalAlignmentTop, + RichText: NEW_HL_ANNOTATION_TEXT, + Subject: NEW_HL_ANNOTATION_SUBJECT, + Contents: NEW_HL_ANNOTATION_CONTENTS, + Title: NEW_HL_ANNOTATION_DESCRIPTION, + ZIndex: 1, + Color: &asposepdfcloud.Color{A: 0xFF, R: 0x00, G: 0xFF, B: 0x00}, + QuadPoints: []asposepdfcloud.Point{ + {X: 10, Y: 10}, + {X: 20, Y: 10}, + {X: 10, Y: 20}, + {X: 10, Y: 10}, + }, + Modified: "03/27/2025 00:00:00.000 AM", + } + _, httpResponse, err := pdf_api.PostPageHighlightAnnotations(document_name, page_num, []asposepdfcloud.HighlightAnnotation{new_annotation}, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("AppendHighlightAnnotation(): Failed to append annotation to the document page.") + } else { + fmt.Println("AppendHighlightAnnotation(): annotation '" + NEW_HL_ANNOTATION_TEXT + "' added to the document '" + document_name + "'.") + DownloadFile(pdf_api, document_name, output_document, prefix) + } +} diff --git a/uses_cases/annotations/new_strikeout_annotation.go b/uses_cases/annotations/new_strikeout_annotation.go new file mode 100644 index 0000000..dbd5186 --- /dev/null +++ b/uses_cases/annotations/new_strikeout_annotation.go @@ -0,0 +1,46 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func AppendStrikeoutAnnotation(pdf_api *asposepdfcloud.PdfApiService, document_name string, page_num int32, output_document string, prefix string, remote_folder string) { + // Append a new strikeout text annotation to the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": remote_folder, + } + + new_annotation := asposepdfcloud.StrikeOutAnnotation{ + Name: "Highlight_Text_Annotation", + Rect: &asposepdfcloud.Rectangle{LLX: 100, LLY: 350, URX: 450, URY: 400}, + Flags: []asposepdfcloud.AnnotationFlags{asposepdfcloud.AnnotationFlagsDefault}, + HorizontalAlignment: asposepdfcloud.HorizontalAlignmentLeft, + VerticalAlignment: asposepdfcloud.VerticalAlignmentTop, + RichText: NEW_SO_ANNOTATION_TEXT, + Subject: NEW_SO_ANNOTATION_SUBJECT, + Contents: NEW_SO_ANNOTATION_CONTENTS, + Title: NEW_SO_ANNOTATION_DESCRIPTION, + ZIndex: 1, + Color: &asposepdfcloud.Color{A: 0xFF, R: 0x00, G: 0xFF, B: 0x00}, + QuadPoints: []asposepdfcloud.Point{ + {X: 10, Y: 10}, + {X: 20, Y: 10}, + {X: 10, Y: 20}, + {X: 10, Y: 10}, + }, + Modified: "03/27/2025 00:00:00.000 AM", + } + + _, httpResponse, err := pdf_api.PostPageStrikeOutAnnotations(document_name, page_num, []asposepdfcloud.StrikeOutAnnotation{new_annotation}, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("AppendStrikeoutAnnotation(): Failed to append annotation to the document page.") + } else { + fmt.Println("AppendStrikeoutAnnotation(): annotation '" + NEW_SO_ANNOTATION_TEXT + "' added to the document '" + document_name + "'.") + DownloadFile(pdf_api, document_name, output_document, prefix) + } +} diff --git a/uses_cases/annotations/new_text_annotation.go b/uses_cases/annotations/new_text_annotation.go new file mode 100644 index 0000000..481a0ad --- /dev/null +++ b/uses_cases/annotations/new_text_annotation.go @@ -0,0 +1,47 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func AppendTextAnnotation(pdf_api *asposepdfcloud.PdfApiService, document_name string, page_num int32, output_document string, prefix string, remote_folder string) { + // Append a new free text annotation to the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": remote_folder, + } + + text_style := asposepdfcloud.TextStyle{ + FontSize: 20, + Font: "Arial", + ForegroundColor: &asposepdfcloud.Color{A: 0xFF, R: 0x00, G: 0xFF, B: 0x00}, + BackgroundColor: &asposepdfcloud.Color{A: 0xFF, R: 0xFF, G: 0x00, B: 0x00}, + } + + new_annotation := asposepdfcloud.FreeTextAnnotation{ + Rect: &asposepdfcloud.Rectangle{LLX: 100, LLY: 350, URX: 450, URY: 400}, + TextStyle: &text_style, + Name: "Free Text Annotation", + Flags: []asposepdfcloud.AnnotationFlags{asposepdfcloud.AnnotationFlagsDefault}, + HorizontalAlignment: asposepdfcloud.HorizontalAlignmentCenter, + Intent: asposepdfcloud.FreeTextIntentFreeTextTypeWriter, + RichText: NEW_FT_ANNOTATION_TEXT, + Subject: NEW_FT_ANNOTATION_SUBJECT, + Contents: NEW_FT_ANNOTATION_CONTENTS, + Title: NEW_FT_ANNOTATION_DESCRIPTION, + ZIndex: 1, + Justification: asposepdfcloud.JustificationCenter, + } + + _, httpResponse, err := pdf_api.PostPageFreeTextAnnotations(document_name, page_num, []asposepdfcloud.FreeTextAnnotation{new_annotation}, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("AppendTextAnnotation(): Failed to append annotation to the document page.") + } else { + fmt.Println("AppendTextAnnotation(): annotation '" + NEW_FT_ANNOTATION_TEXT + "' added to the document '" + document_name + "'.") + DownloadFile(pdf_api, document_name, output_document, prefix) + } +} diff --git a/uses_cases/annotations/new_underline_annotation.go b/uses_cases/annotations/new_underline_annotation.go new file mode 100644 index 0000000..c23e4d6 --- /dev/null +++ b/uses_cases/annotations/new_underline_annotation.go @@ -0,0 +1,45 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func AppendUnderlineAnnotation(pdf_api *asposepdfcloud.PdfApiService, document_name string, page_num int32, output_document string, prefix string, remote_folder string) { + // Append a new underline text annotation to the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": remote_folder, + } + + new_annotation := asposepdfcloud.UnderlineAnnotation{ + Rect: &asposepdfcloud.Rectangle{LLX: 100, LLY: 350, URX: 450, URY: 400}, + Name: "Underline Text Annotation", + Flags: []asposepdfcloud.AnnotationFlags{asposepdfcloud.AnnotationFlagsDefault}, + HorizontalAlignment: asposepdfcloud.HorizontalAlignmentLeft, + VerticalAlignment: asposepdfcloud.VerticalAlignmentTop, + RichText: NEW_UL_ANNOTATION_TEXT, + Subject: NEW_UL_ANNOTATION_SUBJECT, + Title: NEW_UL_ANNOTATION_DESCRIPTION, + Contents: NEW_UL_ANNOTATION_CONTENTS, + ZIndex: 1, + Color: &asposepdfcloud.Color{A: 0xFF, R: 0x00, G: 0xFF, B: 0x00}, + QuadPoints: []asposepdfcloud.Point{ + {X: 10, Y: 10}, + {X: 20, Y: 10}, + {X: 10, Y: 20}, + {X: 10, Y: 10}, + }, + Modified: "03/27/2025 00:00:00.000 AM", + } + _, httpResponse, err := pdf_api.PostPageUnderlineAnnotations(document_name, page_num, []asposepdfcloud.UnderlineAnnotation{new_annotation}, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("AppendUnderlineAnnotation(): Failed to append annotation to the document page.") + } else { + fmt.Println("AppendUnderlineAnnotation(): annotation '" + NEW_UL_ANNOTATION_TEXT + "' added to the document '" + document_name + "'.") + DownloadFile(pdf_api, document_name, output_document, prefix) + } +} diff --git a/uses_cases/annotations/replace_annotation.go b/uses_cases/annotations/replace_annotation.go new file mode 100644 index 0000000..1adc21e --- /dev/null +++ b/uses_cases/annotations/replace_annotation.go @@ -0,0 +1,46 @@ +package main + +import ( + "fmt" + + asposepdfcloud "github.com/aspose-pdf-cloud/aspose-pdf-cloud-go/v25" +) + +func getAnnotation(pdf_api *asposepdfcloud.PdfApiService, document_name string, annotation_id string, remote_folder string) *asposepdfcloud.TextAnnotation { + // Get annotation by Id in the PDF document. + args := map[string]interface{}{ + "folder": remote_folder, + } + result, httpResponse, err := pdf_api.GetTextAnnotation(document_name, annotation_id, args) + if err != nil { + fmt.Println(err.Error()) + return nil + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("getAnnotation(): Failed to get annotation in the document.") + return nil + } else { + fmt.Println("getAnnotation(): nnotation '" + annotation_id + "' successfully found '" + result.Annotation.Contents + "' in the document '" + document_name + "'.") + return result.Annotation + } +} + +func ModifyAnnotation(pdf_api *asposepdfcloud.PdfApiService, document_name string, output_document string, annotation_id string, remote_folder string) { + // Change annotation by Id in the PDF document. + UploadFile(pdf_api, document_name) + args := map[string]interface{}{ + "folder": remote_folder, + } + annotation := getAnnotation(pdf_api, document_name, annotation_id, remote_folder) + annotation.Contents = REPLACED_CONTENT + annotation.Icon = asposepdfcloud.TextIconStar + + _, httpResponse, err := pdf_api.PutTextAnnotation(document_name, annotation_id, *annotation, args) + if err != nil { + fmt.Println(err.Error()) + } else if httpResponse.StatusCode < 200 || httpResponse.StatusCode > 299 { + fmt.Println("ModifyAnnotation(): Failed to modify annotation in the document.") + } else { + fmt.Println("ModifyAnnotation(): annotation '" + annotation.Id + "' successfully modified in the document '" + document_name + "'.") + DownloadFile(pdf_api, document_name, output_document, "replaced_annotatiom_") + } +}