implementation

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Pdfium = &mainPdfium{
	mutex:        &sync.Mutex{},
	instanceRefs: map[int]*PdfiumImplementation{},
	documentRefs: map[references.FPDF_DOCUMENT]*DocumentHandle{},
}

Pdfium is a container so that we can always only have 1 instance of PDFium per process. We need this so that we can guarantee thread safety.

Functions

func DestroyLibrary

func DestroyLibrary()

DestroyLibrary unloads the actual C++ library. If any documents were loaded, it closes them.

func InitLibrary

func InitLibrary()

InitLibrary loads the actual C++ library.

func StartPlugin

func StartPlugin()

Types

type ActionHandle added in v0.5.0

type ActionHandle struct {
	// contains filtered or unexported fields
}

type AnnotationHandle added in v0.5.0

type AnnotationHandle struct {
	// contains filtered or unexported fields
}

type AttachmentHandle added in v0.5.0

type AttachmentHandle struct {
	// contains filtered or unexported fields
}

type BitmapHandle added in v0.5.0

type BitmapHandle struct {
	// contains filtered or unexported fields
}

type BookmarkHandle added in v0.5.0

type BookmarkHandle struct {
	// contains filtered or unexported fields
}

type ClipPathHandle added in v0.5.0

type ClipPathHandle struct {
	// contains filtered or unexported fields
}

type DestHandle added in v0.5.0

type DestHandle struct {
	// contains filtered or unexported fields
}

type DocumentHandle added in v0.5.0

type DocumentHandle struct {
	// contains filtered or unexported fields
}

func (*DocumentHandle) Close added in v0.5.0

func (d *DocumentHandle) Close() error

Close closes the internal references in FPDF

type FormHandleHandle added in v0.5.0

type FormHandleHandle struct {
	// contains filtered or unexported fields
}

type JavaScriptActionHandle added in v0.5.0

type JavaScriptActionHandle struct {
	// contains filtered or unexported fields
}

type LinkHandle added in v0.5.0

type LinkHandle struct {
	// contains filtered or unexported fields
}

type PageHandle added in v0.5.0

type PageHandle struct {
	// contains filtered or unexported fields
}

func (*PageHandle) Close added in v0.5.0

func (p *PageHandle) Close()

Close closes the internal references in FPDF

type PageLinkHandle added in v0.5.0

type PageLinkHandle struct {
	// contains filtered or unexported fields
}

type PageObjectHandle added in v0.5.0

type PageObjectHandle struct {
	// contains filtered or unexported fields
}

type PageRangeHandle added in v0.5.0

type PageRangeHandle struct {
	// contains filtered or unexported fields
}

type PdfiumImplementation added in v0.5.0

type PdfiumImplementation struct {
	// contains filtered or unexported fields
}

Here is the real implementation of Pdfium

func (*PdfiumImplementation) Close added in v0.5.0

func (p *PdfiumImplementation) Close() error

func (*PdfiumImplementation) FPDFAction_GetDest added in v0.5.0

FPDFAction_GetDest returns the destination of a specific go-to or remote-goto action. Only action with type PDF_ACTION_ACTION_GOTO and PDF_ACTION_ACTION_REMOTEGOTO can have destination data. In case of remote goto action, the application should first use function FPDFAction_GetFilePath to get file path, then load that particular document, and use its document handle to call this function.

func (*PdfiumImplementation) FPDFAction_GetFilePath added in v0.5.0

FPDFAction_GetFilePath returns the file path from a remote goto or launch action. Only works on actions that have the type FPDF_ACTION_ACTION_REMOTEGOTO or FPDF_ACTION_ACTION_LAUNCH.

func (*PdfiumImplementation) FPDFAction_GetType added in v0.5.0

FPDFAction_GetType returns the action associated with a bookmark item.

func (*PdfiumImplementation) FPDFAction_GetURIPath added in v0.5.0

FPDFAction_GetURIPath returns the URI path from a URI action.

func (*PdfiumImplementation) FPDFAttachment_GetFile added in v0.5.0

FPDFAttachment_GetFile gets the file data of the given attachment. Experimental API.

func (*PdfiumImplementation) FPDFAttachment_GetName added in v0.5.0

FPDFAttachment_GetName returns the name of the attachment file. Experimental API.

func (*PdfiumImplementation) FPDFAttachment_GetStringValue added in v0.5.0

FPDFAttachment_GetStringValue gets the string value corresponding to the given key in the params dictionary of the embedded file attachment. Experimental API.

func (*PdfiumImplementation) FPDFAttachment_GetValueType added in v0.5.0

FPDFAttachment_GetValueType returns the type of the value corresponding to the given key in the params dictionary of the embedded attachment. Experimental API.

func (*PdfiumImplementation) FPDFAttachment_HasKey added in v0.5.0

FPDFAttachment_HasKey check if the params dictionary of the given attachment has the given key as a key. Experimental API.

func (*PdfiumImplementation) FPDFAttachment_SetFile added in v0.5.0

FPDFAttachment_SetFile set the file data of the given attachment, overwriting the existing file data if any. The creation date and checksum will be updated, while all other dictionary entries will be deleted. Note that only contents with a length smaller than INT_MAX is supported. Experimental API.

func (*PdfiumImplementation) FPDFAttachment_SetStringValue added in v0.5.0

FPDFAttachment_SetStringValue sets the string value corresponding to the given key in the params dictionary of the embedded file attachment, overwriting the existing value if any. Experimental API.

func (*PdfiumImplementation) FPDFBitmap_Create added in v0.7.0

FPDFBitmap_Create Create a device independent bitmap (FXDIB).

func (*PdfiumImplementation) FPDFBitmap_CreateEx added in v0.7.0

FPDFBitmap_CreateEx Create a device independent bitmap (FXDIB) with an external buffer. Similar to FPDFBitmap_Create function, but allows for more formats and an external buffer is supported. The bitmap created by this function can be used in any place that a FPDF_BITMAP handle is required.

If an external buffer is used, then the application should destroy the buffer by itself. FPDFBitmap_Destroy function will not destroy the buffer.

Not supported on multi-threaded usage.

func (*PdfiumImplementation) FPDFBitmap_Destroy added in v0.7.0

FPDFBitmap_Destroy destroys a bitmap and release all related buffers. This function will not destroy any external buffers provided when the bitmap was created.

func (*PdfiumImplementation) FPDFBitmap_FillRect added in v0.7.0

FPDFBitmap_FillRect fills a rectangle in a bitmap. This function sets the color and (optionally) alpha value in the specified region of the bitmap.

NOTE: If the alpha channel is used, this function does NOT composite the background with the source color, instead the background will be replaced by the source color and the alpha.

If the alpha channel is not used, the alpha parameter is ignored.

func (*PdfiumImplementation) FPDFBitmap_GetBuffer added in v0.7.0

FPDFBitmap_GetBuffer returns the data buffer of a bitmap. The stride may be more than width * number of bytes per pixel

Applications can use this function to get the bitmap buffer pointer, then manipulate any color and/or alpha values for any pixels in the bitmap.

The data is in BGRA format. Where the A maybe unused if alpha was not specified.

func (*PdfiumImplementation) FPDFBitmap_GetFormat added in v0.7.0

FPDFBitmap_GetFormat returns the format of the bitmap. Only formats supported by FPDFBitmap_CreateEx are supported by this function.

func (*PdfiumImplementation) FPDFBitmap_GetHeight added in v0.7.0

FPDFBitmap_GetHeight returns the height of a bitmap.

func (*PdfiumImplementation) FPDFBitmap_GetStride added in v0.7.0

FPDFBitmap_GetStride returns the number of bytes for each line in the bitmap buffer.

func (*PdfiumImplementation) FPDFBitmap_GetWidth added in v0.7.0

FPDFBitmap_GetWidth returns the width of a bitmap.

func (*PdfiumImplementation) FPDFBookmark_Find added in v0.5.0

FPDFBookmark_Find finds a bookmark in the document, using the bookmark title.

func (*PdfiumImplementation) FPDFBookmark_GetAction added in v0.5.0

FPDFBookmark_GetAction returns the action associated with a bookmark item. If the returned action is nil, you should try FPDFBookmark_GetDest.

func (*PdfiumImplementation) FPDFBookmark_GetDest added in v0.5.0

FPDFBookmark_GetDest returns the destination associated with a bookmark item. If the returned destination is nil, none is associated to the bookmark item.

func (*PdfiumImplementation) FPDFBookmark_GetFirstChild added in v0.5.0

FPDFBookmark_GetFirstChild returns the first child of a bookmark item, or the first top level bookmark item.

func (*PdfiumImplementation) FPDFBookmark_GetNextSibling added in v0.5.0

FPDFBookmark_GetNextSibling returns the next bookmark item at the same level.

func (*PdfiumImplementation) FPDFBookmark_GetTitle added in v0.5.0

FPDFBookmark_GetTitle returns the title of a bookmark.

func (*PdfiumImplementation) FPDFCatalog_IsTagged added in v0.5.0

FPDFCatalog_IsTagged determines if the given document represents a tagged PDF. For the definition of tagged PDF, See (see 10.7 "Tagged PDF" in PDF Reference 1.7).

func (*PdfiumImplementation) FPDFDest_GetDestPageIndex added in v0.5.0

FPDFDest_GetDestPageIndex returns the page index from destination data.

func (*PdfiumImplementation) FPDFDest_GetLocationInPage added in v0.5.0

FPDFDest_GetLocationInPage returns the (x, y, zoom) location of dest in the destination page, if the destination is in [page /XYZ x y zoom] syntax.

func (*PdfiumImplementation) FPDFDest_GetView added in v0.5.0

FPDFDest_GetView returns the view (fit type) for a given dest. Experimental API.

func (*PdfiumImplementation) FPDFDoc_AddAttachment added in v0.5.0

FPDFDoc_AddAttachment adds an embedded file with the given name in the given document. If the name is empty, or if the name is the name of an existing embedded file in the document, or if the document's embedded file name tree is too deep (i.e. the document has too many embedded files already), then a new attachment will not be added. Experimental API.

func (*PdfiumImplementation) FPDFDoc_CloseJavaScriptAction added in v0.5.0

FPDFDoc_CloseJavaScriptAction closes a loaded FPDF_JAVASCRIPT_ACTION object. Experimental API.

func (*PdfiumImplementation) FPDFDoc_DeleteAttachment added in v0.5.0

FPDFDoc_DeleteAttachment deletes the embedded attachment at the given index in the given document. Note that this does not remove the attachment data from the PDF file; it simply removes the file's entry in the embedded files name tree so that it does not appear in the attachment list. This behavior may change in the future. Experimental API.

func (*PdfiumImplementation) FPDFDoc_GetAttachment added in v0.5.0

FPDFDoc_GetAttachment returns the embedded attachment at the given index in the given document. Note that the returned attachment handle is only valid while the document is open. Experimental API.

func (*PdfiumImplementation) FPDFDoc_GetAttachmentCount added in v0.5.0

FPDFDoc_GetAttachmentCount returns the number of embedded files in the given document. Experimental API.

func (*PdfiumImplementation) FPDFDoc_GetJavaScriptAction added in v0.5.0

FPDFDoc_GetJavaScriptAction returns the JavaScript action at the given index in the given document. Experimental API.

func (*PdfiumImplementation) FPDFDoc_GetJavaScriptActionCount added in v0.5.0

FPDFDoc_GetJavaScriptActionCount returns the number of JavaScript actions in the given document. Experimental API.

func (*PdfiumImplementation) FPDFDoc_GetPageMode added in v0.5.0

FPDFDoc_GetPageMode returns the document's page mode, which describes how the document should be displayed when opened.

func (*PdfiumImplementation) FPDFJavaScriptAction_GetName added in v0.5.0

FPDFJavaScriptAction_GetName returns the name from the javascript handle. Experimental API.

func (*PdfiumImplementation) FPDFJavaScriptAction_GetScript added in v0.5.0

FPDFJavaScriptAction_GetScript returns the script from the javascript handle Experimental API.

FPDFLink_CloseWebLinks releases resources used by weblink feature.

FPDFLink_CountQuadPoints returns the count of quadrilateral points to the link.

FPDFLink_CountRects returns the count of rectangular areas for the link.

FPDFLink_CountWebLinks returns the count of detected web links.

FPDFLink_Enumerate Enumerates all the link annotations in a page.

FPDFLink_GetAction returns the action info for a link

FPDFLink_GetAnnot returns a FPDF_ANNOTATION object for a link. Experimental API.

FPDFLink_GetAnnotRect returns the count of quadrilateral points to the link.

FPDFLink_GetDest returns the destination info for a link.

FPDFLink_GetLinkAtPoint finds a link at a point on a page. You can convert coordinates from screen coordinates to page coordinates using FPDF_DeviceToPage().

FPDFLink_GetLinkZOrderAtPoint finds the Z-order of link at a point on a page. You can convert coordinates from screen coordinates to page coordinates using FPDF_DeviceToPage().

FPDFLink_GetQuadPoints returns the quadrilateral points for the specified quad index in the link.

FPDFLink_GetRect returns the boundaries of a rectangle for a link.

FPDFLink_GetTextRange returns the start char index and char count for a link. Experimental API.

FPDFLink_GetURL returns the URL information for a detected web link.

FPDFLink_LoadWebLinks prepares information about weblinks in a page. Weblinks are those links implicitly embedded in PDF pages. PDF also has a type of annotation called "link" (FPDFTEXT doesn't deal with that kind of link). FPDFTEXT weblink feature is useful for automatically detecting links in the page contents. For example, things like "https://www.example.com" will be detected, so applications can allow user to click on those characters to activate the link, even the PDF doesn't come with link annotations.

FPDFLink_CloseWebLinks must be called to release resources.

func (*PdfiumImplementation) FPDFPage_Flatten added in v0.5.0

FPDFPage_Flatten makes annotations and form fields become part of the page contents itself.

func (*PdfiumImplementation) FPDFPage_GetDecodedThumbnailData added in v0.5.0

FPDFPage_GetDecodedThumbnailData returns the decoded data from the thumbnail of the given page if it exists. Experimental API.

func (*PdfiumImplementation) FPDFPage_GetRawThumbnailData added in v0.5.0

FPDFPage_GetRawThumbnailData returns the raw data from the thumbnail of the given page if it exists. Experimental API.

func (*PdfiumImplementation) FPDFPage_GetRotation added in v0.5.0

FPDFPage_GetRotation returns the page rotation.

func (*PdfiumImplementation) FPDFPage_GetThumbnailAsBitmap added in v0.5.0

FPDFPage_GetThumbnailAsBitmap returns the thumbnail of the given page as a FPDF_BITMAP. Experimental API.

func (*PdfiumImplementation) FPDFPage_HasTransparency added in v0.5.0

FPDFPage_HasTransparency returns whether the page has transparency.

func (*PdfiumImplementation) FPDFPage_SetRotation added in v0.5.0

FPDFPage_SetRotation sets the page rotation for a given page.

func (*PdfiumImplementation) FPDFSignatureObj_GetByteRange added in v0.5.0

FPDFSignatureObj_GetByteRange returns the byte range of a signature object. Experimental API.

func (*PdfiumImplementation) FPDFSignatureObj_GetContents added in v0.5.0

FPDFSignatureObj_GetContents returns the contents of a signature object. Experimental API.

func (*PdfiumImplementation) FPDFSignatureObj_GetDocMDPPermission added in v0.5.0

FPDFSignatureObj_GetDocMDPPermission returns the DocMDP permission of a signature object. Experimental API.

func (*PdfiumImplementation) FPDFSignatureObj_GetReason added in v0.5.0

FPDFSignatureObj_GetReason returns the reason (comment) of the signature object. Experimental API.

func (*PdfiumImplementation) FPDFSignatureObj_GetSubFilter added in v0.5.0

FPDFSignatureObj_GetSubFilter returns the encoding of the value of a signature object. Experimental API.

func (*PdfiumImplementation) FPDFSignatureObj_GetTime added in v0.5.0

FPDFSignatureObj_GetTime returns the time of signing of a signature object. Experimental API.

func (*PdfiumImplementation) FPDFText_ClosePage added in v0.5.0

FPDFText_ClosePage Release all resources allocated for a text page information structure.

func (*PdfiumImplementation) FPDFText_CountChars added in v0.5.0

FPDFText_CountChars returns the number of characters in a page. Characters in a page form a "stream", inside the stream, each character has an index. We will use the index parameters in many of FPDFTEXT functions. The first character in the page has an index value of zero.

func (*PdfiumImplementation) FPDFText_CountRects added in v0.5.0

FPDFText_CountRects returns the count of rectangular areas occupied by a segment of texts. This function, along with FPDFText_GetRect can be used by applications to detect the position on the page for a text segment, so proper areas can be highlighted. FPDFTEXT will automatically merge small character boxes into bigger one if those characters are on the same line and use same font settings.

func (*PdfiumImplementation) FPDFText_FindClose added in v0.5.0

FPDFText_FindClose releases a search context.

func (*PdfiumImplementation) FPDFText_FindNext added in v0.5.0

FPDFText_FindNext searches in the direction from page start to end.

func (*PdfiumImplementation) FPDFText_FindPrev added in v0.5.0

FPDFText_FindPrev searches in the direction from page end to start.

func (*PdfiumImplementation) FPDFText_FindStart added in v0.5.0

FPDFText_FindStart returns a handle to search a page.

func (*PdfiumImplementation) FPDFText_GetBoundedText added in v0.5.0

FPDFText_GetBoundedText extract unicode text within a rectangular boundary on the page.

func (*PdfiumImplementation) FPDFText_GetCharAngle added in v0.5.0

FPDFText_GetCharAngle returns the character rotation angle. Experimental API.

func (*PdfiumImplementation) FPDFText_GetCharBox added in v0.5.0

FPDFText_GetCharBox returns the bounding box of a particular character. All positions are measured in PDF "user space".

func (*PdfiumImplementation) FPDFText_GetCharIndexAtPos added in v0.5.0

FPDFText_GetCharIndexAtPos returns the index of a character at or nearby a certain position on the page.

func (*PdfiumImplementation) FPDFText_GetCharIndexFromTextIndex added in v0.6.0

FPDFText_GetCharIndexFromTextIndex returns the character index in the text page internal character list. Where the character index is an index of the text returned from FPDFText_GetText().

func (*PdfiumImplementation) FPDFText_GetCharOrigin added in v0.5.0

FPDFText_GetCharOrigin returns origin of a particular character. All positions are measured in PDF "user space".

func (*PdfiumImplementation) FPDFText_GetFillColor added in v0.5.0

FPDFText_GetFillColor returns the fill color of a particular character. Experimental API.

func (*PdfiumImplementation) FPDFText_GetFontInfo added in v0.5.0

FPDFText_GetFontInfo returns the font name and flags of a particular character. Experimental API.

func (*PdfiumImplementation) FPDFText_GetFontSize added in v0.5.0

FPDFText_GetFontSize returns the font size of a particular character.

func (*PdfiumImplementation) FPDFText_GetFontWeight added in v0.5.0

FPDFText_GetFontWeight returns the font weight of a particular character. Experimental API.

func (*PdfiumImplementation) FPDFText_GetLooseCharBox added in v0.5.0

FPDFText_GetLooseCharBox returns a "loose" bounding box of a particular character, i.e., covering the entire glyph bounds, without taking the actual glyph shape into account. All positions are measured in PDF "user space". Experimental API.

func (*PdfiumImplementation) FPDFText_GetMatrix added in v0.5.0

FPDFText_GetMatrix returns the effective transformation matrix for a particular character. All positions are measured in PDF "user space". Experimental API.

func (*PdfiumImplementation) FPDFText_GetRect added in v0.5.0

FPDFText_GetRect returns a rectangular area from the result generated by FPDFText_CountRects Note: this method only works if you called FPDFText_CountRects first.

func (*PdfiumImplementation) FPDFText_GetSchCount added in v0.5.0

FPDFText_GetSchCount returns the number of matched characters in the search result.

func (*PdfiumImplementation) FPDFText_GetSchResultIndex added in v0.5.0

FPDFText_GetSchResultIndex returns the starting character index of the search result.

func (*PdfiumImplementation) FPDFText_GetStrokeColor added in v0.5.0

FPDFText_GetStrokeColor returns the stroke color of a particular character. Experimental API.

func (*PdfiumImplementation) FPDFText_GetText added in v0.5.0

FPDFText_GetText extracts unicode text string from the page.

func (*PdfiumImplementation) FPDFText_GetTextIndexFromCharIndex added in v0.6.0

FPDFText_GetTextIndexFromCharIndex returns the text index in the text page internal character list. Where the text index is an index of the character in the internal character list.

func (*PdfiumImplementation) FPDFText_GetTextRenderMode added in v0.5.0

FPDFText_GetTextRenderMode returns the text rendering mode of character. Experimental API.

func (*PdfiumImplementation) FPDFText_GetUnicode added in v0.5.0

FPDFText_GetUnicode returns the unicode of a character in a page.

func (*PdfiumImplementation) FPDFText_LoadPage added in v0.5.0

FPDFText_LoadPage returns a handle to the text page information structure. Application must call FPDFText_ClosePage to release the text page

func (*PdfiumImplementation) FPDF_CloseDocument added in v0.5.0

FPDF_CloseDocument closes the references, releases the resources.

func (*PdfiumImplementation) FPDF_ClosePage added in v0.5.0

FPDF_ClosePage unloads a page by reference.

func (*PdfiumImplementation) FPDF_CloseXObject added in v0.5.0

FPDF_CloseXObject closes an FPDF_XOBJECT handle created by FPDF_NewXObjectFromPage().

func (*PdfiumImplementation) FPDF_CopyViewerPreferences added in v0.5.0

FPDF_CopyViewerPreferences copies the viewer preferences from one PDF document to another

func (*PdfiumImplementation) FPDF_CountNamedDests added in v0.7.0

FPDF_CountNamedDests returns the count of named destinations in the PDF document.

func (*PdfiumImplementation) FPDF_CreateNewDocument added in v0.5.0

FPDF_CreateNewDocument returns a new document.

func (*PdfiumImplementation) FPDF_DeviceToPage added in v0.7.0

FPDF_DeviceToPage converts the screen coordinates of a point to page coordinates. The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up.

NOTE: this coordinate system can be altered when you zoom, scroll, or rotate a page, however, a point on the page should always have the same coordinate values in the page coordinate system.

The device coordinate system is device dependent. For screen device, its origin is at the left-top corner of the window. However this origin can be altered by the Windows coordinate transformation utilities.

You must make sure the start_x, start_y, size_x, size_y and rotate parameters have exactly same values as you used in the FPDF_RenderPage() function call.

func (*PdfiumImplementation) FPDF_DocumentHasValidCrossReferenceTable added in v0.7.0

FPDF_DocumentHasValidCrossReferenceTable returns whether the document's cross reference table is valid or not.

func (*PdfiumImplementation) FPDF_GetDocPermissions added in v0.5.0

FPDF_GetDocPermissions returns the permissions of the PDF.

func (*PdfiumImplementation) FPDF_GetFileIdentifier added in v0.5.0

FPDF_GetFileIdentifier Get the file identifier defined in the trailer of a document. Experimental API.

func (*PdfiumImplementation) FPDF_GetFileVersion added in v0.5.0

FPDF_GetFileVersion returns the version of the PDF file.

func (*PdfiumImplementation) FPDF_GetLastError added in v0.5.0

FPDF_GetLastError returns the last error generated by PDFium.

func (*PdfiumImplementation) FPDF_GetMetaText added in v0.5.0

FPDF_GetMetaText returns the requested metadata.

func (*PdfiumImplementation) FPDF_GetNamedDest added in v0.7.0

FPDF_GetNamedDest returns the named destination by index.

func (*PdfiumImplementation) FPDF_GetNamedDestByName added in v0.7.0

FPDF_GetNamedDestByName returns the destination handle for the given name.

func (*PdfiumImplementation) FPDF_GetPageAAction added in v0.5.0

FPDF_GetPageAAction returns an additional-action from page. Experimental API

func (*PdfiumImplementation) FPDF_GetPageBoundingBox added in v0.7.0

FPDF_GetPageBoundingBox returns the bounding box of the page. This is the intersection between its media box and its crop box.

func (*PdfiumImplementation) FPDF_GetPageCount added in v0.5.0

FPDF_GetPageCount counts the amount of pages.

func (*PdfiumImplementation) FPDF_GetPageHeight added in v0.5.0

FPDF_GetPageHeight returns the height of a page.

func (*PdfiumImplementation) FPDF_GetPageHeightF added in v0.7.0

FPDF_GetPageHeightF returns the page height in float32.

func (*PdfiumImplementation) FPDF_GetPageLabel added in v0.5.0

FPDF_GetPageLabel returns the label for the given page.

func (*PdfiumImplementation) FPDF_GetPageSizeByIndex added in v0.5.0

FPDF_GetPageSizeByIndex returns the size of a page by the page index.

func (*PdfiumImplementation) FPDF_GetPageSizeByIndexF added in v0.7.0

FPDF_GetPageSizeByIndexF returns the size of the page at the given index. Prefer FPDF_GetPageSizeByIndexF(). This will be deprecated in the future.

func (*PdfiumImplementation) FPDF_GetPageWidth added in v0.5.0

FPDF_GetPageWidth returns the width of a page.

func (*PdfiumImplementation) FPDF_GetPageWidthF added in v0.7.0

FPDF_GetPageWidthF returns the page width in float32.

func (*PdfiumImplementation) FPDF_GetSecurityHandlerRevision added in v0.5.0

FPDF_GetSecurityHandlerRevision returns the revision number of security handlers of the file.

func (*PdfiumImplementation) FPDF_GetSignatureCount added in v0.5.0

FPDF_GetSignatureCount returns the total number of signatures in the document. Experimental API.

func (*PdfiumImplementation) FPDF_GetSignatureObject added in v0.5.0

FPDF_GetSignatureObject returns the Nth signature of the document. Experimental API.

func (*PdfiumImplementation) FPDF_GetTrailerEnds added in v0.7.0

FPDF_GetTrailerEnds returns the byte offsets of trailer ends. Experimental API.

func (*PdfiumImplementation) FPDF_GetXFAPacketContent added in v0.7.0

FPDF_GetXFAPacketContent returns the content of a packet in the XFA array.

func (*PdfiumImplementation) FPDF_GetXFAPacketCount added in v0.7.0

FPDF_GetXFAPacketCount returns the number of valid packets in the XFA entry. Experimental API.

func (*PdfiumImplementation) FPDF_GetXFAPacketName added in v0.7.0

FPDF_GetXFAPacketName returns the name of a packet in the XFA array. Experimental API.

func (*PdfiumImplementation) FPDF_ImportNPagesToOne added in v0.5.0

FPDF_ImportNPagesToOne creates a new document from source document. The pages of source document will be combined to provide NumPagesOnXAxis x NumPagesOnYAxis pages per page of the output document. Experimental API.

func (*PdfiumImplementation) FPDF_ImportPages added in v0.5.0

FPDF_ImportPages imports some pages from one PDF document to another one.

func (*PdfiumImplementation) FPDF_ImportPagesByIndex added in v0.5.0

FPDF_ImportPagesByIndex imports pages to a FPDF_DOCUMENT. Experimental API.

func (*PdfiumImplementation) FPDF_LoadCustomDocument added in v0.6.0

FPDF_LoadCustomDocument loads a PDF document from a custom access descriptor. This is implemented as an io.ReadSeeker in go-pdfium. This is only really efficient for single threaded usage, the multi-threaded usage will just load the file in memory because it can't transfer readers over gRPC. The single-threaded usage will actually efficiently walk over the PDF as it's being used by PDFium. Loaded document can be closed by FPDF_CloseDocument(). If this function fails, you can use FPDF_GetLastError() to retrieve the reason why it failed.

func (*PdfiumImplementation) FPDF_LoadDocument added in v0.6.0

FPDF_LoadDocument opens and load a PDF document from a file path. Loaded document can be closed by FPDF_CloseDocument(). If this function fails, you can use FPDF_GetLastError() to retrieve the reason why it failed.

func (*PdfiumImplementation) FPDF_LoadMemDocument added in v0.6.0

FPDF_LoadMemDocument opens and load a PDF document from memory. Loaded document can be closed by FPDF_CloseDocument(). If this function fails, you can use FPDF_GetLastError() to retrieve the reason why it failed.

func (*PdfiumImplementation) FPDF_LoadMemDocument64 added in v0.6.0

FPDF_LoadMemDocument64 opens and load a PDF document from memory. Loaded document can be closed by FPDF_CloseDocument(). If this function fails, you can use FPDF_GetLastError() to retrieve the reason why it failed.

func (*PdfiumImplementation) FPDF_LoadPage added in v0.5.0

FPDF_LoadPage loads a page and returns a reference.

func (*PdfiumImplementation) FPDF_NewFormObjectFromXObject added in v0.5.0

FPDF_NewFormObjectFromXObject creates a new form object from an FPDF_XOBJECT object.

func (*PdfiumImplementation) FPDF_NewXObjectFromPage added in v0.5.0

FPDF_NewXObjectFromPage creates a template to generate form xobjects from the source document's page at the given index, for use in the destination document. Experimental API.

func (*PdfiumImplementation) FPDF_PageToDevice added in v0.7.0

FPDF_PageToDevice converts the page coordinates of a point to screen coordinates. See comments for FPDF_DeviceToPage().

func (*PdfiumImplementation) FPDF_RenderPageBitmap added in v0.7.0

FPDF_RenderPageBitmap renders contents of a page to a device independent bitmap.

func (*PdfiumImplementation) FPDF_RenderPageBitmapWithMatrix added in v0.7.0

FPDF_RenderPageBitmapWithMatrix renders contents of a page to a device independent bitmap.

func (*PdfiumImplementation) FPDF_SaveAsCopy added in v0.5.0

FPDF_SaveAsCopy saves the document to a copy.

func (*PdfiumImplementation) FPDF_SaveWithVersion added in v0.5.0

FPDF_SaveWithVersion save the document to a copy, with a specific file version.

func (*PdfiumImplementation) FPDF_SetSandBoxPolicy added in v0.5.0

FPDF_SetSandBoxPolicy set the policy for the sandbox environment.

func (*PdfiumImplementation) FPDF_VIEWERREF_GetDuplex added in v0.7.0

FPDF_VIEWERREF_GetDuplex returns the paper handling option to be used when printing from the print dialog.

func (*PdfiumImplementation) FPDF_VIEWERREF_GetName added in v0.7.0

FPDF_VIEWERREF_GetName returns the contents for a viewer ref, with a given key. The value must be of type "name".

func (*PdfiumImplementation) FPDF_VIEWERREF_GetNumCopies added in v0.7.0

FPDF_VIEWERREF_GetNumCopies returns the number of copies to be printed.

func (*PdfiumImplementation) FPDF_VIEWERREF_GetPrintPageRange added in v0.7.0

FPDF_VIEWERREF_GetPrintPageRange returns the page numbers to initialize print dialog box when file is printed.

func (*PdfiumImplementation) FPDF_VIEWERREF_GetPrintPageRangeCount added in v0.7.0

FPDF_VIEWERREF_GetPrintPageRangeCount returns the number of elements in a FPDF_PAGERANGE.

func (*PdfiumImplementation) FPDF_VIEWERREF_GetPrintPageRangeElement added in v0.7.0

FPDF_VIEWERREF_GetPrintPageRangeElement returns an element from a FPDF_PAGERANGE.

func (*PdfiumImplementation) FPDF_VIEWERREF_GetPrintScaling added in v0.7.0

FPDF_VIEWERREF_GetPrintScaling returns whether the PDF document prefers to be scaled or not.

func (*PdfiumImplementation) FSDK_SetLocaltimeFunction added in v0.5.0

FSDK_SetLocaltimeFunction sets a replacement function for calls to localtime(). This API is intended to be used only for testing, thus may cause PDFium to behave poorly in production environments. Since callbacks can't be transferred between processes in gRPC, you can only use this in single-threaded mode.

func (*PdfiumImplementation) FSDK_SetTimeFunction added in v0.5.0

FSDK_SetTimeFunction sets a replacement function for calls to time(). This API is intended to be used only for testing, thus may cause PDFium to behave poorly in production environments. Since callbacks can't be transferred between processes in gRPC, you can only use this in single-threaded mode.

func (*PdfiumImplementation) FSDK_SetUnSpObjProcessHandler added in v0.5.0

FSDK_SetUnSpObjProcessHandler set ups an unsupported object handler. Since callbacks can't be transferred between processes in gRPC, you can only use this in single-threaded mode.

func (*PdfiumImplementation) GetActionInfo added in v0.5.0

func (*PdfiumImplementation) GetAttachments added in v0.5.0

GetAttachments returns all the attachments of a document. Experimental API.

func (*PdfiumImplementation) GetBookmarks added in v0.5.0

func (p *PdfiumImplementation) GetBookmarks(request *requests.GetBookmarks) (*responses.GetBookmarks, error)

GetBookmarks returns all the bookmarks of a document.

func (*PdfiumImplementation) GetDestInfo added in v0.5.0

func (p *PdfiumImplementation) GetDestInfo(request *requests.GetDestInfo) (*responses.GetDestInfo, error)

func (*PdfiumImplementation) GetJavaScriptActions added in v0.5.0

GetJavaScriptActions returns all the JavaScript Actions of a document. Experimental API.

func (*PdfiumImplementation) GetMetaData added in v0.5.0

func (p *PdfiumImplementation) GetMetaData(request *requests.GetMetaData) (*responses.GetMetaData, error)

GetMetaData returns the metadata values of the document.

func (*PdfiumImplementation) GetPageSize added in v0.5.0

func (p *PdfiumImplementation) GetPageSize(request *requests.GetPageSize) (*responses.GetPageSize, error)

GetPageSize returns the page size in points One point is 1/72 inch (around 0.3528 mm)

func (*PdfiumImplementation) GetPageSizeInPixels added in v0.5.0

GetPageSizeInPixels returns the pixel size of a page given the page number and the DPI.

func (*PdfiumImplementation) GetPageText added in v0.5.0

func (p *PdfiumImplementation) GetPageText(request *requests.GetPageText) (*responses.GetPageText, error)

GetPageText returns the text of a page

func (*PdfiumImplementation) GetPageTextStructured added in v0.5.0

GetPageTextStructured returns the text of a page in a structured way

func (*PdfiumImplementation) Lock added in v0.5.0

func (p *PdfiumImplementation) Lock()

func (*PdfiumImplementation) OpenDocument added in v0.5.0

func (p *PdfiumImplementation) OpenDocument(request *requests.OpenDocument) (*responses.OpenDocument, error)

func (*PdfiumImplementation) Ping added in v0.5.0

func (p *PdfiumImplementation) Ping() (string, error)

func (*PdfiumImplementation) RenderPageInDPI added in v0.5.0

RenderPageInDPI renders a specific page in a specific dpi, the result is an image.

func (*PdfiumImplementation) RenderPageInPixels added in v0.5.0

RenderPageInPixels renders a specific page in a specific pixel size, the result is an image. The given resolution is a maximum, we automatically calculate either the width or the height to make sure it stays withing the maximum resolution.

func (*PdfiumImplementation) RenderPagesInDPI added in v0.5.0

RenderPagesInDPI renders a list of pages in a specific dpi, the result is an image.

func (*PdfiumImplementation) RenderPagesInPixels added in v0.5.0

RenderPagesInPixels renders a list of pages in a specific pixel size, the result is an image. The given resolution is a maximum, we automatically calculate either the width or the height to make sure it stays withing the maximum resolution.

func (*PdfiumImplementation) RenderToFile added in v0.5.0

func (p *PdfiumImplementation) RenderToFile(request *requests.RenderToFile) (*responses.RenderToFile, error)

func (*PdfiumImplementation) Unlock added in v0.5.0

func (p *PdfiumImplementation) Unlock()

type SchHandleHandle added in v0.5.0

type SchHandleHandle struct {
	// contains filtered or unexported fields
}

type SearchHandle added in v0.5.0

type SearchHandle struct {
	// contains filtered or unexported fields
}

type SignatureHandle added in v0.5.0

type SignatureHandle struct {
	// contains filtered or unexported fields
}

type TextPageHandle added in v0.5.0

type TextPageHandle struct {
	// contains filtered or unexported fields
}

type XObjectHandle added in v0.5.0

type XObjectHandle struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL