Documentation
¶
Index ¶
- type GetMetadata
- type GetPageCount
- type GetPageSize
- type GetPageSizeInPixels
- type GetPageText
- type GetPageTextStructured
- type GetPageTextStructuredMode
- type GetPageTextStructuredPixelPositions
- type OpenDocument
- type RenderPageInDPI
- type RenderPageInPixels
- type RenderPagesInDPI
- type RenderPagesInPixels
- type RenderToFile
- type RenderToFileOutputFormat
- type RenderToFileOutputTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetMetadata ¶ added in v0.4.0
type GetMetadata struct {
Tag string // A metadata tag. Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate. For detailed explanation of these tags and their respective values, please refer to section 10.2.1 "Document Information Dictionary" in PDF Reference 1.7.
}
type GetPageCount ¶
type GetPageCount struct{}
type GetPageSize ¶
type GetPageSize struct {
Page int // The page number (0-index based).
}
type GetPageSizeInPixels ¶
type GetPageText ¶
type GetPageText struct {
Page int // The page number (0-index based).
}
type GetPageTextStructured ¶
type GetPageTextStructured struct {
Page int // The page number (0-index based).
Mode GetPageTextStructuredMode // The mode to get structured text for.
CollectFontInformation bool // Whether to collect font information like name/size/weight.
PixelPositions GetPageTextStructuredPixelPositions // Pixel position calculation settings.
}
type GetPageTextStructuredMode ¶
type GetPageTextStructuredMode string
const ( GetPageTextStructuredModeChars GetPageTextStructuredMode = "char" // Only get every separate char GetPageTextStructuredModeRects GetPageTextStructuredMode = "rect" // Get char rects, strings on the same line with the same font settings. GetPageTextStructuredModeBoth GetPageTextStructuredMode = "both" // Get both rects and chars. )
type GetPageTextStructuredPixelPositions ¶
type GetPageTextStructuredPixelPositions struct {
Calculate bool // Whether to calculate from points to pixel. Useful if you used RenderPageInDPI or RenderPageInPixels.
DPI int // If rendered in a specific DPI, give the DPI. Useful if you used RenderPageInDPI.
Width int // If rendered with a specific resolution, give the width resolution. Useful if you used RenderPageInPixels.
Height int // If rendered with a specific resolution, give the height resolution. Useful if you used RenderPageInPixels.
}
type OpenDocument ¶
type RenderPageInDPI ¶
type RenderPageInPixels ¶
type RenderPagesInDPI ¶
type RenderPagesInDPI struct {
Pages []RenderPageInDPI // The pages
Padding int // The amount of padding (in pixels) between the images
}
type RenderPagesInPixels ¶
type RenderPagesInPixels struct {
Pages []RenderPageInPixels // The pages
Padding int // The amount of padding (in pixels) between the images
}
type RenderToFile ¶
type RenderToFile struct {
RenderPageInDPI *RenderPageInDPI // To execute the RenderPageInDPI request
RenderPagesInDPI *RenderPagesInDPI // To execute the RenderPagesInDPI request
RenderPageInPixels *RenderPageInPixels // To execute the RenderPageInPixels request
RenderPagesInPixels *RenderPagesInPixels // To execute the RenderPagesInPixels request
OutputFormat RenderToFileOutputFormat // The format to output the image as
OutputTarget RenderToFileOutputTarget // Where to output the image
MaxFileSize int64 // The maximum filesize, if jpg is chosen as output format, it will try to compress it until it fits
TargetFilePath string // When OutputTarget is file, the path to write it to, if not given, a temp file is created
}
type RenderToFileOutputFormat ¶
type RenderToFileOutputFormat string // The file format to render output as.
const ( RenderToFileOutputFormatJPG RenderToFileOutputFormat = "jpg" // Render the file as a JPEG file. RenderToFileOutputFormatPNG RenderToFileOutputFormat = "png" // Render the file as a PNG file. )
type RenderToFileOutputTarget ¶
type RenderToFileOutputTarget string // The file target output.
const ( RenderToFileOutputTargetBytes RenderToFileOutputTarget = "bytes" // Returns the file as a byte array in the response. RenderToFileOutputTargetFile RenderToFileOutputTarget = "file" // Writes away the file to a given path or a generated tmp file. )
Click to show internal directories.
Click to hide internal directories.