Versions in this module Expand all Collapse all v0 v0.7.0-3 Apr 16, 2024 v0.7.0-2 Apr 16, 2024 v0.7.0-1 Apr 16, 2024 v0.6.0 Jan 26, 2024 Changes in this version + const CalGrayCS + const CalRGBCS + const DegToRad + const DeviceCMYKCS + const DeviceGrayCS + const DeviceNCS + const DeviceRGBCS + const DiagonalLLToUR + const DiagonalULToLR + const DownLeft + const DownRight + const ICCBasedCS + const IndexedCS + const LabCS + const LeftDown + const NoDiagonal + const PageAA + const PageAnnots + const PageArtBox + const PageB + const PageBleedBox + const PageBoxColorInfo + const PageContents + const PageCropBox + const PageDur + const PageGroup + const PageID + const PageLastModified + const PageMediaBox + const PageMetadata + const PagePZ + const PagePieceInfo + const PagePresSteps + const PageResources + const PageRotate + const PageSeparationInfo + const PageStructParents + const PageTabs + const PageTemplateInstantiated + const PageThumb + const PageTrans + const PageTrimBox + const PageUserUnit + const PageVP + const PatternCS + const PermissionsAll + const PermissionsNone + const PermissionsPrint + const RadToDeg + const RightDown + const RootAA + const RootAcroForm + const RootCollection + const RootDests + const RootExtensions + const RootLang + const RootLegal + const RootMarkInfo + const RootMetadata + const RootNames + const RootNeedsRendering + const RootOCProperties + const RootOpenAction + const RootOutlines + const RootOutputIntents + const RootPageLabels + const RootPageLayout + const RootPageMode + const RootPerms + const RootPieceInfo + const RootRequirements + const RootSpiderInfo + const RootStructTreeRoot + const RootThreads + const RootURI + const RootVersion + const RootViewerPrefs + const SeparationCS + const StatsFileNameDefault + const ValidationNone + const ValidationRelaxed + const ValidationStrict + const WMImage + const WMPDF + const WMText + var AnnotTypeStrings = map[AnnotationType]string + var AnnotTypes = map[string]AnnotationType + var ConfigPath string = "default" + var CutParamMap = cutParameterMap + var DestinationTypeStrings = map[DestinationType]string + var ErrNoContent = errors.New("pdfcpu: page without content") + var ResizeParamMap = resizeParameterMap + var VersionStr = "v0.6.0 dev" + func AnchorPosAndAlign(a types.Anchor, r *types.Rectangle) (x, y float64, hAlign types.HAlignment, vAlign types.VAlignment) + func AppendPageTree(d1 *types.IndirectRef, countd1 int, d2 types.Dict) error + func ApplyBox(boxName string, b *Box, d types.Dict, parent *types.Rectangle) *types.Rectangle + func CSVSafeString(s string) string + func CalcBoundingBox(s string, x, y float64, fontName string, fontSize int) *types.Rectangle + func CalcBoundingBoxForRects(r1, r2 *types.Rectangle) *types.Rectangle + func ContentBytesForPageRotation(rot int, w, h float64) []byte + func CreateDCTImageObject(xRefTable *XRefTable, buf []byte, w, h, bpc int, cs string) (*types.StreamDict, error) + func CreateImageResource(xRefTable *XRefTable, r io.Reader, gray, sepia bool) (*types.IndirectRef, int, int, error) + func CreateImageStreamDict(xRefTable *XRefTable, r io.Reader, gray, sepia bool) (*types.StreamDict, int, int, error) + func DecodeUTF8ToByte(s string) string + func DrawMargins(w io.Writer, c color.SimpleColor, colBB *types.Rectangle, ...) + func EnsureDefaultConfigAt(path string) error + func EqualFontDicts(fd1, fd2 types.Dict, xRefTable *XRefTable) (bool, error) + func EqualObjects(o1, o2 types.Object, xRefTable *XRefTable) (ok bool, err error) + func EqualStreamDicts(sd1, sd2 *types.StreamDict, xRefTable *XRefTable) (bool, error) + func ImageFileName(fileName string) bool + func ImageFileNames(dir string, maxFileSize types.ByteSize) ([]string, error) + func LowerLeftCorner(vp *types.Rectangle, bbw, bbh float64, a types.Anchor) types.Point + func NUpTilePDFBytes(wr io.Writer, rSrc, rDest *types.Rectangle, formResID string, nup *NUp, ...) + func ObjectStreamDict(sd *types.StreamDict) (*types.ObjectStreamDict, error) + func ParseObject(line *string) (types.Object, error) + func ParseObjectAttributes(line *string) (objectNumber *int, generationNumber *int, err error) + func ParseXRefStreamDict(sd *types.StreamDict) (*types.XRefStreamDict, error) + func PrepBytes(xRefTable *XRefTable, s, fontName string, cjk, rtl bool) string + func SplitMultilineStr(s string) []string + func Text(o types.Object) (string, error) + func TimingStats(op string, durRead, durVal, durOpt, durWrite, durTotal float64) + func ValidationTimingStats(dur1, dur2, dur float64) + func WriteColumn(xRefTable *XRefTable, w io.Writer, mediaBox, region *types.Rectangle, ...) *types.Rectangle + func WriteColumnAnchored(xRefTable *XRefTable, w io.Writer, mediaBox, region *types.Rectangle, ...) *types.Rectangle + func WriteMultiLine(xRefTable *XRefTable, w io.Writer, mediaBox, region *types.Rectangle, ...) *types.Rectangle + func WriteMultiLineAnchored(xRefTable *XRefTable, w io.Writer, mediaBox, region *types.Rectangle, ...) *types.Rectangle + type Annot struct + IndRefs *[]types.IndirectRef + Map AnnotMap + type AnnotMap map[int]AnnotationRenderer + type Annotation struct + C *color.SimpleColor + Contents string + F AnnotationFlags + ModDate string + NM string + P *types.IndirectRef + Rect types.Rectangle + SubType AnnotationType + func NewAnnotation(typ AnnotationType, rect types.Rectangle, contents string, ...) Annotation + func NewAnnotationForRawType(typ string, rect types.Rectangle, contents string, ...) Annotation + func (ann Annotation) ContentString() string + func (ann Annotation) ID() string + func (ann Annotation) RectString() string + func (ann Annotation) RenderDict(xRefTable *XRefTable, pageIndRef types.IndirectRef) (types.Dict, error) + func (ann Annotation) Type() AnnotationType + func (ann Annotation) TypeString() string + type AnnotationFlags int + const AnnHidden + const AnnInvisible + const AnnLocked + const AnnLockedContents + const AnnNoRotate + const AnnNoView + const AnnNoZoom + const AnnPrint + const AnnReadOnly + const AnnToggleNoView + type AnnotationRenderer interface + ContentString func() string + ID func() string + RectString func() string + RenderDict func(xRefTable *XRefTable, pageIndRef types.IndirectRef) (types.Dict, error) + Type func() AnnotationType + type AnnotationType int + const Ann3D + const AnnCaret + const AnnCircle + const AnnFileAttachment + const AnnFreeText + const AnnHighLight + const AnnInk + const AnnLine + const AnnLink + const AnnMovie + const AnnPolyLine + const AnnPolygon + const AnnPopup + const AnnPrinterMark + const AnnRedact + const AnnScreen + const AnnSound + const AnnSquare + const AnnSquiggly + const AnnStamp + const AnnStrikeOut + const AnnText + const AnnTrapNet + const AnnUnderline + const AnnWatermark + const AnnWidget + type Attachment struct + Desc string + FileName string + ID string + ModTime *time.Time + func (a Attachment) String() string + type Box struct + Dim *types.Dim + Dx int + Dy int + Inherited bool + MBot float64 + MLeft float64 + MRight float64 + MTop float64 + Pos types.Anchor + Rect *types.Rectangle + RefBox string + func ParseBox(s string, u types.DisplayUnit) (*Box, error) + type CommandMode int + const ADDANNOTATIONS + const ADDATTACHMENTS + const ADDATTACHMENTSPORTFOLIO + const ADDBOOKMARKS + const ADDBOXES + const ADDKEYWORDS + const ADDPROPERTIES + const ADDWATERMARKS + const BOOKLET + const CHANGEOPW + const CHANGEUPW + const CHEATSHEETSFONTS + const COLLECT + const CREATE + const CROP + const CUT + const DECRYPT + const DUMP + const ENCRYPT + const EXPORTBOOKMARKS + const EXPORTFORMFIELDS + const EXTRACTATTACHMENTS + const EXTRACTCONTENT + const EXTRACTFONTS + const EXTRACTIMAGES + const EXTRACTMETADATA + const EXTRACTPAGES + const FILLFORMFIELDS + const IMPORTBOOKMARKS + const IMPORTIMAGES + const INSERTPAGESAFTER + const INSERTPAGESBEFORE + const INSTALLFONTS + const LISTANNOTATIONS + const LISTATTACHMENTS + const LISTBOOKMARKS + const LISTBOXES + const LISTFONTS + const LISTFORMFIELDS + const LISTIMAGES + const LISTINFO + const LISTKEYWORDS + const LISTPAGELAYOUT + const LISTPAGEMODE + const LISTPERMISSIONS + const LISTPROPERTIES + const LISTVIEWERPREFERENCES + const LOCKFORMFIELDS + const MERGEAPPEND + const MERGECREATE + const MERGECREATEZIP + const MULTIFILLFORMFIELDS + const NDOWN + const NUP + const OPTIMIZE + const POSTER + const REMOVEANNOTATIONS + const REMOVEATTACHMENTS + const REMOVEBOOKMARKS + const REMOVEBOXES + const REMOVEFORMFIELDS + const REMOVEKEYWORDS + const REMOVEPAGES + const REMOVEPROPERTIES + const REMOVEWATERMARKS + const RESETFORMFIELDS + const RESETPAGELAYOUT + const RESETPAGEMODE + const RESETVIEWERPREFERENCES + const RESIZE + const ROTATE + const SETPAGELAYOUT + const SETPAGEMODE + const SETPERMISSIONS + const SETVIEWERPREFERENCES + const SPLIT + const SPLITBYPAGENR + const TRIM + const UNLOCKFORMFIELDS + const VALIDATE + type Configuration struct + CheckFileNameExt bool + Cmd CommandMode + CollectStats bool + CreateBookmarks bool + DateFormat string + DecodeAllStreams bool + EncryptKeyLength int + EncryptUsingAES bool + Eol string + NeedAppearances bool + OptimizeDuplicateContentStreams bool + OwnerPW string + OwnerPWNew *string + Path string + Permissions PermissionFlags + Reader15 bool + StatsFileName string + TimestampFormat string + Unit types.DisplayUnit + UserPW string + UserPWNew *string + ValidateLinks bool + ValidationMode int + WriteObjectStream bool + WriteXRefStream bool + func NewAESConfiguration(userPW, ownerPW string, keyLength int) *Configuration + func NewDefaultConfiguration() *Configuration + func NewRC4Configuration(userPW, ownerPW string, keyLength int) *Configuration + func (c *Configuration) ApplyReducedFeatureSet() bool + func (c *Configuration) EolString() string + func (c *Configuration) SetUnit(s string) + func (c *Configuration) UnitString() string + func (c *Configuration) ValidationModeString() string + func (c Configuration) String() string + type Context struct + Dest bool + Optimize *OptimizationContext + Read *ReadContext + Write *WriteContext + WritingPages bool + func NewContext(rs io.ReadSeeker, conf *Configuration) (*Context, error) + func (ctx *Context) AddAttachment(a Attachment, useCollection bool) error + func (ctx *Context) AddAttachmentsToInfoDigest(ss *[]string) error + func (ctx *Context) AddPageBoundaries(selectedPages types.IntSet, pb *PageBoundaries) error + func (ctx *Context) ConvertToUnit(d types.Dim) types.Dim + func (ctx *Context) Crop(selectedPages types.IntSet, b *Box) error + func (ctx *Context) ExtractAttachment(a Attachment) (*Attachment, error) + func (ctx *Context) ExtractAttachments(ids []string) ([]Attachment, error) + func (ctx *Context) ListAttachments() ([]Attachment, error) + func (ctx *Context) ListPageBoundaries(selectedPages types.IntSet, wantPB *PageBoundaries) ([]string, error) + func (ctx *Context) NUpTilePDFBytesForPDF(pageNr int, formsResDict types.Dict, buf *bytes.Buffer, rDest *types.Rectangle, ...) error + func (ctx *Context) RemoveAttachment(a Attachment) (bool, error) + func (ctx *Context) RemoveAttachments(ids []string) (bool, error) + func (ctx *Context) RemovePageBoundaries(selectedPages types.IntSet, pb *PageBoundaries) error + func (ctx *Context) ResetWriteContext() + func (ctx *Context) SearchEmbeddedFilesNameTreeNodeByContent(s string) (*string, types.Object, error) + func (ctx *Context) String() string + func (ctx *Context) UnitString() string + type Cut struct + BgColor *color.SimpleColor + Border bool + Hor []float64 + Margin float64 + Origin types.Corner + PageDim *types.Dim + PageSize string + Scale float64 + Unit types.DisplayUnit + UserDim bool + Vert []float64 + type Destination struct + Bottom int + Left int + PageNr int + Right int + Top int + Typ DestinationType + Zoom float32 + func (dest Destination) Array(indRef types.IndirectRef) types.Array + func (dest Destination) Name() types.Name + func (dest Destination) String() string + type DestinationType int + const DestFit + const DestFitB + const DestFitBH + const DestFitBV + const DestFitH + const DestFitR + const DestFitV + const DestXYZ + type Direction int + const L2R + const R2L + func DirectionFor(s string) *Direction + func (d *Direction) String() string + type Enc struct + Emd bool + ID []byte + L int + O []byte + OE []byte + P int + Perms []byte + R int + U []byte + UE []byte + V int + type FieldAnnotation struct + Dict types.Dict + Field bool + Ind int + IndRef *types.IndirectRef + Kids types.Array + type FontMap map[string]FontResource + func DrawBookletGuides(nup *NUp, w io.Writer) FontMap + func (fm FontMap) EnsureKey(fontName string) string + type FontObject struct + Data []byte + Extension string + FontDict types.Dict + FontName string + Prefix string + ResourceNames []string + func (fo *FontObject) AddResourceName(resourceName string) + func (fo FontObject) Embedded() (embedded bool) + func (fo FontObject) Encoding() string + func (fo FontObject) ResourceNamesString() string + func (fo FontObject) String() string + func (fo FontObject) SubType() string + type FontResource struct + CIDSet *types.IndirectRef + FontFile *types.IndirectRef + Lang string + Res Resource + ToUnicode *types.IndirectRef + W *types.IndirectRef + type Image struct + Bpc int + Comp int + Cs string + DecodeParms string + FileType string + Filter string + HasImgMask bool + HasSMask bool + Height int + Interpol bool + IsImgMask bool + Name string + ObjNr int + PageNr int + Size int64 + Thumb bool + Width int + type ImageMap map[string]ImageResource + type ImageObject struct + ImageDict *types.StreamDict + ResourceNames []string + func (io *ImageObject) AddResourceName(resourceName string) + func (io ImageObject) ResourceNamesString() string + type ImageResource struct + Height int + Res Resource + Width int + type InheritedPageAttrs struct + CropBox *types.Rectangle + MediaBox *types.Rectangle + Resources types.Dict + Rotate int + type InkAnnotation struct + AP *types.Dict + BS *types.Dict + InkList []InkPath + func NewInkAnnotation(rect types.Rectangle, contents, id, title string, ink []InkPath, ...) InkAnnotation + func (ann InkAnnotation) RenderDict(pageIndRef types.IndirectRef) types.Dict + type InkPath []float64 + type LinkAnnotation struct + Border bool + Dest *Destination + Quad types.QuadPoints + URI string + func NewLinkAnnotation(rect types.Rectangle, quad types.QuadPoints, dest *Destination, uri string, ...) LinkAnnotation + func (ann LinkAnnotation) ContentString() string + func (ann LinkAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef types.IndirectRef) (types.Dict, error) + type MarkupAnnotation struct + CA *float64 + CreationDate string + PopupIndRef *types.IndirectRef + RC string + Subj string + T string + func NewMarkupAnnotation(subType AnnotationType, rect types.Rectangle, pageIndRef *types.IndirectRef, ...) MarkupAnnotation + type NUp struct + BgColor *color.SimpleColor + BookletGuides bool + Border bool + FolioSize int + Grid *types.Dim + ImgInputFile bool + InpUnit types.DisplayUnit + Margin float64 + MultiFolio bool + Orient orientation + PageDim *types.Dim + PageGrid bool + PageSize string + UserDim bool + func DefaultNUpConfig() *NUp + func (nup NUp) N() int + func (nup NUp) RectsForGrid() []*types.Rectangle + func (nup NUp) String() string + type NameMap map[string][]types.Dict + func (m NameMap) Add(k string, d types.Dict) + type Node struct + D types.Dict + Kids []*Node + Kmax string + Kmin string + Names []entry + func (n *Node) Add(xRefTable *XRefTable, k string, v types.Object, m NameMap, ...) error + func (n *Node) AddTree(xRefTable *XRefTable, tree *Node, m NameMap, nameRefDictKeys []string) error + func (n *Node) AppendToNames(k string, v types.Object) + func (n *Node) HandleLeaf(xRefTable *XRefTable, k string, v types.Object, m NameMap, ...) error + func (n *Node) Process(xRefTable *XRefTable, handler func(*XRefTable, string, *types.Object) error) error + func (n *Node) Remove(xRefTable *XRefTable, k string) (empty, ok bool, err error) + func (n Node) KeyList() ([]string, error) + func (n Node) String() string + func (n Node) Value(k string) (types.Object, bool) + type NonFullScreenPageMode PageMode + const NFSPageModeUseNone + const NFSPageModeUseOC + const NFSPageModeUseOutlines + const NFSPageModeUseThumb + type OptimizationContext struct + Cache map[int]bool + ContentStreamCache map[int]*types.StreamDict + DuplicateFontObjs types.IntSet + DuplicateFonts map[int]types.Dict + DuplicateImageObjs types.IntSet + DuplicateImages map[int]*types.StreamDict + DuplicateInfoObjects types.IntSet + FontObjects map[int]*FontObject + Fonts map[string][]int + FormFontObjects map[int]*FontObject + FormStreamCache map[int]*types.StreamDict + ImageObjects map[int]*ImageObject + NonReferencedObjs []int + NullObjNr *int + PageFonts []types.IntSet + PageImages []types.IntSet + func (oc *OptimizationContext) DuplicateFontObjectsString() (int, string) + func (oc *OptimizationContext) DuplicateImageObjectsString() (int, string) + func (oc *OptimizationContext) DuplicateInfoObjectsString() (int, string) + func (oc *OptimizationContext) IsDuplicateFontObject(i int) bool + func (oc *OptimizationContext) IsDuplicateImageObject(i int) bool + func (oc *OptimizationContext) IsDuplicateInfoObject(i int) bool + func (oc *OptimizationContext) NonReferencedObjsString() (int, string) + type PDFStats struct + func NewPDFStats() PDFStats + func (stats PDFStats) AddPageAttr(name int) + func (stats PDFStats) AddRootAttr(name int) + func (stats PDFStats) UsesPageAttr(name int) bool + func (stats PDFStats) UsesRootAttr(name int) bool + type Page struct + AnnotTabs map[int]FieldAnnotation + Annots []FieldAnnotation + Buf *bytes.Buffer + CropBox *types.Rectangle + Fields types.Array + Fm FontMap + Im ImageMap + LinkAnnots []LinkAnnotation + MediaBox *types.Rectangle + func NewPage(mediaBox, cropBox *types.Rectangle) Page + func NewPageWithBg(mediaBox *types.Rectangle, c color.SimpleColor) Page + type PageBoundaries struct + Art *Box + Bleed *Box + Crop *Box + Media *Box + Rot int + Trim *Box + func ParseBoxList(s string) (*PageBoundaries, error) + func ParsePageBoundaries(s string, unit types.DisplayUnit) (*PageBoundaries, error) + func (pb *PageBoundaries) ResolveBox(s string) error + func (pb *PageBoundaries) SelectAll() + func (pb PageBoundaries) ArtBox() *types.Rectangle + func (pb PageBoundaries) BleedBox() *types.Rectangle + func (pb PageBoundaries) CropBox() *types.Rectangle + func (pb PageBoundaries) MediaBox() *types.Rectangle + func (pb PageBoundaries) String() string + func (pb PageBoundaries) TrimBox() *types.Rectangle + type PageBoundary int + const ArtBox + const BleedBox + const CropBox + const MediaBox + const TrimBox + func PageBoundaryFor(s string) *PageBoundary + func (pb *PageBoundary) String() string + type PageLayout int + const PageLayoutSinglePage + const PageLayoutTwoColumnLeft + const PageLayoutTwoColumnRight + const PageLayoutTwoPageLeft + const PageLayoutTwoPageRight + func PageLayoutFor(s string) *PageLayout + func (pl *PageLayout) String() string + type PageMode int + const PageModeFullScreen + const PageModeUseAttachments + const PageModeUseNone + const PageModeUseOC + const PageModeUseOutlines + const PageModeUseThumbs + func PageModeFor(s string) *PageMode + func (pm *PageMode) String() string + type PageResourceNames map[string]types.StringSet + func NewPageResourceNames() PageResourceNames + func (prn PageResourceNames) HasContent() bool + func (prn PageResourceNames) HasResources(s string) bool + func (prn PageResourceNames) Resources(s string) types.StringSet + func (prn PageResourceNames) String() string + type PaperHandling int + const DuplexFlipLongEdge + const DuplexFlipShortEdge + const Simplex + func PaperHandlingFor(s string) *PaperHandling + func (ph *PaperHandling) String() string + type PdfResources struct + Bb *types.Rectangle + Content []byte + ResDict *types.IndirectRef + type PermissionFlags int + const PermissionAssembleRev3 + const PermissionExtract + const PermissionExtractRev3 + const PermissionFillRev3 + const PermissionModAnnFillForm + const PermissionModify + const PermissionPrintRev2 + const PermissionPrintRev3 + const UnusedFlag1 + const UnusedFlag2 + const UnusedFlag7 + const UnusedFlag8 + type PgAnnots map[AnnotationType]Annot + type PopupAnnotation struct + Open bool + ParentIndRef *types.IndirectRef + func NewPopupAnnotation(rect types.Rectangle, pageIndRef *types.IndirectRef, contents, id string, ...) PopupAnnotation + func (ann PopupAnnotation) ContentString() string + type PrintScaling int + const PrintScalingAppDefault + const PrintScalingNone + func PrintScalingFor(s string) *PrintScaling + func (ps *PrintScaling) String() string + type ReadContext struct + BinaryFontDuplSize int64 + BinaryFontSize int64 + BinaryImageDuplSize int64 + BinaryImageSize int64 + BinaryTotalSize int64 + EolCount int + FileName string + FileSize int64 + Hybrid bool + Linearized bool + ObjectStreams types.IntSet + RS io.ReadSeeker + UsingObjectStreams bool + UsingXRefStreams bool + XRefStreams types.IntSet + func (rc *ReadContext) IsObjectStreamObject(i int) bool + func (rc *ReadContext) IsXRefStreamObject(i int) bool + func (rc *ReadContext) LogStats(optimized bool) + func (rc *ReadContext) ObjectStreamsString() (int, string) + func (rc *ReadContext) ReadFileSize() int + func (rc *ReadContext) XRefStreamsString() (int, string) + type Resize struct + BgColor *color.SimpleColor + Border bool + EnforceOrient bool + PageDim *types.Dim + PageSize string + Scale float64 + Unit types.DisplayUnit + UserDim bool + func (r Resize) EnforceOrientation() bool + type Resource struct + ID string + IndRef *types.IndirectRef + type TextAnnotation struct + Name string + Open bool + func NewTextAnnotation(rect types.Rectangle, contents, id, title string, f AnnotationFlags, ...) TextAnnotation + func (ann TextAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef types.IndirectRef) (types.Dict, error) + type TextDescriptor struct + BackgroundCol color.SimpleColor + BorderCol color.SimpleColor + BorderStyle types.LineJoinStyle + BorderWidth float64 + Dx float64 + Dy float64 + FillCol color.SimpleColor + FontKey string + FontName string + FontSize int + HAlign types.HAlignment + HairCross bool + MBot float64 + MLeft float64 + MRight float64 + MTop float64 + MinHeight float64 + ParIndent bool + RMode draw.RenderMode + RTL bool + Rotation float64 + Scale float64 + ScaleAbs bool + ShowBackground bool + ShowBorder bool + ShowLineBB bool + ShowMargins bool + ShowPosition bool + ShowTextBB bool + StrokeCol color.SimpleColor + Text string + VAlign types.VAlignment + X float64 + Y float64 + type Version int + const V10 + const V11 + const V12 + const V13 + const V14 + const V15 + const V16 + const V17 + const V20 + func PDFVersion(versionStr string) (Version, error) + func (v Version) String() string + type ViewerPrefJSON struct + CenterWindow *bool + Direction string + DisplayDocTitle *bool + Duplex string + Enforce []string + FitWindow *bool + HideMenubar *bool + HideToolbar *bool + HideWindowUI *bool + NonFullScreenPageMode string + NumCopies *int + PickTrayByPDFSize *bool + PrintArea string + PrintClip string + PrintPageRange []int + PrintScaling string + ViewArea string + ViewClip string + type ViewerPreferences struct + CenterWindow *bool + Direction *Direction + DisplayDocTitle *bool + Duplex *PaperHandling + Enforce types.Array + FitWindow *bool + HideMenubar *bool + HideToolbar *bool + HideWindowUI *bool + NonFullScreenPageMode *NonFullScreenPageMode + NumCopies *types.Integer + PickTrayByPDFSize *bool + PrintArea *PageBoundary + PrintClip *PageBoundary + PrintPageRange types.Array + PrintScaling *PrintScaling + ViewArea *PageBoundary + ViewClip *PageBoundary + func DefaultViewerPreferences(version Version) *ViewerPreferences + func ViewerPreferencesWithDefaults(vp *ViewerPreferences, version Version) (*ViewerPreferences, error) + func (vp *ViewerPreferences) MarshalJSON() ([]byte, error) + func (vp *ViewerPreferences) Populate(vp1 *ViewerPreferences) + func (vp *ViewerPreferences) SetCenterWindow(val bool) + func (vp *ViewerPreferences) SetDisplayDocTitle(val bool) + func (vp *ViewerPreferences) SetFitWindow(val bool) + func (vp *ViewerPreferences) SetHideMenuBar(val bool) + func (vp *ViewerPreferences) SetHideToolBar(val bool) + func (vp *ViewerPreferences) SetHideWindowUI(val bool) + func (vp *ViewerPreferences) SetNumCopies(i int) + func (vp *ViewerPreferences) SetPickTrayByPDFSize(val bool) + func (vp *ViewerPreferences) UnmarshalJSON(data []byte) error + func (vp *ViewerPreferences) Validate(version Version) error + func (vp ViewerPreferences) List() []string + func (vp ViewerPreferences) String() string + type Watermark struct + Bb *types.Rectangle + BbTrans types.QuadLiteral + BgColor *color.SimpleColor + BorderColor *color.SimpleColor + BorderStyle types.LineJoinStyle + BorderWidth float64 + Color color.SimpleColor + Diagonal int + Dx float64 + Dy float64 + ExtGState *types.IndirectRef + FCache formCache + FileName string + FillColor color.SimpleColor + Font *types.IndirectRef + FontName string + FontSize int + Form *types.IndirectRef + HAlign *types.HAlignment + Height int + Image io.Reader + Img *types.IndirectRef + InpUnit types.DisplayUnit + MBot float64 + MLeft float64 + MRight float64 + MTop float64 + Mode int + Objs types.IntSet + Ocg *types.IndirectRef + OnTop bool + Opacity float64 + PDF io.ReadSeeker + PageRot int + PdfMultiStartPageNrDest int + PdfMultiStartPageNrSrc int + PdfPageNrSrc int + PdfRes map[int]PdfResources + Pos types.Anchor + RTL bool + RenderMode draw.RenderMode + Rotation float64 + Scale float64 + ScaleAbs bool + ScaleEff float64 + ScaledFontSize int + StrokeColor color.SimpleColor + TextLines []string + TextString string + URL string + Update bool + UserRotOrDiagonal bool + Vp *types.Rectangle + Width int + func DefaultWatermarkConfig() *Watermark + func (wm *Watermark) CalcBoundingBox(pageNr int) + func (wm *Watermark) CalcTransformMatrix() matrix.Matrix + func (wm *Watermark) PdfResIndex(pageNr int) int + func (wm *Watermark) Recycle() + func (wm Watermark) IsImage() bool + func (wm Watermark) IsPDF() bool + func (wm Watermark) IsText() bool + func (wm Watermark) MultiStamp() bool + func (wm Watermark) OnTopString() string + func (wm Watermark) String() string + func (wm Watermark) Typ() string + type WriteContext struct + BinaryFontSize int64 + BinaryImageSize int64 + BinaryTotalSize int64 + CurrentObjStream *int + DirName string + Eol string + FileName string + FileSize int64 + Fp *os.File + Increment bool + ObjNrs []int + Offset int64 + OffsetPrevXRef *int64 + SelectedPages types.IntSet + Table map[int]int64 + WriteToObjectStream bool + func NewWriteContext(eol string) *WriteContext + func (wc *WriteContext) HasWriteOffset(objNumber int) bool + func (wc *WriteContext) IncrementWithObjNr(i int) + func (wc *WriteContext) LogStats() + func (wc *WriteContext) SetWriteOffset(objNumber int) + func (wc *WriteContext) WriteEol() error + type XRefTable struct + AES4EmbeddedStreams bool + AES4Streams bool + AES4Strings bool + AdditionalStreams *types.Array + AppendOnly bool + Author string + Conf *Configuration + CreationDate string + Creator string + CurObj int + CurPage int + E *Enc + EncKey []byte + Encrypt *types.IndirectRef + Form types.Dict + HeaderVersion *Version + ID types.Array + Info *types.IndirectRef + Keywords string + LinearizationObjs types.IntSet + ModDate string + NameRefs map[string]NameMap + Names map[string]*Node + OffsetOverflowHintTable *int64 + OffsetPrimaryHintTable *int64 + Optimized bool + Outlines types.Dict + PageAnnots map[int]PgAnnots + PageCount int + PageLayout *PageLayout + PageMode *PageMode + PageThumbs map[int]types.IndirectRef + Producer string + Properties map[string]string + Root *types.IndirectRef + RootDict types.Dict + RootVersion *Version + SignatureExist bool + Size *int + Stats PDFStats + Subject string + Table map[int]*XRefTableEntry + Tagged bool + Title string + URIs map[int]map[string]string + UsedGIDs map[string]map[uint16]bool + Valid bool + ValidateLinks bool + ValidationMode int + ViewerPref *ViewerPreferences + Watermarked bool + func (xRefTable *XRefTable) AppendContent(pageDict types.Dict, bb []byte) error + func (xRefTable *XRefTable) AppendPages(rootPageIndRef *types.IndirectRef, fromPageNr int, ctx *Context) (int, error) + func (xRefTable *XRefTable) BindNameTrees() error + func (xRefTable *XRefTable) BindPrinterPreferences(vp *ViewerPreferences, d types.Dict) + func (xRefTable *XRefTable) BindViewerPreferences() + func (xRefTable *XRefTable) Catalog() (types.Dict, error) + func (xRefTable *XRefTable) CatalogHasPieceInfo() (bool, error) + func (xRefTable *XRefTable) DeleteDictEntry(d types.Dict, key string) error + func (xRefTable *XRefTable) DeleteObject(o types.Object) error + func (xRefTable *XRefTable) DeleteObjectGraph(o types.Object) error + func (xRefTable *XRefTable) Dereference(o types.Object) (types.Object, error) + func (xRefTable *XRefTable) DereferenceArray(o types.Object) (types.Array, error) + func (xRefTable *XRefTable) DereferenceBoolean(o types.Object, sinceVersion Version) (*types.Boolean, error) + func (xRefTable *XRefTable) DereferenceCSVSafeText(o types.Object) (string, error) + func (xRefTable *XRefTable) DereferenceDestArray(key string) (types.Array, error) + func (xRefTable *XRefTable) DereferenceDict(o types.Object) (types.Dict, error) + func (xRefTable *XRefTable) DereferenceDictEntry(d types.Dict, key string) (types.Object, error) + func (xRefTable *XRefTable) DereferenceFontDict(indRef types.IndirectRef) (types.Dict, error) + func (xRefTable *XRefTable) DereferenceInteger(o types.Object) (*types.Integer, error) + func (xRefTable *XRefTable) DereferenceName(o types.Object, sinceVersion Version, validate func(string) bool) (n types.Name, err error) + func (xRefTable *XRefTable) DereferenceNumber(o types.Object) (float64, error) + func (xRefTable *XRefTable) DereferencePageNodeDict(indRef types.IndirectRef) (types.Dict, error) + func (xRefTable *XRefTable) DereferenceStreamDict(o types.Object) (*types.StreamDict, bool, error) + func (xRefTable *XRefTable) DereferenceStringEntryBytes(d types.Dict, key string) ([]byte, error) + func (xRefTable *XRefTable) DereferenceStringLiteral(o types.Object, sinceVersion Version, validate func(string) bool) (s types.StringLiteral, err error) + func (xRefTable *XRefTable) DereferenceStringOrHexLiteral(obj types.Object, sinceVersion Version, validate func(string) bool) (s string, err error) + func (xRefTable *XRefTable) DereferenceText(o types.Object) (string, error) + func (xRefTable *XRefTable) DereferenceXObjectDict(indRef types.IndirectRef) (*types.StreamDict, error) + func (xRefTable *XRefTable) DestName(obj types.Object) (string, error) + func (xRefTable *XRefTable) DumpObject(objNr, mode int) + func (xRefTable *XRefTable) EmptyPage(parentIndRef *types.IndirectRef, mediaBox *types.Rectangle) (*types.IndirectRef, error) + func (xRefTable *XRefTable) EncryptDict() (types.Dict, error) + func (xRefTable *XRefTable) EnsureCollection() error + func (xRefTable *XRefTable) EnsurePageCount() error + func (xRefTable *XRefTable) EnsureValidFreeList() error + func (xRefTable *XRefTable) EnsureVersionForWriting() + func (xRefTable *XRefTable) Exists(objNr int) bool + func (xRefTable *XRefTable) Find(objNr int) (*XRefTableEntry, bool) + func (xRefTable *XRefTable) FindObject(objNr int) (types.Object, error) + func (xRefTable *XRefTable) FindTableEntry(objNr int, genNr int) (*XRefTableEntry, bool) + func (xRefTable *XRefTable) FindTableEntryForIndRef(indRef *types.IndirectRef) (*XRefTableEntry, bool) + func (xRefTable *XRefTable) FindTableEntryLight(objNr int) (*XRefTableEntry, bool) + func (xRefTable *XRefTable) Free(objNr int) (*XRefTableEntry, error) + func (xRefTable *XRefTable) FreeObject(objNr int) error + func (xRefTable *XRefTable) HasUsedGIDs(fontName string) bool + func (xRefTable *XRefTable) IDFirstElement() (id []byte, err error) + func (xRefTable *XRefTable) IncrementRefCount(indRef *types.IndirectRef) + func (xRefTable *XRefTable) IndRefForNewObject(obj types.Object) (*types.IndirectRef, error) + func (xRefTable *XRefTable) InsertAndUseRecycled(xRefTableEntry XRefTableEntry) (objNr int, err error) + func (xRefTable *XRefTable) InsertBlankPages(pages types.IntSet, before bool) error + func (xRefTable *XRefTable) InsertNew(xRefTableEntry XRefTableEntry) (objNr int) + func (xRefTable *XRefTable) InsertObject(obj types.Object) (objNr int, err error) + func (xRefTable *XRefTable) InsertPages(parent *types.IndirectRef, p *int, ctx *Context) (int, error) + func (xRefTable *XRefTable) IsLinearizationObject(i int) bool + func (xRefTable *XRefTable) IsMerging() bool + func (xRefTable *XRefTable) IsValid(ir types.IndirectRef) (bool, error) + func (xRefTable *XRefTable) LinearizationObjsString() (int, string) + func (xRefTable *XRefTable) LocateNameTree(nameTreeName string, ensure bool) error + func (xRefTable *XRefTable) MissingObjects() (int, *string) + func (xRefTable *XRefTable) NameRef(nameType string) NameMap + func (xRefTable *XRefTable) NamesDict() (types.Dict, error) + func (xRefTable *XRefTable) NewEmbeddedFileStreamDict(filename string) (*types.IndirectRef, error) + func (xRefTable *XRefTable) NewEmbeddedStreamDict(r io.Reader, modDate time.Time) (*types.IndirectRef, error) + func (xRefTable *XRefTable) NewFileSpecDict(f, uf, desc string, indRefStreamDict types.IndirectRef) (types.Dict, error) + func (xRefTable *XRefTable) NewFileSpecDictForAttachment(a Attachment) (types.Dict, error) + func (xRefTable *XRefTable) NewSoundStreamDict(filename string, samplingRate int, fileSpecDict types.Dict) (*types.IndirectRef, error) + func (xRefTable *XRefTable) NewStreamDictForBuf(buf []byte) (*types.StreamDict, error) + func (xRefTable *XRefTable) NewStreamDictForFile(filename string) (*types.StreamDict, error) + func (xRefTable *XRefTable) NextForFree(objNr int) (int, error) + func (xRefTable *XRefTable) PageBoundaries(selectedPages types.IntSet) ([]PageBoundaries, error) + func (xRefTable *XRefTable) PageContent(d types.Dict) ([]byte, error) + func (xRefTable *XRefTable) PageDict(pageNr int, consolidateRes bool) (types.Dict, *types.IndirectRef, *InheritedPageAttrs, error) + func (xRefTable *XRefTable) PageDictIndRef(page int) (*types.IndirectRef, error) + func (xRefTable *XRefTable) PageDims() ([]types.Dim, error) + func (xRefTable *XRefTable) PageNumber(pageObjNr int) (int, error) + func (xRefTable *XRefTable) Pages() (*types.IndirectRef, error) + func (xRefTable *XRefTable) ParseRootVersion() (v *string, err error) + func (xRefTable *XRefTable) RectForArray(a types.Array) (*types.Rectangle, error) + func (xRefTable *XRefTable) RemoveCollection() error + func (xRefTable *XRefTable) RemoveEmbeddedFilesNameTree() error + func (xRefTable *XRefTable) RemoveNameTree(nameTreeName string) error + func (xRefTable *XRefTable) RemoveSignature() + func (xRefTable *XRefTable) SetValid(ir types.IndirectRef) error + func (xRefTable *XRefTable) StreamDictIndRef(bb []byte) (*types.IndirectRef, error) + func (xRefTable *XRefTable) UndeleteObject(objectNumber int) error + func (xRefTable *XRefTable) ValidateVersion(element string, sinceVersion Version) error + func (xRefTable *XRefTable) Version() Version + func (xRefTable *XRefTable) VersionString() string + type XRefTableEntry struct + Compressed bool + Free bool + Generation *int + Object types.Object + ObjectStream *int + ObjectStreamInd *int + Offset *int64 + RefCount int + Valid bool + func NewFreeHeadXRefTableEntry() *XRefTableEntry + func NewXRefTableEntryGen0(obj types.Object) *XRefTableEntry