Documentation ¶
Index ¶
- Constants
- func CheckError(err error, stderr bytes.Buffer) error
- func ConvertCommand(params ConvertParams) string
- func ConvertToKindle(sourcePath, outputPath string) (bytes.Buffer, bytes.Buffer, error)
- func ConvertToPDF(sourcePath, outputPath string) (bytes.Buffer, bytes.Buffer, error)
- func ConvertToPDFSimple(sourcePath, outputPath string) (bytes.Buffer, bytes.Buffer, error)
- func ReformatImages(baseSrcDir, baseOutDir string, copyType CopyType, rewrite bool) error
- type ConvertParams
- type CopyType
- type ResolutionUnits
Constants ¶
View Source
const ( PdfWidth = 1950 // Ideal max image width PdfHeight = 2350 // Ideal max image height KindleWidth = 600 // 1400 PressDpi = 300 WebDpi = 72 ResolutionPixelsPerInchString = "PixelsPerInch" ConvertFormat = `convert %s -resize %sX%s %s %s %s` )
View Source
const ( PDFSpecs = "1950pxw300dpi" KindleSpecs = "600pxw300dpi" )
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
CheckError removes the error if ReadImage doesn't work. exit status 1: convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
func ConvertCommand ¶
func ConvertCommand(params ConvertParams) string
func ConvertToKindle ¶
func ConvertToPDF ¶
func ConvertToPDFSimple ¶
Types ¶
type ConvertParams ¶
type ResolutionUnits ¶
type ResolutionUnits int
const ( ResolutionUndefined ResolutionUnits = iota // 0 convert cli value ResolutionPixelsPerInch // 1 convert cli value ResolutionPixelsPerCentimeter // 2 convert cli value )
Click to show internal directories.
Click to hide internal directories.