Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2026 Changes in this version + const APIKeyEnvVar + const DefaultBaseURL + const Version + var ErrValidation = errValidation + func Ptr[T any](v T) *T + type APIError struct + Message string + RawBody string + RequestID string + Status int + func (e *APIError) Error() string + type BadRequestError struct + func (e *BadRequestError) Unwrap() error + type Client struct + func New(options ...Option) (*Client, error) + func (c *Client) Convert(ctx context.Context, request ConvertRequest) (*Result, error) + func (c *Client) IsAuthenticated() bool + type ColorMode string + const ColorModeBW + const ColorModeColor + const ColorModeGrayscale + type ConvertRequest struct + AsBase64Text bool + Body []byte + From SourceFormat + Options *Options + To TargetFormat + type DataRecord map[string]any + type ForbiddenError struct + IsPaidFeature bool + func (e *ForbiddenError) Unwrap() error + type LabelSize struct + Height *float64 + Width *float64 + type NotFoundError struct + func (e *NotFoundError) Unwrap() error + type Option func(*config) + func WithAPIKey(apiKey string) Option + func WithAnonymous() Option + func WithBaseURL(baseURL string) Option + func WithEnvLookup(lookup func(string) (string, bool)) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithMaxRetries(maxRetries int) Option + func WithSleeper(sleep func(time.Duration)) Option + func WithTimeout(timeout time.Duration) Option + func WithUserAgentSuffix(suffix string) Option + func WithoutJitter() Option + type Options struct + ColorMode *ColorMode + DPI *int + Darkness *int + Data any + Dialect *string + Extra map[string]any + Label *LabelSize + PDF *PDFOptions + Position *Position + RawQuery map[string]string + Rotation *int + Scaling *float64 + Watermark *bool + ZPL *ZPLOptions + type PDFConversionMode string + const PDFConversionModeImage + const PDFConversionModeNative + type PDFOptions struct + ConversionMode *PDFConversionMode + PageNumber *int + type PayloadTooLargeError struct + func (e *PayloadTooLargeError) Unwrap() error + type Position struct + X int + Y int + type RateLimitedError struct + RetryAfterSeconds *float64 + func (e *RateLimitedError) Unwrap() error + type Result struct + Bytes []byte + ContentType string + RequestID string + Status int + func (r *Result) Save(path string) error + func (r *Result) Text() string + type ServerError struct + func (e *ServerError) Unwrap() error + type SourceFormat string + const SourceBMP + const SourceDPL + const SourceEPL + const SourceGIF + const SourceJPEG + const SourceJPG + const SourceJSON + const SourcePDF + const SourcePNG + const SourceTSPL + const SourceURL + const SourceXML + const SourceZPL + func SourceFormats() []SourceFormat + type TargetFormat string + const TargetBMP + const TargetDPL + const TargetEPL + const TargetGIF + const TargetJPEG + const TargetJSON + const TargetPDF + const TargetPNG + const TargetTSPL + const TargetXML + const TargetZPL + func TargetFormats() []TargetFormat + type UnauthorizedError struct + func (e *UnauthorizedError) Unwrap() error + type ValidationError struct + Message string + Parameter string + func (e *ValidationError) Error() string + func (e *ValidationError) Is(target error) bool + type ZPLImageCompression string + const ZPLImageCompressionCompressedHex + const ZPLImageCompressionZ64 + type ZPLOptions struct + CommandsToIgnore []string + ImageCompression *ZPLImageCompression