
> Aspose.PDF for Go via C++ allows developers manipulate them PDF files directly in the Go.

# Types

## Document
Document represents a PDF-document.

```go
type Document struct {
}
```

# Functions

## Convert from PDF functions

| Function | Description |
| -------- | ----------- |
| [SaveDocX](./convert/savedocx/) | Convert and save the previously opened PDF-document as DocX-document. |
| [SaveDoc](./convert/savedoc/) | Convert and save the previously opened PDF-document as Doc-document. |
| [SaveXlsX](./convert/savexlsx/) | Convert and save the previously opened PDF-document as XlsX-document. |
| [SaveTxt](./convert/savetxt/) | Convert and save the previously opened PDF-document as Txt-document. |
| [SavePptX](./convert/savepptx/) | Convert and save the previously opened PDF-document as PptX-document. |
| [SaveXps](./convert/savexps/) | Convert and save the previously opened PDF-document as Xps-document. |
| [SaveTeX](./convert/savetex/) | Convert and save the previously opened PDF-document as TeX-document. |
| [SaveEpub](./convert/saveepub/) | Convert and save the previously opened PDF-document as Epub-document. |
| [SaveBooklet](./convert/savebooklet/) | Convert and save the previously opened PDF-document as booklet PDF-document. |
| [SaveNUp](./convert/savenup/) | Convert and save the previously opened PDF-document as N-Up PDF-document. |
| [SaveMarkdown](./convert/savemarkdown/) | Convert and save the previously opened PDF-document as Markdown-document. |
| [SaveTiff](./convert/savetiff/) | Convert and save the previously opened PDF-document as Tiff-document. |
| [SaveDocXEnhanced](./convert/savedocxenhanced/) | Convert and save the previously opened PDF-document as DocX-document with Enhanced Recognition Mode (fully editable tables and paragraphs). |
| [SaveSvgZip](./convert/savesvgzip/) | Convert and save the previously opened PDF-document as SVG-archive. |
| [ExportFdf](./convert/exportfdf/) | Export from the previously opened PDF-document with AcroForm to FDF-document. |
| [ExportXfdf](./convert/exportxfdf/) | Export from the previously opened PDF-document with AcroForm to XFDF-document. |
| [ExportXml](./convert/exportxml/) | Export from the previously opened PDF-document with AcroForm to XML-document. |
| [PageToJpg](./convert/pagetojpg/) | Convert and save the specified page as Jpg-image. |
| [PageToPng](./convert/pagetopng/) | Convert and save the specified page as Png-image. |
| [PageToBmp](./convert/pagetobmp/) | Convert and save the specified page as Bmp-image. |
| [PageToTiff](./convert/pagetotiff/) | Convert and save the specified page as Tiff-image. |
| [PageToSvg](./convert/pagetosvg/) | Convert and save the specified page as Svg-image. |
| [PageToPdf](./convert/pagetopdf/) | Convert and save the specified page as Pdf. |
| [PageToDICOM](./convert/pagetodicom/) | Convert and save the specified page as DICOM-image. |


## Organize PDF functions

| Function | Description |
| -------- | ----------- |
| [Optimize](./organize/optimize/) | Optimize PDF-document content. |
| [OptimizeResource](./organize/optimizeresource/) | Optimize resources of PDF-document. |
| [Grayscale](./organize/grayscale/) | Convert PDF-document to black and white. |
| [Rotate](./organize/rotate/) | Rotate PDF-document. |
| [SetBackground](./organize/setbackground/) | Set PDF-document background color. |
| [Repair](./organize/repair/) | Repaire PDF-document. |
| [ReplaceText](./organize/replacetext/) | Replace text in PDF-document. |
| [AddPageNum](./organize/addpagenum/) | Add page number to a PDF-document. |
| [AddTextHeader](./organize/addtextheader/) | Add text in Header of a PDF-document. |
| [AddTextFooter](./organize/addtextfooter/) | Add text in Footer of a PDF-document. |
| [Flatten](./organize/flatten/) | Flatten PDF-document. |
| [RemoveAnnotations](./organize/removeannotations/) | Remove annotations from PDF-document. |
| [RemoveAttachments](./organize/removeattachments/) | Remove attachments from PDF-document. |
| [RemoveBlankPages](./organize/removeblankpages/) | Remove blank pages from PDF-document. |
| [RemoveBookmarks](./organize/removebookmarks/) | Remove bookmarks from PDF-document. |
| [RemoveHiddenText](./organize/removehiddentext/) | Remove hidden text from PDF-document. |
| [RemoveImages](./organize/removeimages/) | Remove images from PDF-document. |
| [RemoveJavaScripts](./organize/removejavascripts/) | Remove java scripts from PDF-document. |
| [RemoveTables](./organize/removetables/) | Remove tables from PDF-document. |
| [RemoveWatermarks](./organize/removewatermarks/) | Remove watermarks from PDF-document. |
| [AddWatermark](./organize/addwatermark/) | Add watermark to PDF-document. |
| [EmbedFonts](./organize/embedfonts/) | Embed fonts a PDF-document. |
| [UnembedFonts](./organize/unembedfonts/) | Unembed fonts a PDF-document. |
| [OptimizeFileSize](./organize/optimizefilesize/) | Optimize size of PDF-document with image compression quality. |
| [RemoveTextHeaders](./organize/removetextheaders/) | Remove text headers from PDF-document. |
| [RemoveTextFooters](./organize/removetextfooters/) | Remove text footers from PDF-document. |
| [Crop](./organize/crop/) | Crop pages of a PDF-document. |
| [ReplaceFont](./organize/replacefont/) | Replace font in a PDF-document. |
| [Convert](./organize/convert/) | Convert a PDF-document into a PDF-document with the specified PDF format. |
| [Validate](./organize/validate/) | Validate a PDF-document for compliance with the PDF format. |
| [RemovePdfaCompliance](./organize/removepdfacompliance/) | Remove PDF/A compliance from a PDF-document. |
| [RemovePdfUaCompliance](./organize/removepdfuacompliance/) | Remove PDF/UA compliance from a PDF-document. |
| [IsPdfaCompliant](./organize/ispdfacompliant/) | Get is a PDF-document PDF/A compliant. |
| [IsPdfUaCompliant](./organize/ispdfuacompliant/) | Get is a PDF-document PDF/UA compliant. |
| [ReversePages](./organize/reversepages/) | Reverse the order of pages in PDF-document. |
| [ReorderPages](./organize/reorderpages/) | Reorder pages in PDF-document. |
| [PageRotate](./organize/pagerotate/) | Rotate page. |
| [PageSetSize](./organize/pagesetsize/) | Set size of page. |
| [PageGrayscale](./organize/pagegrayscale/) | Convert page to black and white. |
| [PageAddText](./organize/pageaddtext/) | Add text on page. |
| [PageReplaceText](./organize/pagereplacetext/) | Replace text on page. |
| [PageAddPageNum](./organize/pageaddpagenum/) | Add page number on page. |
| [PageAddTextHeader](./organize/pageaddtextheader/) | Add text in page header. |
| [PageAddTextFooter](./organize/pageaddtextfooter/) | Add text in page footer. |
| [PageRemoveAnnotations](./organize/pageremoveannotations/) | Remove annotations in page. |
| [PageRemoveHiddenText](./organize/pageremovehiddentext/) | Remove hidden text in page. |
| [PageRemoveImages](./organize/pageremoveimages/) | Remove images in page. |
| [PageRemoveTables](./organize/pageremovetables/) | Remove tables in page. |
| [PageRemoveWatermarks](./organize/pageremovewatermarks/) | Remove watermarks in page. |
| [PageAddWatermark](./organize/pageaddwatermark/) | Add watermark on page. |
| [PageRemoveTextHeaders](./organize/pageremovetextheaders/) | Remove text headers in page. |
| [PageRemoveTextFooters](./organize/pageremovetextfooters/) | Remove text footers in page. |
| [PageCrop](./organize/pagecrop/) | Crop page. |
| [PageReplaceFont](./organize/pagereplacefont/) | Replace font in page. |
| [PageMergeLayers](./organize/pagemergelayers/) | Merge all layers on the page into a single layer with the specified new layer name. |
| [PageLayers](./organize/pagelayers/) | Gets layers' names on page. |


## Core PDF functions

| Function | Description |
| -------- | ----------- |
| [New](./core/new/) | Create a new PDF-document. |
| [Open](./core/open/) | Open a PDF-document with filename. |
| [Save](./core/save/) | Save the previously opened PDF-document. |
| [SaveAs](./core/saveas/) | Save the previously opened PDF-document with new filename. |
| [Close](./core/close/) | Release allocated resources for PDF-document. |
| [SetLicense](./core/setlicense/) | Set license with filename. |
| [ExtractText](./core/extracttext/) | Return the PDF-document contents as plain text. |
| [WordCount](./core/wordcount/) | Return word count in PDF-document. |
| [CharacterCount](./core/charactercount/) | Return character count in PDF-document. |
| [Append](./core/append/) | Append pages from another PDF-document. |
| [AppendPages](./core/appendpages/) | Append selected pages from another PDF-document. |
| [MergeDocuments](./core/mergedocuments/) | Create a new PDF-document by merging the provided PDF-documents. |
| [SplitDocument](./core/splitdocument/) | Create multiple new PDF-documents by extracting pages from the source PDF-document. |
| [Split](./core/split/) | Create multiple new PDF-documents by extracting pages from the current PDF-document. |
| [SplitAtPage](./core/splitatpage/) | Split the PDF-document into two new PDF-documents. |
| [SplitAt](./core/splitat/) | Split the current PDF-document into two new PDF-documents. |
| [Bytes](./core/bytes/) | Return the contents of the PDF-document as a byte slice. |
| [GetMetaInfo](./core/getmetainfo/) | Get meta information value of PDF-document.. |
| [SetMetaInfo](./core/setmetainfo/) | Set meta information value of PDF-document.. |
| [ClearMetaInfo](./core/clearmetainfo/) | Clear all meta information values of PDF-document.. |
| [IsLinearized](./core/islinearized/) | Get a value indicating whether document is linearized. |
| [PageAdd](./core/pageadd/) | Add new page in PDF-document. |
| [PageInsert](./core/pageinsert/) | Insert new page at the specified position in PDF-document. |
| [PageDelete](./core/pagedelete/) | Delete specified page in PDF-document. |
| [PageCount](./core/pagecount/) | Return page count in PDF-document. |
| [PageWordCount](./core/pagewordcount/) | Return word count on specified page in PDF-document. |
| [PageCharacterCount](./core/pagecharactercount/) | Return character count on specified page in PDF-document. |
| [PageIsBlank](./core/pageisblank/) | Return page is blank in PDF-document. |


## Security

| Function | Description |
| -------- | ----------- |
| [OpenWithPassword](./security/openwithpassword/) | Open a password-protected PDF-document. |
| [Encrypt](./security/encrypt/) | Encrypt PDF-document. |
| [Decrypt](./security/decrypt/) | Decrypt PDF-document. |
| [SetPermissions](./security/setpermissions/) | Set permissions for PDF-document. |
| [GetPermissions](./security/getpermissions/) | Get current permissions of PDF-document. |
| [IsEncrypted](./security/isencrypted/) | Get encrypted status of PDF-document. |
| [SignPKCS7](./security/signpkcs7/) | Sign a PDF-document using PKCS#7 digital signatures. |
| [SignPKCS7Detached](./security/signpkcs7detached/) | Sign a PDF-document using PKCS#7 Detached digital signatures. |
| [IsSigned](./security/issigned/) | Get signed status of PDF-document. |
| [RemoveSigns](./security/removesigns/) | Remove signs from PDF-document. |


## Miscellaneous

| Function | Description |
| -------- | ----------- |
| [About](./miscellaneous/about/) | Return metadata information about the Aspose.PDF for Go via C++. |


# Types secondary

## ProductInfo contains metadata about the Aspose.PDF for Go via C++.
```go
type ProductInfo struct {
	Product     string `json:"product"`     // Name
	Family      string `json:"family"`      // Family (e.g., "Aspose.PDF")
	Version     string `json:"version"`     // Version
	ReleaseDate string `json:"releasedate"` // Release date in ISO format (YYYY-MM-DD)
	Producer    string `json:"producer"`    // Producer
	IsLicensed  bool   `json:"islicensed"`  // License status (true if licensed)
}
```


# Constants

## Enumeration of possible rotation values.
```go
const (
    RotationNone  int32 = 0 // Non-rotated.
    RotationOn90  int32 = 1 // Rotated on 90 degrees clockwise.
    RotationOn180 int32 = 2 // Rotated on 180 degrees.
    RotationOn270 int32 = 3 // Rotated on 270 degrees clockwise.
    RotationOn360 int32 = 4 // Rotated on 360 degrees clockwise.
)
```

## Enumeration of possible page size values.
```go
const (
    PageSizeA0         int32 = 0  // A0 size.
    PageSizeA1         int32 = 1  // A1 size.
    PageSizeA2         int32 = 2  // A2 size.
    PageSizeA3         int32 = 3  // A3 size.
    PageSizeA4         int32 = 4  // A4 size.
    PageSizeA5         int32 = 5  // A5 size.
    PageSizeA6         int32 = 6  // A6 size.
    PageSizeB5         int32 = 7  // B5 size.
    PageSizePageLetter int32 = 8  // PageLetter size.
    PageSizePageLegal  int32 = 9  // PageLegal size.
    PageSizePageLedger int32 = 10 // PageLedger size.
    PageSizeP11x17     int32 = 11 // P11x17 size.
)
```

## Enumeration of possible crypto algorithms.
```go
type CryptoAlgorithm int32
const (
	RC4x40  CryptoAlgorithm = 0 // RC4 with key length 40.
	RC4x128 CryptoAlgorithm = 1 // RC4 with key length 128.
	AESx128 CryptoAlgorithm = 2 // AES with key length 128.
	AESx256 CryptoAlgorithm = 3 // AES with key length 256.
)
```

## Enumeration of possible PDF formats.
```go
type PdfFormat int32
const (
	PDF_A_1A      PdfFormat = iota // Pdf/A-1a format.
	PDF_A_1B                       // Pdf/A-1b format.
	PDF_A_2A                       // Pdf/A-2a format.
	PDF_A_3A                       // Pdf/A-3a format.
	PDF_A_2B                       // Pdf/A-2b format.
	PDF_A_2U                       // Pdf/A-2u format.
	PDF_A_3B                       // Pdf/A-3b format.
	PDF_A_3U                       // Pdf/A-3u format.
	V_1_0                          // Adobe version 1.0.
	V_1_1                          // Adobe version 1.1.
	V_1_2                          // Adobe version 1.2.
	V_1_3                          // Adobe version 1.3.
	V_1_4                          // Adobe version 1.4.
	V_1_5                          // Adobe version 1.5.
	V_1_6                          // Adobe version 1.6.
	V_1_7                          // Adobe version 1.7.
	V_2_0                          // ISO Standard PDF 2.0.
	PDF_UA_1                       // PDF/UA-1 format.
	PDF_X_1A_2001                  // PDF/X-1a-2001 format.
	PDF_X_1A                       // PDF/X-1a format.
	PDF_X_3                        // PDF/X-3 format.
	ZUGFeRD                        // ZUGFeRD format.
	PDF_A_4                        // PDF/A-4 format.
	PDF_A_4E                       // PDF/A-4e format.
	PDF_A_4F                       // PDF/A-4f format.
	PDF_X_4                        // PDF/X-4 format.
	PDF_E_1                        // PDF/E-1 (PDF 1.6) format.
)
```

## Enumeration of possible conversion errors action.
```go
type ConvertErrorAction int32
const (
	Delete ConvertErrorAction = iota // Delete convert errors.
	None                             // Do nothing with convert errors.
)
```

## Bitflag set representing PDF permission capabilities.
```go
type Permissions int32
const (
    PrintDocument                  Permissions = 1 << 2  // 4
    ModifyContent                  Permissions = 1 << 3  // 8
    ExtractContent                 Permissions = 1 << 4  // 16
    ModifyTextAnnotations          Permissions = 1 << 5  // 32
    FillForm                       Permissions = 1 << 8  // 256
    ExtractContentWithDisabilities Permissions = 1 << 9  // 512
    AssembleDocument               Permissions = 1 << 10 // 1024
    PrintingQuality                Permissions = 1 << 11 // 2048
)
```
