Class Document
Inheritance
Namespace: PSPDFKit
Assembly: PSPDFKit.dll
Syntax
public class Document : object
Constructors
Document(IDataProvider)
Open a document.
Declaration
public Document(IDataProvider dataProvider)
Parameters
Type | Name | Description |
---|---|---|
IData |
dataProvider | A IData |
Methods
CreateDocumentEditor()
Produce a document editor using the current document as a base.
Declaration
public DocumentEditor CreateDocumentEditor()
Returns
Type | Description |
---|---|
Document |
An instance of the Document |
ExportDocumentJson(IWritableDataProvider)
Exports the changes of a document to Instant Document Json. For the json format please see https://pspdfkit.com/guides/web/current/importing-exporting/instant-json/
Declaration
public void ExportDocumentJson(IWritableDataProvider writableDataProvider)
Parameters
Type | Name | Description |
---|---|---|
IWritable |
writableDataProvider | The Json will be written to this data provider. |
ExportXfdf(IWritableDataProvider, IEnumerable<Int32>, IEnumerable<String>)
Export XFDF of the current document. For the XFDF specification see https://www.iso.org/obp/ui/#iso:std:iso:19444:-1:ed-1:v1:en
Declaration
public void ExportXfdf(IWritableDataProvider writableDataProvider, IEnumerable<int> annotationsToExport, IEnumerable<string> formFieldsToExport)
Parameters
Type | Name | Description |
---|---|---|
IWritable |
writableDataProvider | The XFDF will be written to this data provider. |
IEnumerable<System. |
annotationsToExport | The id's of the annotations to export. If empty all annotations will be exported. |
IEnumerable<System. |
formFieldsToExport | The form fields that should be exported into the XFDF. If empty, all forms will be exported. |
GetAnnotationProvider()
Returns Annotation
Declaration
public AnnotationProvider GetAnnotationProvider()
Returns
Type | Description |
---|---|
Annotation |
The annotation provider. |
GetFormProvider()
Returns Form
Declaration
public FormProvider GetFormProvider()
Returns
Type | Description |
---|---|
Form |
GetPage(UInt32)
Retrieve a Page from the document.
Declaration
public Page GetPage(uint pageIndex)
Parameters
Type | Name | Description |
---|---|---|
System. |
pageIndex | The index of the page indexed from 0. |
Returns
GetPageCount()
Retrieve the number of pages in the document.
Declaration
public uint GetPageCount()
Returns
Type | Description |
---|---|
System. |
Number of Pages |
GetProjection()
Returns auxiliary projection class for mapping coordinate space between raw and normalized Pdf.
Declaration
public Projection GetProjection()
Returns
Type | Description |
---|---|
Projection |
ImportDocumentJson(IDataProvider)
Takes Instant Document Json and imports the changes into the currently loaded document. For the json format please see https://pspdfkit.com/guides/web/current/importing-exporting/instant-json/
Declaration
public void ImportDocumentJson(IDataProvider dataProvider)
Parameters
Type | Name | Description |
---|---|---|
IData |
dataProvider | A provider with the data to import. |
ImportXfdf(IDataProvider)
Import XFDF data into the currently open document. For the XFDF specification see https://www.iso.org/obp/ui/#iso:std:iso:19444:-1:ed-1:v1:en
Declaration
public void ImportXfdf(IDataProvider dataProvider)
Parameters
Type | Name | Description |
---|---|---|
IData |
dataProvider | A provider containing the XFDF data. |
Save(DocumentSaveOptions)
Save the current state back to the IData
Declaration
public void Save(DocumentSaveOptions documentSaveOptions)
Parameters
Type | Name | Description |
---|---|---|
Document |
documentSaveOptions | Options to customize the save operation. Document |
SaveAs(IWritableDataProvider, DocumentSaveOptions)
Performs a full save of the document to a destination IWritable
Declaration
public void SaveAs(IWritableDataProvider writableDataProvider, DocumentSaveOptions documentSaveOptions)
Parameters
Type | Name | Description |
---|---|---|
IWritable |
writableDataProvider | The provider to write the document to. |
Document |
documentSaveOptions | Options to customize the save operation. Document |