Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
Name = "Test Line Annotation",
Rect = new Rectangle(100, 100, 300, 300),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Updated Rich Text",
Subject = "Subj",
ZIndex = 1,
ShowCaption = true,
Title = "Title Updated",
Starting = new Point(10, 10),
Ending = new Point(100, 100)
};
var lineResponse = api.GetDocumentLineAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutLineAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var lineresponse = api.GetDocumentLineAnnotations(Name, folder: FolderName);
string annotationId = lineresponse.Annotations.List[0].Id;
var response = api.GetLineAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
LineAnnotation annotation = new LineAnnotation()
{
Name = "Test Line Annotation",
Rect = new Rectangle(100, 100, 300, 300),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Updated Rich Text",
Subject = "Subj",
ZIndex = 1,
ShowCaption = true,
Title = "Title Updated",
Starting = new Point(10, 10),
Ending = new Point(100, 100)
};
var lineResponse = api.GetDocumentLineAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutLineAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.DeleteAnnotation(Name, AnnotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.DeleteDocumentAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.DeletePageAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.PutAnnotationsFlatten(Name, endPage: 2, annotationTypes: new List<AnnotationType>{ AnnotationType .Stamp}, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(Name, Name);
UploadFile(AppendFile, AppendFile);
var responce =
api.PostAppendDocument(Name, appendFile: Path.Combine(FolderName, AppendFile), startPage: StartPage, endPage: EndPage, folder: FolderName);
Console.WriteLine(responce);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentAttachmentByIndex(Name, 1, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentAttachments(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var result = api.GetDownloadDocumentAttachmentByIndex(Name, 1, folder: FolderName);
Console.WriteLine(result);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithBookmarks.pdf";
UploadFile(name, name);
var response = api.GetDocumentBookmarks(name, folder: FolderName);
Console.WriteLine( response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
using (var file = System.IO.File.OpenRead(Path.Combine("", sourcePath)))
{
var response = api.UploadFile(Path.Combine("", serverFileName), file);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(Name, Name);
var Caretresponse = api.GetDocumentCaretAnnotations(Name, folder: FolderName);
string annotationId = Caretresponse.Annotations.List[0].Id;
var response = api.GetCaretAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(Name, Name);
var response = api.GetDocumentCaretAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(Name, Name);
var response = api.GetPageCaretAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(Name, Name);
List<CaretAnnotation> annotations = new List<CaretAnnotation>
{
new CaretAnnotation()
{
Name = "Example Caret Annotation",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> {AnnotationFlags.Hidden, AnnotationFlags.NoView},
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text",
Subject = "Subj",
ZIndex = 1,
Title = "Title",
Frame = new Rectangle(100, 100, 200, 200),
Modified = "01/01/2018 00:00:00.000 AM"
}
};
var response = api.PostPageCaretAnnotations(Name, 1, annotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(Name, Name);
CaretAnnotation annotation = new CaretAnnotation()
{
Name = "Example Caret Annotation Updated",
Rect = new Rectangle(101, 101, 201, 201),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text Updated",
Subject = "Subj Updated",
ZIndex = 1,
Title = "Title Updated",
Frame = new Rectangle(100, 100, 200, 200),
Modified = "02/02/2018 00:00:00.000 AM"
};
var lineResponse = api.GetDocumentCaretAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutCaretAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var circleresponse = api.GetDocumentCircleAnnotations(Name, folder: FolderName);
string annotationId = circleresponse.Annotations.List[0].Id;
var response = api.GetCircleAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentCircleAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageCircleAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
CircleAnnotation annotation = new CircleAnnotation()
{
Name = "Updated Example",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text Updated",
Subject = "Subj Updated",
ZIndex = 1,
Title = "Title Updated"
};
var lineResponse = api.GetDocumentCircleAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutCircleAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToDoc(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToEpub(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToHtml(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToPdfA(name, type: PdfAType.PDFA1A.ToString(), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToPptx(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToSvg(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToTiff(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToXls(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "Hello world.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToXml(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToXps(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.doc";
var response = api.PutPdfInRequestToDoc(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.epub";
var response = api.PutPdfInRequestToEpub(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.zip";
var response = api.PutPdfInRequestToHtml(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "PdfWithXfaForm.pdf";
UploadFile(name, name);
var response = api.GetXfaPdfInStorageToAcroForm(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.doc";
var response = api.PutPdfInRequestToPdfA(Path.Combine(FolderName, resFileName),
type: PdfAType.PDFA1A.ToString(), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.pptx";
var response = api.PutPdfInRequestToPptx(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
}
public void GetPdfInStorageToLaTeXExample()
{
string name = "Hello world.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToLaTeX(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.svg";
var response = api.PutPdfInRequestToSvg(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.tiff";
var response = api.PutPdfInRequestToTiff(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.xml";
var response = api.PutPdfInRequestToXml(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.xps";
var response = api.PutPdfInRequestToXps(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.doc";
var response = api.PutPdfInStorageToDoc(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.epub";
var response = api.PutPdfInStorageToEpub(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.zip";
var response = api.PutPdfInStorageToHtml(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.latex";
var response = api.PutPdfInStorageToLaTeX(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
}
public void PutPdfInRequestToLaTeXExample()
{
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.latex";
var response = api.PutPdfInRequestToLaTeX(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
}
public void GetPdfInStorageToMobiXmlExample()
{
string name = "4pages.pdf";
UploadFile(name, name);
var response = api.GetPdfInStorageToMobiXml(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.mobi";
var response = api.PutPdfInStorageToMobiXml(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.pdf";
var response = api.PutPdfInStorageToPdfA(name, Path.Combine(FolderName, resFileName), type: PdfAType.PDFA1A.ToString(), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.pptx";
var response = api.PutPdfInStorageToPptx(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.svg";
var response = api.PutPdfInStorageToSvg(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.tiff";
var response = api.PutPdfInStorageToTiff(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.xls";
var response = api.PutPdfInRequestToXls(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.xml";
var response = api.PutPdfInStorageToXml(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.pdf";
UploadFile(name, name);
string resFileName = "result.xps";
var response = api.PutPdfInStorageToXps(name, Path.Combine(FolderName, resFileName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "PdfWithXfaForm.pdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", name)))
{
string resFileName = "result.pdf";
var response = api.PutXfaPdfInRequestToAcroForm(Path.Combine(FolderName, resFileName), file: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "4pages.epub";
UploadFile(name, name);
string resultName = "fromEpub.pdf";
var response = api.PutEpubInStorageToPdf(resultName, Path.Combine(FolderName, name), storage: null, dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "HtmlWithImage.zip";
UploadFile(name, name);
string htmlFileName = "HtmlWithImage.html";
int height = 650;
int width = 250;
using (var response = api.GetHtmlInStorageToPdf(Path.Combine(FolderName, name), htmlFileName, height, width))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "TexExample.tex";
UploadFile(name, name);
using (var response = api.GetLaTeXInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "MhtExample.mht";
UploadFile(name, name);
using (var response = api.GetMhtInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "template.pcl";
UploadFile(name, name);
using (var response = api.GetPclInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "Typography.PS";
UploadFile(name, name);
using (var response = api.GetPsInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "Simple.svg";
UploadFile(name, name);
using (var response = api.GetSvgInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string sourceUrl = "http://google.com";
string resultName = "fromWeb.pdf";
var response = api.PutWebInStorageToPdf(resultName, sourceUrl, dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "template.xml";
UploadFile(name, name);
using (var response = api.GetXmlInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "Simple.xps";
UploadFile(name, name);
using (var response = api.GetXpsInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "XslfoExample.xslfo";
UploadFile(name, name);
using (var response = api.GetXslFoInStorageToPdf(Path.Combine(FolderName, name)))
{
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "HtmlWithImage.zip";
UploadFile(name, name);
string htmlFileName = "HtmlWithImage.html";
int height = 650;
int width = 250;
string resultName = "fromHtml.pdf";
var response = api.PutHtmlInStorageToPdf(resultName, Path.Combine(FolderName, name), htmlFileName, height, width, dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string dataFile1 = "33539.jpg";
UploadFile(dataFile1, dataFile1);
const string dataFile2 = "44781.jpg";
UploadFile(dataFile2, dataFile2);
const string resultName = "result.pdf";
string TempFolder="";
ImageTemplatesRequest imageTemplatesRequest = new ImageTemplatesRequest(IsOCR: true,
OCRLangs: "eng",
ImagesList: new List<ImageTemplate>()
{
new ImageTemplate(ImagePath: $"{TempFolder}/{dataFile1}", ImageSrcType: ImageSrcType.Common),
new ImageTemplate(ImagePath: $"{TempFolder}/{dataFile2}", ImageSrcType: ImageSrcType.Common)
}
);
var response = api.PutImageInStorageToPdf(resultName, imageTemplatesRequest, dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "TexExample.tex";
UploadFile(name, name);
string resultName = "fromTex.pdf";
var response = api.PutLaTeXInStorageToPdf(resultName, Path.Combine(FolderName, name), FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "MhtExample.mht";
UploadFile(name, name);
string resultName = "fromMht.pdf";
var response = api.PutMhtInStorageToPdf(resultName, Path.Combine(FolderName, name), FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "template.pcl";
UploadFile(name, name);
string resultName = "fromPcl.pdf";
var response = api.PutPclInStorageToPdf(resultName, Path.Combine(FolderName, name), dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "Typography.PS";
UploadFile(name, name);
string resultName = "fromPs.pdf";
var response = api.PutPsInStorageToPdf(resultName, Path.Combine(FolderName, name), dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "Simple.svg";
UploadFile(name, name);
string resultName = "fromSvg.pdf";
var response = api.PutSvgInStorageToPdf(resultName, Path.Combine(FolderName, name), dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "template.xml";
UploadFile(name, name);
string resultName = "fromXml.pdf";
var response = api.PutXmlInStorageToPdf(resultName, Path.Combine(FolderName, name), dstFolder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "Simple.xps";
UploadFile(name, name);
string resultName = "fromXps.pdf";
var response = api.PutXpsInStorageToPdf(resultName, Path.Combine(FolderName, name), FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string name = "XslfoExample.xslfo";
UploadFile(name, name);
string resultName = "fromXlsFo.pdf";
var response = api.PutXslFoInStorageToPdf(resultName, Path.Combine(FolderName, name), FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "4pages.pdf";
UploadFile(name, name);
var result = api.GetDocument(name, folder: FolderName);
Console.WriteLine(result);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "4pages.pdf";
UploadFile(name, name);
var options = new OptimizeOptions(
AllowReusePageContent: false,
CompressImages: true,
ImageQuality: 100,
RemoveUnusedObjects: true,
RemoveUnusedStreams: true,
UnembedFonts: true);
var response = api.PostOptimizeDocument(name, options, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "4pages.pdf";
UploadFile(name, name);
var response = api.PostSplitDocument(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "empty.pdf";
var response = api.PutCreateDocument(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithAcroForm.pdf";
UploadFile(name, name);
var fieldName = "textField";
var response = api.DeleteField(name, fieldName, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithAcroForm.pdf";
UploadFile(name, name);
var response = api.GetField(name, "textField", folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithAcroForm.pdf";
UploadFile(name, name);
var response = api.GetFields(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "Hello world.pdf";
UploadFile(name, name);
var field = new Field(
Name: "checkboxfield",
Type: FieldType.Boolean,
Values: new List<string> {"1"},
Rect: new Rectangle(
LLX: 50,
LLY: 200,
URX: 200,
URY: 400
));
var response = api.PostCreateField(name, 1, field, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithAcroForm.pdf";
UploadFile(name, name);
var response = api.PostFlattenDocument(name, updateAppearances: true, hideButtons: true, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithAcroForm.pdf";
UploadFile(name, name);
var response = api.PutFieldsFlatten(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithAcroForm.pdf";
UploadFile(name, name);
var fieldName = "textField";
var field = new Field(
Name: fieldName,
Type: FieldType.Text,
Values: new List<string> {"Text field updated value."},
Rect: new Rectangle(125, 735, 200, 752)
);
var response = api.PutUpdateField(name, fieldName, field, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "PdfWithAcroForm.pdf";
UploadFile(name, name);
var fieldName = "textField";
var fields = new Fields(null, new List<Field>()
{
new Field(
Name: fieldName,
Type: FieldType.Text,
Values: new List<string> {"Text field updated value."})
});
var response = api.PutUpdateFields(name, fields, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentFileAttachmentAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var annotationresponse = api.GetDocumentFileAttachmentAnnotations(Name, folder: FolderName);
string annotationId = annotationresponse.Annotations.List[0].Id;
var response = api.GetFileAttachmentAnnotationData(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var annotationresponse = api.GetDocumentFileAttachmentAnnotations(Name, folder: FolderName);
string annotationId = annotationresponse.Annotations.List[0].Id;
var response = api.GetFileAttachmentAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageFileAttachmentAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(AttachmentFile, AttachmentFile);
List<FileAttachmentAnnotation> annotations = new List<FileAttachmentAnnotation>
{
new FileAttachmentAnnotation()
{
Name = "Example FileAttachmrizontalAlignment.Center",
RichText = "Rich Texent Annotation",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> {AnnotationFlags.Hidden, AnnotationFlags.NoView},
HorizontalAlignment = HorizontalAlignment.Center,
Subject = "Subj",
ZIndex = 1,
Title = "Title",
Modified = "01/01/2018 00:00:00.000 AM",
FilePath = Path.Combine(FolderName, AttachmentFile),
FileName = AttachmentFile
}
};
var response = api.PostPageFileAttachmentAnnotations(Name, 1, annotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var annotationresponse = api.GetDocumentFileAttachmentAnnotations(Name, folder: FolderName);
string annotationId = annotationresponse.Annotations.List[0].Id;
var response = api.PutFileAttachmentAnnotationDataExtract(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(AttachmentFile, AttachmentFile);
FileAttachmentAnnotation annotation = new FileAttachmentAnnotation()
{
Name = "Updated Example",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text Updated",
Subject = "Subj Updated",
ZIndex = 1,
Title = "Title Updated",
Modified = "01/01/2018 00:00:00.000 AM",
FilePath = Path.Combine(FolderName, AttachmentFile),
FileName = AttachmentFile
};
var lineResponse = api.GetDocumentFileAttachmentAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutFileAttachmentAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentFreeTextAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var freeTextresponse = api.GetDocumentFreeTextAnnotations(Name, folder: FolderName);
string annotationId = freeTextresponse.Annotations.List[0].Id;
var response = api.GetFreeTextAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageFreeTextAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
List<FreeTextAnnotation> annotations = new List<FreeTextAnnotation>
{
new FreeTextAnnotation()
{
Name = "Test Free Text",
TextStyle = new TextStyle(FontSize: 12, Font: "Arial", ForegroundColor: new Color(0xFF, 0, 0xFF, 0), BackgroundColor: new Color(0xFF, 0xFF, 0, 0)),
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> { AnnotationFlags.Default},
HorizontalAlignment = HorizontalAlignment.Center,
Intent = FreeTextIntent.FreeTextTypeWriter,
RichText = "Rich Text",
Subject = "Text Box Subj",
ZIndex = 1,
Justification = Justification.Center,
Title = "Title"
}
};
var response = api.PostPageFreeTextAnnotations(Name, 1, annotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
FreeTextAnnotation annotation = new FreeTextAnnotation()
{
Name = "Test Free Text",
TextStyle = new TextStyle(FontSize: 12, Font: "Arial", ForegroundColor: new Color(0xFF, 0, 0xFF, 0), BackgroundColor: new Color(0xFF, 0xFF, 0, 0)),
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> { AnnotationFlags.Default },
HorizontalAlignment = HorizontalAlignment.Center,
Intent = FreeTextIntent.FreeTextTypeWriter,
RichText = "Updated Text",
Subject = "Text Box Subj",
ZIndex = 1,
Justification = Justification.Center,
Title = "Title"
};
var freeTextresponse = api.GetDocumentFreeTextAnnotations(Name, folder: FolderName);
string annotationId = freeTextresponse.Annotations.List[0].Id;
var response = api.PutFreeTextAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var Highlightresponse = api.GetDocumentHighlightAnnotations(Name, folder: FolderName);
string annotationId = Highlightresponse.Annotations.List[0].Id;
var response = api.GetHighlightAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageHighlightAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
List<HighlightAnnotation> annotations = new List<HighlightAnnotation>
{
new HighlightAnnotation()
{
Name = "Test Highlight Annotation",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> {AnnotationFlags.Hidden, AnnotationFlags.NoView},
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text",
Subject = "Subj",
ZIndex = 1,
Title = "Title",
QuadPoints = new List<Point>
{
new Point(10, 10),
new Point(20, 10),
new Point(10, 20),
new Point(10, 10)
},
Modified = "01/01/2018 00:00:00.000 AM"
}
};
var response = api.PostPageHighlightAnnotations(Name, 1, annotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
HighlightAnnotation annotation = new HighlightAnnotation()
{
Name = "Test Highlight Annotation Updated",
Rect = new Rectangle(101, 101, 201, 201),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text Updated",
Subject = "Subj Updated",
ZIndex = 1,
Title = "Title Updated",
QuadPoints = new List<Point>
{
new Point(11, 11),
new Point(21, 11),
new Point(11, 21),
new Point(11, 11)
},
Modified = "02/02/2018 00:00:00.000 AM"
};
var lineResponse = api.GetDocumentHighlightAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutHighlightAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.DeleteImage(Name, ImageId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-tasks
var response = api.GetImage(Name, ImageId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetImageExtractAsGif(Name, ImageId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetImageExtractAsJpeg(Name, ImageId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetImageExtractAsPng(Name, ImageId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetImageExtractAsTiff(Name, ImageId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetImages(Name, 1, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string imageName = "Koala.jpg";
UploadFile(imageName, imageName);
var response = api.PostInsertImage(name: Name, pageNumber: 1, llx: 10, lly:10, urx: 100, ury: 100, imageFilePath: Path.Combine(FolderName, imageName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string destFolder = "extract_gif";
var response = api.PutImageExtractAsGif(Name, ImageId, folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string destFolder = "extract_jpg";
var response = api.PutImageExtractAsJpeg(Name, ImageId, folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string destFolder = "extract_png";
var response = api.PutImageExtractAsPng(Name, ImageId, folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string destFolder = "extract_tiff";
var response = api.PutImageExtractAsTiff(Name, ImageId, folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const int pageNumber = 1;
const string destFolder = "extract_gif";
var response = api.PutImagesExtractAsGif(Name, pageNumber: pageNumber,
folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const int pageNumber = 1;
const string destFolder = "extract_jpg";
var response = api.PutImagesExtractAsJpeg(Name, pageNumber: pageNumber,
folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const int pageNumber = 1;
const string destFolder = "extract_png";
var response = api.PutImagesExtractAsPng(Name, pageNumber: pageNumber,
folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const int pageNumber = 1;
const string destFolder = "extract_tiff";
var response = api.PutImagesExtractAsTiff(Name, pageNumber: pageNumber,
folder: FolderName, destFolder: Path.Combine(FolderName, destFolder));
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string imageName = "Koala.jpg";
UploadFile(imageName, imageName);
var response = api.PutReplaceImage(name: Name, imageId: ImageId, imageFilePath: Path.Combine(FolderName, imageName), folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
var response = api.GetExportFieldsFromPdfToFdfInStorage(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
var response = api.GetExportFieldsFromPdfToXfdfInStorage(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
var response = api.GetExportFieldsFromPdfToXmlInStorage(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
const string fdfFileName = "FormData.fdf";
UploadFile(fdfFileName, fdfFileName);
string fdfFilePath = Path.Combine(FolderName, fdfFileName);
var response = api.GetImportFieldsFromFdfInStorage(name, fdfFilePath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormDataXfdf_in.pdf";
UploadFile(name, name);
const string fdfxFileName = "FormDataXfdf_in.xfdf";
UploadFile(fdfxFileName, fdfxFileName);
string fdfxFilePath = Path.Combine(FolderName, fdfxFileName);
var response = api.GetImportFieldsFromXfdfInStorage(name, fdfxFilePath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormDataXfa_in.pdf";
UploadFile(name, name);
const string xmlFileName = "FormDataXfa_in.xml";
UploadFile(xmlFileName, xmlFileName);
string xmlFilePath = Path.Combine(FolderName, xmlFileName);
var response = api.GetImportFieldsFromXmlInStorage(name, xmlFilePath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
const string fdfFileName = "FormData.fdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", fdfFileName)))
{
var response = api.PostImportFieldsFromFdf(name, folder: FolderName, fdfData: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormDataXfdf_in.pdf";
UploadFile(name, name);
const string fdfxFileName = "FormDataXfdf_in.xfdf";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", fdfxFileName)))
{
var response = api.PostImportFieldsFromXfdf(name, folder: FolderName, xfdfData: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormDataXfa_in.pdf";
UploadFile(name, name);
const string xmlFileName = "FormDataXfa_in.xml";
using (Stream stream = System.IO.File.OpenRead(Path.Combine("", xmlFileName)))
{
var response = api.PostImportFieldsFromXml(name, folder: FolderName, xmlData: stream);
Console.WriteLine(response);
}
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
string outPath = Path.Combine(FolderName, "exportData.fdf");
var response = api.PutExportFieldsFromPdfToFdfInStorage(name, outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
string outPath = Path.Combine(FolderName, "exportData.xfdf");
var response = api.PutExportFieldsFromPdfToXfdfInStorage(name, outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
string outPath = Path.Combine(FolderName, "exportData.xml");
var response = api.PutExportFieldsFromPdfToXmlInStorage(name, outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormData.pdf";
UploadFile(name, name);
const string fdfFileName = "FormData.fdf";
UploadFile(fdfFileName, fdfFileName);
string fdfFilePath = Path.Combine(FolderName, fdfFileName);
var response = api.PutImportFieldsFromFdfInStorage(name, fdfFilePath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormDataXfdf_in.pdf";
UploadFile(name, name);
const string fdfxFileName = "FormDataXfdf_in.xfdf";
UploadFile(fdfxFileName, fdfxFileName);
string fdfxFilePath = Path.Combine(FolderName, fdfxFileName);
var response = api.PutImportFieldsFromXfdfInStorage(name, fdfxFilePath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "FormDataXfa_in.pdf";
UploadFile(name, name);
const string xmlFileName = "FormDataXfa_in.xml";
UploadFile(xmlFileName, xmlFileName);
string xmlFilePath = Path.Combine(FolderName, xmlFileName);
var response = api.PutImportFieldsFromXmlInStorage(name, xmlFilePath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentInkAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var Inkresponse = api.GetDocumentInkAnnotations(Name, folder: FolderName);
string annotationId = Inkresponse.Annotations.List[0].Id;
var response = api.GetInkAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageInkAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
List<InkAnnotation> annotations = new List<InkAnnotation>
{
new InkAnnotation()
{
Name = "Example Ink Annotation",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> {AnnotationFlags.Hidden, AnnotationFlags.NoView},
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text",
Subject = "Subj",
ZIndex = 1,
Title = "Title",
InkList = new List<List<Point>>
{
new List<Point>
{
new Point(10, 40),
new Point(30, 40)
},
new List<Point>
{
new Point(10, 20),
new Point(20, 20),
new Point(30, 20)
}
},
CapStyle = CapStyle.Rounded,
Modified = "01/01/2018 00:00:00.000 AM"
}
};
var response = api.PostPageInkAnnotations(Name, 1, annotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
InkAnnotation annotation = new InkAnnotation()
{
Name = "Example Ink Annotation Updated",
Rect = new Rectangle(101, 101, 201, 201),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text Updated",
Subject = "Subj Updated",
ZIndex = 1,
Title = "Title Updated",
InkList = new List<List<Point>>
{
new List<Point>
{
new Point(10, 40),
new Point(30, 40)
},
new List<Point>
{
new Point(10, 20),
new Point(20, 20),
new Point(30, 20)
}
},
CapStyle = CapStyle.Rounded,
Modified = "02/02/2018 00:00:00.000 AM"
};
var lineResponse = api.GetDocumentInkAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutInkAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var lineresponse = api.GetDocumentLineAnnotations(Name, folder: FolderName);
string annotationId = lineresponse.Annotations.List[0].Id;
var response = api.GetLineAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var lineresponse = api.GetDocumentLineAnnotations(Name, folder: FolderName);
string annotationId = lineresponse.Annotations.List[0].Id;
var response = api.GetLineAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
LineAnnotation annotation = new LineAnnotation()
{
Name = "Example Line Annotation",
Rect = new Rectangle(100, 100, 300, 300),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Updated Rich Text",
Subject = "Subj",
ZIndex = 1,
ShowCaption = true,
Title = "Title Updated",
Starting = new Point(10, 10),
Ending = new Point(100, 100)
};
var lineResponse = api.GetDocumentLineAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutLineAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
Name = "Test Line Annotation",
Rect = new Rectangle(100, 100, 300, 300),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Updated Rich Text",
Subject = "Subj",
ZIndex = 1,
ShowCaption = true,
Title = "Title Updated",
Starting = new Point(10, 10),
Ending = new Point(100, 100)
};
var lineResponse = api.GetDocumentLineAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutLineAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.DeleteDocumentLinkAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var getLinksResponse = api.GetPageLinkAnnotations(Name, 1, folder: FolderName);
string linkId = getLinksResponse.Links.List[0].Id;
var response = api.DeleteLinkAnnotation(Name, linkId: linkId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.DeletePageLinkAnnotations(Name, pageNumber: 1, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var getLinksResponse = api.GetPageLinkAnnotations(Name, 1, folder: FolderName);
string linkId = getLinksResponse.Links.List[0].Id;
var response = api.GetLinkAnnotation(Name, linkId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var getLinksResponse = api.GetPageLinkAnnotations(Name, 1, folder: FolderName);
string linkId = getLinksResponse.Links.List[0].Id;
var response = api.GetPageLinkAnnotation(Name, pageNumber: 1, linkId: linkId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageLinkAnnotations(Name, 1, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
LinkAnnotation linkAnnotation = new LinkAnnotation(null, LinkActionType.GoToURIAction, "https://products.aspose.cloud/pdf",
LinkHighlightingMode.Invert, new Color(0xFF, 0xAA, 0xAA, 0xAA), new Rectangle(100, 100, 500, 500));
var linkAnnotations = new List<LinkAnnotation>
{
linkAnnotation
};
var response = api.PostPageLinkAnnotations(Name, pageNumber: 1, links: linkAnnotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var getLinksResponse = api.GetPageLinkAnnotations(Name, 1, folder: FolderName);
string linkId = getLinksResponse.Links.List[0].Id;
LinkAnnotation linkAnnotation = new LinkAnnotation(null, LinkActionType.GoToURIAction, "https://products.aspose.cloud/pdf",
LinkHighlightingMode.Invert, new Color(0xFF, 0xAA, 0xAA, 0xAA), new Rectangle(100, 100, 500, 500));
var response = api.PutLinkAnnotation(Name, linkId: linkId, link: linkAnnotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var names = new[] { "4pages.pdf", "PdfWithImages2.pdf", "marketing.pdf" };
const string resultName = "MergingResult.pdf";
var mergeDocuments = new MergeDocuments(new List<string>());
foreach (var name in names)
{
UploadFile(name, name);
mergeDocuments.List.Add(Path.Combine(FolderName, name));
}
var response = api.PutMergeDocuments(resultName, mergeDocuments, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentMovieAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var Movieresponse = api.GetDocumentMovieAnnotations(Name, folder: FolderName);
string annotationId = Movieresponse.Annotations.List[0].Id;
var response = api.GetMovieAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageMovieAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(AttachmentFile, AttachmentFile);
List<MovieAnnotation> annotations = new List<MovieAnnotation>
{
new MovieAnnotation()
{
Name = "Example Movie Annotation",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> {AnnotationFlags.Hidden, AnnotationFlags.NoView},
HorizontalAlignment = HorizontalAlignment.Center,
ZIndex = 1,
FilePath = AttachmentFile,
Modified = "01/01/2018 00:00:00.000 AM"
}
};
var response = api.PostPageMovieAnnotations(Name, 1, annotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
UploadFile(AttachmentFile, AttachmentFile);
MovieAnnotation annotation = new MovieAnnotation()
{
Name = "Updated Example",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
ZIndex = 1,
FilePath = AttachmentFile,
Modified = "01/01/2018 00:00:00.000 AM"
};
var lineResponse = api.GetDocumentMovieAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutMovieAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string name = "rusdoc.pdf";
UploadFile(name, name);
var response = api.PutSearchableDocument(name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageConvertToBmp(Name, pageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageConvertToEmf(Name, pageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageConvertToBmp(Name, pageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageConvertToJpeg(Name, pageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageConvertToPng(Name, pageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPageConvertToTiff(Name, pageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string resultFile = "page.bmp";
string outPath = Path.Combine(FolderName, resultFile);
var response = api.PutPageConvertToBmp(Name, pageNumber, outPath: outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string resultFile = "page.emf";
string outPath = Path.Combine(FolderName, resultFile);
var response = api.PutPageConvertToEmf(Name, pageNumber, outPath: outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-tasks
string resultFile = "page.gif";
string outPath = Path.Combine(FolderName, resultFile);
var response = api.PutPageConvertToGif(Name, pageNumber, outPath: outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string resultFile = "page.jpeg";
string outPath = Path.Combine(FolderName, resultFile);
var response = api.PutPageConvertToJpeg(Name, pageNumber, outPath: outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string resultFile = "page.png";
string outPath = Path.Combine(FolderName, resultFile);
var response = api.PutPageConvertToPng(Name, pageNumber, outPath: outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
string resultFile = "page.tiff";
string outPath = Path.Combine(FolderName, resultFile);
var response = api.PutPageConvertToTiff(Name, pageNumber, outPath: outPath, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.DeletePage(Name, 3, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPage(Name, pageNumber: 1, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPages(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetWordsPerPage(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.PostMovePage(Name, 3, 2, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.PutAddNewPage(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
const string stampFile = "Penguins.jpg";
UploadFile(stampFile, stampFile);
var stamp = new Stamp(
Type: StampType.Image,
FileName: Path.Combine(FolderName, stampFile),
Background: true,
Width: 200,
Height: 200,
XIndent: 100,
YIndent: 100);
var response = api.PutPageAddStamp(Name, 1, stamp, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-tasks
var response = api.GetDocumentPolygonAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPagePolygonAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var polygonresponse = api.GetDocumentPolygonAnnotations(Name, folder: FolderName);
string annotationId = polygonresponse.Annotations.List[0].Id;
var response = api.GetPolygonAnnotation(Name, annotationId, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
List<PolygonAnnotation> annotations = new List<PolygonAnnotation>
{
new PolygonAnnotation()
{
Name = "Example Polygon Annotation",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> {AnnotationFlags.Hidden, AnnotationFlags.NoView},
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text",
Subject = "Subj",
ZIndex = 1,
Title = "Title",
Vertices = new List<Point>
{
new Point(10, 10),
new Point(20, 10),
new Point(10, 20),
new Point(10, 10)
}
}
};
var response = api.PostPagePolygonAnnotations(Name, 1, annotations, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
PolygonAnnotation annotation = new PolygonAnnotation()
{
Name = "Updated Example",
Rect = new Rectangle(100, 100, 200, 200),
Flags = new List<AnnotationFlags> { AnnotationFlags.Hidden, AnnotationFlags.NoView },
HorizontalAlignment = HorizontalAlignment.Center,
RichText = "Rich Text Updated",
Subject = "Subj Updated",
ZIndex = 1,
Title = "Title Updated",
Vertices = new List<Point>
{
new Point(10, 10),
new Point(20, 10),
new Point(10, 20),
new Point(10, 10)
}
};
var lineResponse = api.GetDocumentPolygonAnnotations(Name, folder: FolderName);
string annotationId = lineResponse.Annotations.List[0].Id;
var response = api.PutPolygonAnnotation(Name, annotationId, annotation, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetDocumentPolyLineAnnotations(Name, folder: FolderName);
Console.WriteLine(response);
// For complete examples and data files, please go to github.com/aspose-pdf-cloud
var response = api.GetPagePolyLineAnnotations(Name, PageNumber, folder: FolderName);
Console.WriteLine(response);