Documentation ¶
Index ¶
- func LookupConverter(name string) (string, string, error)
- type CookieSet
- type HeaderSet
- type ImageFlagSet
- func (ifs *ImageFlagSet) Flags() []string
- func (ifs *ImageFlagSet) Generate(inputURL string, outputFile string) ([]byte, error)
- func (ifs *ImageFlagSet) GetCacheDir() (string, bool)
- func (ifs *ImageFlagSet) GetCookie() ([]CookieSet, bool)
- func (ifs *ImageFlagSet) GetCropH() (int, bool)
- func (ifs *ImageFlagSet) GetCropW() (int, bool)
- func (ifs *ImageFlagSet) GetCropX() (int, bool)
- func (ifs *ImageFlagSet) GetCropY() (int, bool)
- func (ifs *ImageFlagSet) GetCustomHeader() ([]HeaderSet, bool)
- func (ifs *ImageFlagSet) GetCustomHeaderPropagation() (bool, bool)
- func (ifs *ImageFlagSet) GetDebugJavascript() (bool, bool)
- func (ifs *ImageFlagSet) GetEncoding() (string, bool)
- func (ifs *ImageFlagSet) GetFormat() (string, bool)
- func (ifs *ImageFlagSet) GetHeight() (int, bool)
- func (ifs *ImageFlagSet) GetImages() (bool, bool)
- func (ifs *ImageFlagSet) GetJavascript() (bool, bool)
- func (ifs *ImageFlagSet) GetJavascriptDelay() (int, bool)
- func (ifs *ImageFlagSet) GetLoadErrorHandling() (string, bool)
- func (ifs *ImageFlagSet) GetLoadMediaErrorHandling() (string, bool)
- func (ifs *ImageFlagSet) GetMinimumFontSize() (int, bool)
- func (ifs *ImageFlagSet) GetPassword() (string, bool)
- func (ifs *ImageFlagSet) GetQuality() (int, bool)
- func (ifs *ImageFlagSet) GetSmartWidth() (bool, bool)
- func (ifs *ImageFlagSet) GetStopSlowScripts() (bool, bool)
- func (ifs *ImageFlagSet) GetTransparent() (bool, bool)
- func (ifs *ImageFlagSet) GetUseXServer() (bool, bool)
- func (ifs *ImageFlagSet) GetUsername() (string, bool)
- func (ifs *ImageFlagSet) GetWidth() (int, bool)
- func (ifs *ImageFlagSet) GetZoom() (float64, bool)
- func (ifs *ImageFlagSet) SetCacheDir(dir string)
- func (ifs *ImageFlagSet) SetCookie(cookies []CookieSet)
- func (ifs *ImageFlagSet) SetCropH(height int)
- func (ifs *ImageFlagSet) SetCropW(width int)
- func (ifs *ImageFlagSet) SetCropX(xc int)
- func (ifs *ImageFlagSet) SetCropY(yc int)
- func (ifs *ImageFlagSet) SetCustomHeader(headers []HeaderSet)
- func (ifs *ImageFlagSet) SetCustomHeaderPropagation(value bool)
- func (ifs *ImageFlagSet) SetDebugJavascript(value bool)
- func (ifs *ImageFlagSet) SetEncoding(encoding string)
- func (ifs *ImageFlagSet) SetFormat(format string)
- func (ifs *ImageFlagSet) SetHeight(height int)
- func (ifs *ImageFlagSet) SetImages(value bool)
- func (ifs *ImageFlagSet) SetJavascript(value bool)
- func (ifs *ImageFlagSet) SetJavascriptDelay(milliseconds int)
- func (ifs *ImageFlagSet) SetLoadErrorHandling(handling string)
- func (ifs *ImageFlagSet) SetLoadMediaErrorHandling(handling string)
- func (ifs *ImageFlagSet) SetMinimumFontSize(size int)
- func (ifs *ImageFlagSet) SetPassword(password string)
- func (ifs *ImageFlagSet) SetQuality(quality int)
- func (ifs *ImageFlagSet) SetSmartWidth(value bool)
- func (ifs *ImageFlagSet) SetStopSlowScripts(value bool)
- func (ifs *ImageFlagSet) SetTransparent(value bool)
- func (ifs *ImageFlagSet) SetUseXServer(value bool)
- func (ifs *ImageFlagSet) SetUsername(username string)
- func (ifs *ImageFlagSet) SetWidth(width int)
- func (ifs *ImageFlagSet) SetZoom(zoom float64)
- type ImageOptions
- type PDFFlagSet
- func (pfs *PDFFlagSet) Flags() []string
- func (pfs *PDFFlagSet) Generate(inputURL string, outputFile string) ([]byte, error)
- func (pfs *PDFFlagSet) GetCacheDir() (string, bool)
- func (pfs *PDFFlagSet) GetCookie() ([]CookieSet, bool)
- func (pfs *PDFFlagSet) GetCustomHeader() ([]HeaderSet, bool)
- func (pfs *PDFFlagSet) GetCustomHeaderPropagation() (bool, bool)
- func (pfs *PDFFlagSet) GetDPI() (int, bool)
- func (pfs *PDFFlagSet) GetDebugJavascript() (bool, bool)
- func (pfs *PDFFlagSet) GetEncoding() (string, bool)
- func (pfs *PDFFlagSet) GetExternalLinks() (bool, bool)
- func (pfs *PDFFlagSet) GetForms() (bool, bool)
- func (pfs *PDFFlagSet) GetGrayscale() (bool, bool)
- func (pfs *PDFFlagSet) GetImageDPI() (int, bool)
- func (pfs *PDFFlagSet) GetImageQuality() (int, bool)
- func (pfs *PDFFlagSet) GetImages() (bool, bool)
- func (pfs *PDFFlagSet) GetInternalLinks() (bool, bool)
- func (pfs *PDFFlagSet) GetJavascript() (bool, bool)
- func (pfs *PDFFlagSet) GetJavascriptDelay() (int, bool)
- func (pfs *PDFFlagSet) GetLoadErrorHandling() (string, bool)
- func (pfs *PDFFlagSet) GetLoadMediaErrorHandling() (string, bool)
- func (pfs *PDFFlagSet) GetLowQuality() (bool, bool)
- func (pfs *PDFFlagSet) GetMarginBottom() (int, bool)
- func (pfs *PDFFlagSet) GetMarginLeft() (int, bool)
- func (pfs *PDFFlagSet) GetMarginRight() (int, bool)
- func (pfs *PDFFlagSet) GetMarginTop() (int, bool)
- func (pfs *PDFFlagSet) GetMinimumFontSize() (int, bool)
- func (pfs *PDFFlagSet) GetNoPDFCompression() (bool, bool)
- func (pfs *PDFFlagSet) GetOrientation() (string, bool)
- func (pfs *PDFFlagSet) GetPageHeight() (int, bool)
- func (pfs *PDFFlagSet) GetPageSize() (string, bool)
- func (pfs *PDFFlagSet) GetPageWidth() (int, bool)
- func (pfs *PDFFlagSet) GetPassword() (string, bool)
- func (pfs *PDFFlagSet) GetSmartShrinking() (bool, bool)
- func (pfs *PDFFlagSet) GetStopSlowScripts() (bool, bool)
- func (pfs *PDFFlagSet) GetTitle() (string, bool)
- func (pfs *PDFFlagSet) GetUseXServer() (bool, bool)
- func (pfs *PDFFlagSet) GetUsername() (string, bool)
- func (pfs *PDFFlagSet) GetZoom() (float64, bool)
- func (pfs *PDFFlagSet) SetCacheDir(dir string)
- func (pfs *PDFFlagSet) SetCookie(cookies []CookieSet)
- func (pfs *PDFFlagSet) SetCustomHeader(headers []HeaderSet)
- func (pfs *PDFFlagSet) SetCustomHeaderPropagation(value bool)
- func (pfs *PDFFlagSet) SetDPI(dpi int)
- func (pfs *PDFFlagSet) SetDebugJavascript(value bool)
- func (pfs *PDFFlagSet) SetEncoding(encoding string)
- func (pfs *PDFFlagSet) SetExternalLinks(value bool)
- func (pfs *PDFFlagSet) SetForms(value bool)
- func (pfs *PDFFlagSet) SetGrayscale(value bool)
- func (pfs *PDFFlagSet) SetImageDPI(dpi int)
- func (pfs *PDFFlagSet) SetImageQuality(quality int)
- func (pfs *PDFFlagSet) SetImages(value bool)
- func (pfs *PDFFlagSet) SetInternalLinks(value bool)
- func (pfs *PDFFlagSet) SetJavascript(value bool)
- func (pfs *PDFFlagSet) SetJavascriptDelay(milliseconds int)
- func (pfs *PDFFlagSet) SetLoadErrorHandling(handling string)
- func (pfs *PDFFlagSet) SetLoadMediaErrorHandling(handling string)
- func (pfs *PDFFlagSet) SetLowQuality(value bool)
- func (pfs *PDFFlagSet) SetMarginBottom(millimetres int)
- func (pfs *PDFFlagSet) SetMarginLeft(millimetres int)
- func (pfs *PDFFlagSet) SetMarginRight(millimetres int)
- func (pfs *PDFFlagSet) SetMarginTop(millimetres int)
- func (pfs *PDFFlagSet) SetMinimumFontSize(size int)
- func (pfs *PDFFlagSet) SetNoPDFCompression(value bool)
- func (pfs *PDFFlagSet) SetOrientation(orientation string)
- func (pfs *PDFFlagSet) SetPageHeight(height int)
- func (pfs *PDFFlagSet) SetPageSize(size string)
- func (pfs *PDFFlagSet) SetPageWidth(width int)
- func (pfs *PDFFlagSet) SetPassword(password string)
- func (pfs *PDFFlagSet) SetSmartShrinking(value bool)
- func (pfs *PDFFlagSet) SetStopSlowScripts(value bool)
- func (pfs *PDFFlagSet) SetTitle(title string)
- func (pfs *PDFFlagSet) SetUseXServer(value bool)
- func (pfs *PDFFlagSet) SetUsername(username string)
- func (pfs *PDFFlagSet) SetZoom(zoom float64)
- type PDFOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImageFlagSet ¶
type ImageFlagSet flagSet
ImageFlagSet represents key-value pairs of image converter flags
func NewImageFlagSetFromOptions ¶
func NewImageFlagSetFromOptions(opts *ImageOptions) ImageFlagSet
NewImageFlagSetFromOptions generates a FlagSet from ImageOptions
func (*ImageFlagSet) Flags ¶
func (ifs *ImageFlagSet) Flags() []string
Flags generates a String slice from an ImageFlagSet
func (*ImageFlagSet) Generate ¶
func (ifs *ImageFlagSet) Generate(inputURL string, outputFile string) ([]byte, error)
Generate performs the image conversion and saves the file to disk
func (*ImageFlagSet) GetCacheDir ¶
func (ifs *ImageFlagSet) GetCacheDir() (string, bool)
GetCacheDir retrieves the CacheDir from an ImageFlagSet
func (*ImageFlagSet) GetCookie ¶
func (ifs *ImageFlagSet) GetCookie() ([]CookieSet, bool)
GetCookie retrieves the Cookie from an ImageFlagSet
func (*ImageFlagSet) GetCropH ¶
func (ifs *ImageFlagSet) GetCropH() (int, bool)
GetCropH retrieves the CropH from an ImageFlagSet
func (*ImageFlagSet) GetCropW ¶
func (ifs *ImageFlagSet) GetCropW() (int, bool)
GetCropW retrieves the CropW from an ImageFlagSet
func (*ImageFlagSet) GetCropX ¶
func (ifs *ImageFlagSet) GetCropX() (int, bool)
GetCropX retrieves the CropX from an ImageFlagSet
func (*ImageFlagSet) GetCropY ¶
func (ifs *ImageFlagSet) GetCropY() (int, bool)
GetCropY retrieves the CropY from an ImageFlagSet
func (*ImageFlagSet) GetCustomHeader ¶
func (ifs *ImageFlagSet) GetCustomHeader() ([]HeaderSet, bool)
GetCustomHeader retrieves the CustomHeader from an ImageFlagSet
func (*ImageFlagSet) GetCustomHeaderPropagation ¶
func (ifs *ImageFlagSet) GetCustomHeaderPropagation() (bool, bool)
GetCustomHeaderPropagation retrieves the CustomHeaderPropagation from an ImageFlagSet
func (*ImageFlagSet) GetDebugJavascript ¶
func (ifs *ImageFlagSet) GetDebugJavascript() (bool, bool)
GetDebugJavascript retrieves the DebugJavascript from an ImageFlagSet
func (*ImageFlagSet) GetEncoding ¶
func (ifs *ImageFlagSet) GetEncoding() (string, bool)
GetEncoding retrieves the Encoding from an ImageFlagSet
func (*ImageFlagSet) GetFormat ¶
func (ifs *ImageFlagSet) GetFormat() (string, bool)
GetFormat retrieves the Format from an ImageFlagSet
func (*ImageFlagSet) GetHeight ¶
func (ifs *ImageFlagSet) GetHeight() (int, bool)
GetHeight retrieves the Height from an ImageFlagSet
func (*ImageFlagSet) GetImages ¶
func (ifs *ImageFlagSet) GetImages() (bool, bool)
GetImages retrieves the Images from an ImageFlagSet
func (*ImageFlagSet) GetJavascript ¶
func (ifs *ImageFlagSet) GetJavascript() (bool, bool)
GetJavascript retrieves the Javascript from an ImageFlagSet
func (*ImageFlagSet) GetJavascriptDelay ¶
func (ifs *ImageFlagSet) GetJavascriptDelay() (int, bool)
GetJavascriptDelay retrieves the JavascriptDelay from an ImageFlagSet
func (*ImageFlagSet) GetLoadErrorHandling ¶
func (ifs *ImageFlagSet) GetLoadErrorHandling() (string, bool)
GetLoadErrorHandling retrieves the LoadErrorHandling from an ImageFlagSet
func (*ImageFlagSet) GetLoadMediaErrorHandling ¶
func (ifs *ImageFlagSet) GetLoadMediaErrorHandling() (string, bool)
GetLoadMediaErrorHandling retrieves the LoadMediaErrorHandling from an ImageFlagSet
func (*ImageFlagSet) GetMinimumFontSize ¶
func (ifs *ImageFlagSet) GetMinimumFontSize() (int, bool)
GetMinimumFontSize retrieves the MinimumFontSize from an ImageFlagSet
func (*ImageFlagSet) GetPassword ¶
func (ifs *ImageFlagSet) GetPassword() (string, bool)
GetPassword retrieves the Password from an ImageFlagSet
func (*ImageFlagSet) GetQuality ¶
func (ifs *ImageFlagSet) GetQuality() (int, bool)
GetQuality retrieves the Quality from an ImageFlagSet
func (*ImageFlagSet) GetSmartWidth ¶
func (ifs *ImageFlagSet) GetSmartWidth() (bool, bool)
GetSmartWidth retrieves the SmartWidth from an ImageFlagSet
func (*ImageFlagSet) GetStopSlowScripts ¶
func (ifs *ImageFlagSet) GetStopSlowScripts() (bool, bool)
GetStopSlowScripts retrieves the StopSlowScripts from an ImageFlagSet
func (*ImageFlagSet) GetTransparent ¶
func (ifs *ImageFlagSet) GetTransparent() (bool, bool)
GetTransparent retrieves the Transparent from an ImageFlagSet
func (*ImageFlagSet) GetUseXServer ¶
func (ifs *ImageFlagSet) GetUseXServer() (bool, bool)
GetUseXServer retrieves the UseXServer from an ImageFlagSet
func (*ImageFlagSet) GetUsername ¶
func (ifs *ImageFlagSet) GetUsername() (string, bool)
GetUsername retrieves the Username from an ImageFlagSet
func (*ImageFlagSet) GetWidth ¶
func (ifs *ImageFlagSet) GetWidth() (int, bool)
GetWidth retrieves the Width from an ImageFlagSet
func (*ImageFlagSet) GetZoom ¶
func (ifs *ImageFlagSet) GetZoom() (float64, bool)
GetZoom retrieves the Zoom from an ImageFlagSet
func (*ImageFlagSet) SetCacheDir ¶
func (ifs *ImageFlagSet) SetCacheDir(dir string)
SetCacheDir sets the CacheDir of an ImageFlagSet
func (*ImageFlagSet) SetCookie ¶
func (ifs *ImageFlagSet) SetCookie(cookies []CookieSet)
SetCookie sets the Cookie of an ImageFlagSet
func (*ImageFlagSet) SetCropH ¶
func (ifs *ImageFlagSet) SetCropH(height int)
SetCropH sets the CropH of an ImageFlagSet
func (*ImageFlagSet) SetCropW ¶
func (ifs *ImageFlagSet) SetCropW(width int)
SetCropW sets the CropW of an ImageFlagSet
func (*ImageFlagSet) SetCropX ¶
func (ifs *ImageFlagSet) SetCropX(xc int)
SetCropX sets the CropX of an ImageFlagSet
func (*ImageFlagSet) SetCropY ¶
func (ifs *ImageFlagSet) SetCropY(yc int)
SetCropY sets the CropY of an ImageFlagSet
func (*ImageFlagSet) SetCustomHeader ¶
func (ifs *ImageFlagSet) SetCustomHeader(headers []HeaderSet)
SetCustomHeader sets the CustomHeader of an ImageFlagSet
func (*ImageFlagSet) SetCustomHeaderPropagation ¶
func (ifs *ImageFlagSet) SetCustomHeaderPropagation(value bool)
SetCustomHeaderPropagation sets the CustomHeaderPropagation of an ImageFlagSet
func (*ImageFlagSet) SetDebugJavascript ¶
func (ifs *ImageFlagSet) SetDebugJavascript(value bool)
SetDebugJavascript sets the DebugJavascript of an ImageFlagSet
func (*ImageFlagSet) SetEncoding ¶
func (ifs *ImageFlagSet) SetEncoding(encoding string)
SetEncoding sets the Encoding of an ImageFlagSet
func (*ImageFlagSet) SetFormat ¶
func (ifs *ImageFlagSet) SetFormat(format string)
SetFormat sets the Format of an ImageFlagSet
func (*ImageFlagSet) SetHeight ¶
func (ifs *ImageFlagSet) SetHeight(height int)
SetHeight sets the Height of an ImageFlagSet
func (*ImageFlagSet) SetImages ¶
func (ifs *ImageFlagSet) SetImages(value bool)
SetImages sets the Images of an ImageFlagSet
func (*ImageFlagSet) SetJavascript ¶
func (ifs *ImageFlagSet) SetJavascript(value bool)
SetJavascript sets the Javascript of an ImageFlagSet
func (*ImageFlagSet) SetJavascriptDelay ¶
func (ifs *ImageFlagSet) SetJavascriptDelay(milliseconds int)
SetJavascriptDelay sets the JavascriptDelay of an ImageFlagSet
func (*ImageFlagSet) SetLoadErrorHandling ¶
func (ifs *ImageFlagSet) SetLoadErrorHandling(handling string)
SetLoadErrorHandling sets the LoadErrorHandling of an ImageFlagSet
func (*ImageFlagSet) SetLoadMediaErrorHandling ¶
func (ifs *ImageFlagSet) SetLoadMediaErrorHandling(handling string)
SetLoadMediaErrorHandling sets the LoadMediaErrorHandling of an ImageFlagSet
func (*ImageFlagSet) SetMinimumFontSize ¶
func (ifs *ImageFlagSet) SetMinimumFontSize(size int)
SetMinimumFontSize sets the MinimumFontSize of an ImageFlagSet
func (*ImageFlagSet) SetPassword ¶
func (ifs *ImageFlagSet) SetPassword(password string)
SetPassword sets the Password of an ImageFlagSet
func (*ImageFlagSet) SetQuality ¶
func (ifs *ImageFlagSet) SetQuality(quality int)
SetQuality sets the Quality of an ImageFlagSet
func (*ImageFlagSet) SetSmartWidth ¶
func (ifs *ImageFlagSet) SetSmartWidth(value bool)
SetSmartWidth sets the SmartWidth of an ImageFlagSet
func (*ImageFlagSet) SetStopSlowScripts ¶
func (ifs *ImageFlagSet) SetStopSlowScripts(value bool)
SetStopSlowScripts sets the StopSlowScripts of an ImageFlagSet
func (*ImageFlagSet) SetTransparent ¶
func (ifs *ImageFlagSet) SetTransparent(value bool)
SetTransparent sets the Transparent of an ImageFlagSet
func (*ImageFlagSet) SetUseXServer ¶
func (ifs *ImageFlagSet) SetUseXServer(value bool)
SetUseXServer sets the UseXServer of an ImageFlagSet
func (*ImageFlagSet) SetUsername ¶
func (ifs *ImageFlagSet) SetUsername(username string)
SetUsername sets the Username of an ImageFlagSet
func (*ImageFlagSet) SetWidth ¶
func (ifs *ImageFlagSet) SetWidth(width int)
SetWidth sets the Width of an ImageFlagSet
func (*ImageFlagSet) SetZoom ¶
func (ifs *ImageFlagSet) SetZoom(zoom float64)
SetZoom sets the Zoom of an ImageFlagSet
type ImageOptions ¶
type ImageOptions struct { CacheDir *string `json:"cache_dir,omitempty"` // Web cache directory Cookie *[]CookieSet `json:"cookie,omitempty"` // Set an additional cookie with URL encoded values CropH *int `json:"crop_h,omitempty"` // Set height for cropping CropW *int `json:"crop_w,omitempty"` // Set width for cropping CropX *int `json:"crop_x,omitempty"` // Set x coordinate for cropping CropY *int `json:"crop_y,omitempty"` // Set y coordinate for cropping CustomHeader *[]HeaderSet `json:"custom_header,omitempty"` // Set an additional HTTP header CustomHeaderPropagation *bool `json:"custom_header_propagation,omitempty"` // Add HTTP headers specified by CustomHeader for each resource request DebugJavascript *bool `json:"debug_javascript,omitempty"` // Show javascript debugging output Encoding *string `json:"encoding,omitempty"` // Set the default text encoding, for input Format *string `json:"format,omitempty"` // Output file format Height *int `json:"height,omitempty"` // Set screen height Images *bool `json:"images,omitempty"` // Load or print images Javascript *bool `json:"javascript,omitempty"` // Allow web pages to run javascript JavascriptDelay *int `json:"javascript_delay,omitempty"` // Milliseconds to wait for javascript to finish LoadErrorHandling *string `json:"load_error_handling,omitempty"` // Specify how to handle pages that fail to load LoadMediaErrorHandling *string `json:"load_media_error_handling,omitempty"` // Specify how to handle media files that fail to load MinimumFontSize *int `json:"minimum_font_size,omitempty"` // Minimum font size Password *string `json:"password,omitempty"` // HTTP Authentication password Quality *int `json:"quality,omitempty"` // Output image quality SmartWidth *bool `json:"smart_width,omitempty"` // Extend width to fit unbreakable content or use the specified width (even if it is not large enough for the content) StopSlowScripts *bool `json:"stop_slow_scripts,omitempty"` // Stop slow running javascripts Transparent *bool `json:"transparent,omitempty"` // Make the background transparent in PNGs UseXServer *bool `json:"use_xserver,omitempty"` // Use the X server Username *string `json:"username,omitempty"` // HTTP Authentication username Width *int `json:"width,omitempty"` // Set screen width, as a guide (needs SmartWidth disabled to enforce) Zoom *float64 `json:"zoom,omitempty"` // Use this zoom factor }
ImageOptions represents wkhtmlimage attributes
type PDFFlagSet ¶
type PDFFlagSet flagSet
PDFFlagSet represents key-value pairs of PDF converter flags
func NewPDFFlagSetFromOptions ¶
func NewPDFFlagSetFromOptions(opts *PDFOptions) PDFFlagSet
NewPDFFlagSetFromOptions generates a FlagSet from PDFOptions
func (*PDFFlagSet) Flags ¶
func (pfs *PDFFlagSet) Flags() []string
Flags generates a String slice from a PDFFlagSet
func (*PDFFlagSet) Generate ¶
func (pfs *PDFFlagSet) Generate(inputURL string, outputFile string) ([]byte, error)
Generate performs the PDF conversion and saves the file to disk
func (*PDFFlagSet) GetCacheDir ¶
func (pfs *PDFFlagSet) GetCacheDir() (string, bool)
GetCacheDir retrieves the CacheDir from a PDFFlagSet
func (*PDFFlagSet) GetCookie ¶
func (pfs *PDFFlagSet) GetCookie() ([]CookieSet, bool)
GetCookie retrieves the Cookie from a PDFFlagSet
func (*PDFFlagSet) GetCustomHeader ¶
func (pfs *PDFFlagSet) GetCustomHeader() ([]HeaderSet, bool)
GetCustomHeader retrieves the CustomHeader from a PDFFlagSet
func (*PDFFlagSet) GetCustomHeaderPropagation ¶
func (pfs *PDFFlagSet) GetCustomHeaderPropagation() (bool, bool)
GetCustomHeaderPropagation retrieves the CustomHeaderPropagation from a PDFFlagSet
func (*PDFFlagSet) GetDPI ¶
func (pfs *PDFFlagSet) GetDPI() (int, bool)
GetDPI retrieves the DPI from a PDFFlagSet
func (*PDFFlagSet) GetDebugJavascript ¶
func (pfs *PDFFlagSet) GetDebugJavascript() (bool, bool)
GetDebugJavascript retrieves the DebugJavascript from a PDFFlagSet
func (*PDFFlagSet) GetEncoding ¶
func (pfs *PDFFlagSet) GetEncoding() (string, bool)
GetEncoding retrieves the Encoding from a PDFFlagSet
func (*PDFFlagSet) GetExternalLinks ¶
func (pfs *PDFFlagSet) GetExternalLinks() (bool, bool)
GetExternalLinks retrieves the ExternalLinks from a PDFFlagSet
func (*PDFFlagSet) GetForms ¶
func (pfs *PDFFlagSet) GetForms() (bool, bool)
GetForms retrieves the Forms from a PDFFlagSet
func (*PDFFlagSet) GetGrayscale ¶
func (pfs *PDFFlagSet) GetGrayscale() (bool, bool)
GetGrayscale retrieves the Grayscale from a PDFFlagSet
func (*PDFFlagSet) GetImageDPI ¶
func (pfs *PDFFlagSet) GetImageDPI() (int, bool)
GetImageDPI retrieves the ImageDPI from a PDFFlagSet
func (*PDFFlagSet) GetImageQuality ¶
func (pfs *PDFFlagSet) GetImageQuality() (int, bool)
GetImageQuality retrieves the ImageQuality from a PDFFlagSet
func (*PDFFlagSet) GetImages ¶
func (pfs *PDFFlagSet) GetImages() (bool, bool)
GetImages retrieves the Images from a PDFFlagSet
func (*PDFFlagSet) GetInternalLinks ¶
func (pfs *PDFFlagSet) GetInternalLinks() (bool, bool)
GetInternalLinks retrieves the InternalLinks from a PDFFlagSet
func (*PDFFlagSet) GetJavascript ¶
func (pfs *PDFFlagSet) GetJavascript() (bool, bool)
GetJavascript retrieves the Javascript from a PDFFlagSet
func (*PDFFlagSet) GetJavascriptDelay ¶
func (pfs *PDFFlagSet) GetJavascriptDelay() (int, bool)
GetJavascriptDelay retrieves the JavascriptDelay from a PDFFlagSet
func (*PDFFlagSet) GetLoadErrorHandling ¶
func (pfs *PDFFlagSet) GetLoadErrorHandling() (string, bool)
GetLoadErrorHandling retrieves the LoadErrorHandling from a PDFFlagSet
func (*PDFFlagSet) GetLoadMediaErrorHandling ¶
func (pfs *PDFFlagSet) GetLoadMediaErrorHandling() (string, bool)
GetLoadMediaErrorHandling retrieves the LoadMediaErrorHandling from a PDFFlagSet
func (*PDFFlagSet) GetLowQuality ¶
func (pfs *PDFFlagSet) GetLowQuality() (bool, bool)
GetLowQuality retrieves the LowQuality from a PDFFlagSet
func (*PDFFlagSet) GetMarginBottom ¶
func (pfs *PDFFlagSet) GetMarginBottom() (int, bool)
GetMarginBottom retrieves the MarginBottom from a PDFFlagSet
func (*PDFFlagSet) GetMarginLeft ¶
func (pfs *PDFFlagSet) GetMarginLeft() (int, bool)
GetMarginLeft retrieves the MarginLeft from a PDFFlagSet
func (*PDFFlagSet) GetMarginRight ¶
func (pfs *PDFFlagSet) GetMarginRight() (int, bool)
GetMarginRight retrieves the MarginRight from a PDFFlagSet
func (*PDFFlagSet) GetMarginTop ¶
func (pfs *PDFFlagSet) GetMarginTop() (int, bool)
GetMarginTop retrieves the MarginTop from a PDFFlagSet
func (*PDFFlagSet) GetMinimumFontSize ¶
func (pfs *PDFFlagSet) GetMinimumFontSize() (int, bool)
GetMinimumFontSize retrieves the MinimumFontSize from a PDFFlagSet
func (*PDFFlagSet) GetNoPDFCompression ¶
func (pfs *PDFFlagSet) GetNoPDFCompression() (bool, bool)
GetNoPDFCompression retrieves the NoPDFCompression from a PDFFlagSet
func (*PDFFlagSet) GetOrientation ¶
func (pfs *PDFFlagSet) GetOrientation() (string, bool)
GetOrientation retrieves the Orientation from a PDFFlagSet
func (*PDFFlagSet) GetPageHeight ¶
func (pfs *PDFFlagSet) GetPageHeight() (int, bool)
GetPageHeight retrieves the PageHeight from a PDFFlagSet
func (*PDFFlagSet) GetPageSize ¶
func (pfs *PDFFlagSet) GetPageSize() (string, bool)
GetPageSize retrieves the PageSize from a PDFFlagSet
func (*PDFFlagSet) GetPageWidth ¶
func (pfs *PDFFlagSet) GetPageWidth() (int, bool)
GetPageWidth retrieves the PageWidth from a PDFFlagSet
func (*PDFFlagSet) GetPassword ¶
func (pfs *PDFFlagSet) GetPassword() (string, bool)
GetPassword retrieves the Password from a PDFFlagSet
func (*PDFFlagSet) GetSmartShrinking ¶
func (pfs *PDFFlagSet) GetSmartShrinking() (bool, bool)
GetSmartShrinking retrieves the SmartShrinking from a PDFFlagSet
func (*PDFFlagSet) GetStopSlowScripts ¶
func (pfs *PDFFlagSet) GetStopSlowScripts() (bool, bool)
GetStopSlowScripts retrieves the StopSlowScripts from a PDFFlagSet
func (*PDFFlagSet) GetTitle ¶
func (pfs *PDFFlagSet) GetTitle() (string, bool)
GetTitle retrieves the Title from a PDFFlagSet
func (*PDFFlagSet) GetUseXServer ¶
func (pfs *PDFFlagSet) GetUseXServer() (bool, bool)
GetUseXServer retrieves the UseXServer from a PDFFlagSet
func (*PDFFlagSet) GetUsername ¶
func (pfs *PDFFlagSet) GetUsername() (string, bool)
GetUsername retrieves the Username from a PDFFlagSet
func (*PDFFlagSet) GetZoom ¶
func (pfs *PDFFlagSet) GetZoom() (float64, bool)
GetZoom retrieves the Zoom from a PDFFlagSet
func (*PDFFlagSet) SetCacheDir ¶
func (pfs *PDFFlagSet) SetCacheDir(dir string)
SetCacheDir sets the CacheDir of a PDFFlagSet
func (*PDFFlagSet) SetCookie ¶
func (pfs *PDFFlagSet) SetCookie(cookies []CookieSet)
SetCookie sets the Cookie of a PDFFlagSet
func (*PDFFlagSet) SetCustomHeader ¶
func (pfs *PDFFlagSet) SetCustomHeader(headers []HeaderSet)
SetCustomHeader sets the CustomHeader of a PDFFlagSet
func (*PDFFlagSet) SetCustomHeaderPropagation ¶
func (pfs *PDFFlagSet) SetCustomHeaderPropagation(value bool)
SetCustomHeaderPropagation sets the CustomHeaderPropagation of a PDFFlagSet
func (*PDFFlagSet) SetDPI ¶
func (pfs *PDFFlagSet) SetDPI(dpi int)
SetDPI sets the DPI of a PDFFlagSet
func (*PDFFlagSet) SetDebugJavascript ¶
func (pfs *PDFFlagSet) SetDebugJavascript(value bool)
SetDebugJavascript sets the DebugJavascript of a PDFFlagSet
func (*PDFFlagSet) SetEncoding ¶
func (pfs *PDFFlagSet) SetEncoding(encoding string)
SetEncoding sets the Encoding of a PDFFlagSet
func (*PDFFlagSet) SetExternalLinks ¶
func (pfs *PDFFlagSet) SetExternalLinks(value bool)
SetExternalLinks sets the ExternalLinks of a PDFFlagSet
func (*PDFFlagSet) SetForms ¶
func (pfs *PDFFlagSet) SetForms(value bool)
SetForms sets the Forms of a PDFFlagSet
func (*PDFFlagSet) SetGrayscale ¶
func (pfs *PDFFlagSet) SetGrayscale(value bool)
SetGrayscale sets the Grayscale of a PDFFlagSet
func (*PDFFlagSet) SetImageDPI ¶
func (pfs *PDFFlagSet) SetImageDPI(dpi int)
SetImageDPI sets the ImageDPI of a PDFFlagSet
func (*PDFFlagSet) SetImageQuality ¶
func (pfs *PDFFlagSet) SetImageQuality(quality int)
SetImageQuality sets the ImageQuality of a PDFFlagSet
func (*PDFFlagSet) SetImages ¶
func (pfs *PDFFlagSet) SetImages(value bool)
SetImages sets the Images of a PDFFlagSet
func (*PDFFlagSet) SetInternalLinks ¶
func (pfs *PDFFlagSet) SetInternalLinks(value bool)
SetInternalLinks sets the InternalLinks of a PDFFlagSet
func (*PDFFlagSet) SetJavascript ¶
func (pfs *PDFFlagSet) SetJavascript(value bool)
SetJavascript sets the Javascript of a PDFFlagSet
func (*PDFFlagSet) SetJavascriptDelay ¶
func (pfs *PDFFlagSet) SetJavascriptDelay(milliseconds int)
SetJavascriptDelay sets the JavascriptDelay of a PDFFlagSet
func (*PDFFlagSet) SetLoadErrorHandling ¶
func (pfs *PDFFlagSet) SetLoadErrorHandling(handling string)
SetLoadErrorHandling sets the LoadErrorHandling of a PDFFlagSet
func (*PDFFlagSet) SetLoadMediaErrorHandling ¶
func (pfs *PDFFlagSet) SetLoadMediaErrorHandling(handling string)
SetLoadMediaErrorHandling sets the LoadMediaErrorHandling of a PDFFlagSet
func (*PDFFlagSet) SetLowQuality ¶
func (pfs *PDFFlagSet) SetLowQuality(value bool)
SetLowQuality sets the LowQuality of a PDFFlagSet
func (*PDFFlagSet) SetMarginBottom ¶
func (pfs *PDFFlagSet) SetMarginBottom(millimetres int)
SetMarginBottom sets the MarginBottom of a PDFFlagSet
func (*PDFFlagSet) SetMarginLeft ¶
func (pfs *PDFFlagSet) SetMarginLeft(millimetres int)
SetMarginLeft sets the MarginLeft of a PDFFlagSet
func (*PDFFlagSet) SetMarginRight ¶
func (pfs *PDFFlagSet) SetMarginRight(millimetres int)
SetMarginRight sets the MarginRight of a PDFFlagSet
func (*PDFFlagSet) SetMarginTop ¶
func (pfs *PDFFlagSet) SetMarginTop(millimetres int)
SetMarginTop sets the MarginTop of a PDFFlagSet
func (*PDFFlagSet) SetMinimumFontSize ¶
func (pfs *PDFFlagSet) SetMinimumFontSize(size int)
SetMinimumFontSize sets the MinimumFontSize of a PDFFlagSet
func (*PDFFlagSet) SetNoPDFCompression ¶
func (pfs *PDFFlagSet) SetNoPDFCompression(value bool)
SetNoPDFCompression sets the NoPDFCompression of a PDFFlagSet
func (*PDFFlagSet) SetOrientation ¶
func (pfs *PDFFlagSet) SetOrientation(orientation string)
SetOrientation sets the Orientation of a PDFFlagSet
func (*PDFFlagSet) SetPageHeight ¶
func (pfs *PDFFlagSet) SetPageHeight(height int)
SetPageHeight sets the PageHeight of a PDFFlagSet
func (*PDFFlagSet) SetPageSize ¶
func (pfs *PDFFlagSet) SetPageSize(size string)
SetPageSize sets the PageSize of a PDFFlagSet
func (*PDFFlagSet) SetPageWidth ¶
func (pfs *PDFFlagSet) SetPageWidth(width int)
SetPageWidth sets the PageWidth of a PDFFlagSet
func (*PDFFlagSet) SetPassword ¶
func (pfs *PDFFlagSet) SetPassword(password string)
SetPassword sets the Password of a PDFFlagSet
func (*PDFFlagSet) SetSmartShrinking ¶
func (pfs *PDFFlagSet) SetSmartShrinking(value bool)
SetSmartShrinking sets the SmartShrinking of a PDFFlagSet
func (*PDFFlagSet) SetStopSlowScripts ¶
func (pfs *PDFFlagSet) SetStopSlowScripts(value bool)
SetStopSlowScripts sets the StopSlowScripts of a PDFFlagSet
func (*PDFFlagSet) SetTitle ¶
func (pfs *PDFFlagSet) SetTitle(title string)
SetTitle sets the Title of a PDFFlagSet
func (*PDFFlagSet) SetUseXServer ¶
func (pfs *PDFFlagSet) SetUseXServer(value bool)
SetUseXServer sets the UseXServer of a PDFFlagSet
func (*PDFFlagSet) SetUsername ¶
func (pfs *PDFFlagSet) SetUsername(username string)
SetUsername sets the Username of a PDFFlagSet
func (*PDFFlagSet) SetZoom ¶
func (pfs *PDFFlagSet) SetZoom(zoom float64)
SetZoom sets the Zoom of a PDFFlagSet
type PDFOptions ¶
type PDFOptions struct { CacheDir *string `json:"cache_dir,omitempty"` // Web cache directory Cookie *[]CookieSet `json:"cookies,omitempty"` // Set an additional cookie with url encoded values CustomHeader *[]HeaderSet `json:"custom_headers,omitempty"` // Set an additional HTTP header CustomHeaderPropagation *bool `json:"custom_header_propagation,omitempty"` // Add HTTP headers specified by CustomHeader for each resource request DebugJavascript *bool `json:"debug_javascript,omitempty"` // Show javascript debugging output DPI *int `json:"dpi,omitempty"` // Change the DPI explicitly Encoding *string `json:"encoding,omitempty"` // Set the default text encoding, for input ExternalLinks *bool `json:"external_links,omitempty"` // Make links to remote web pages Forms *bool `json:"forms,omitempty"` // Turn HTML form fields into pdf form fields Grayscale *bool `json:"grayscale,omitempty"` // Generate the PDF in grayscale Images *bool `json:"images,omitempty"` // Load or print images ImageDPI *int `json:"image_dpi,omitempty"` // Scale down images to this DPI when embedding images ImageQuality *int `json:"image_quality,omitempty"` // JPEG compress images to this quality InternalLinks *bool `json:"internal_links,omitempty"` // Make local links Javascript *bool `json:"javascript,omitempty"` // Allow web pages to run javascript JavascriptDelay *int `json:"javascript_delay,omitempty"` // Milliseconds to wait for javascript to finish LoadErrorHandling *string `json:"load_error_handling,omitempty"` // Specify how to handle pages that fail to load LoadMediaErrorHandling *string `json:"load_media_error_handling,omitempty"` // Specify how to handle media files that fail to load LowQuality *bool `json:"lowquality,omitempty"` // Generates lower quality PDF/PS MarginBottom *int `json:"margin_bottom,omitempty"` // Set the page bottom margin MarginLeft *int `json:"margin_left,omitempty"` // Set the page left margin MarginRight *int `json:"margin_right,omitempty"` // Set the page right margin MarginTop *int `json:"margin_top,omitempty"` // Set the page top margin MinimumFontSize *int `json:"minimum_font_size,omitempty"` // Minimum font size NoPDFCompression *bool `json:"no_pdf_compression,omitempty"` // Do not use lossless compression on PDF objects Orientation *string `json:"orientation,omitempty"` // Set orientation to landscape or portrait PageHeight *int `json:"page_height,omitempty"` // Height of the page PageSize *string `json:"page_size,omitempty"` // Size of the page PageWidth *int `json:"page_width,omitempty"` // Width of the page Password *string `json:"password,omitempty"` // HTTP Authentication password SmartShrinking *bool `json:"smart_width,omitempty"` // Enable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant StopSlowScripts *bool `json:"stop_slow_scripts,omitempty"` // Stop slow running javascripts Title *string `json:"title,omitempty"` // The title of the generated PDF file UseXServer *bool `json:"use_xserver,omitempty"` // Use the X server Username *string `json:"username,omitempty"` // HTTP Authentication username Zoom *float64 `json:"zoom,omitempty"` // Use this zoom factor }
PDFOptions represents wkhtmlpdf attributes