Documentation
¶
Overview ¶
Package pdfkit provides Go bindings for the PDFKit framework.
Display and manipulate PDF documents in your apps.
Views ¶
- PDFView: An object that encapsulates the functionality of PDF Kit into a single widget that you can add to your application using Interface Builder. (PDFViewDelegate)
- PDFThumbnailView: An object that contains a set of thumbnails, each of which represents a page in a PDF document.
Content Model ¶
- PDFDocument: An object that represents PDF data or a PDF file and defines methods for writing, searching, and selecting PDF data. (PDFDocumentDelegate, PDFDocumentPermissions, PDFDocumentAttribute, PDFDocumentWriteOption)
- PDFPage: , a subclass of , defines methods used to render PDF pages and work with annotations, text, and selections. (PDFDisplayBox, PDFDisplayDirection)
- PDFOutline: A object is an element in a tree-structured hierarchy that can represent the structure of a PDF document.
- PDFSelection: A object identifies a contiguous or noncontiguous selection of text in a PDF document.
Annotations ¶
- Adding Widgets to a PDF Document: Add text, button, and choice widgets to a PDF document.
- Adding Custom Graphics to a PDF: Create and add custom annotation and page graphics to your PDF document.
- Custom Graphics: Demonstrates adding a watermark to a PDF page.
- PDF Widgets: Demonstrates adding widgets—interactive form elements—to a PDF document.
- PDFAnnotation: An annotation in a PDF document. (PDFAnnotationSubtype, PDFAction, PDFDestination, PDFAnnotationKey, PDFBorder)
Protocols ¶
- PDFPageOverlayViewProvider
Key Types ¶
- PDFView - An object that encapsulates the functionality of PDF Kit into a single widget that you can add to your application using Interface Builder.
- PDFAnnotation - An annotation in a PDF document.
- PDFDocument - An object that represents PDF data or a PDF file and defines methods for writing, searching, and selecting PDF data.
- PDFPage - PDFPage, a subclass of [NSObject], defines methods used to render PDF pages and work with annotations, text, and selections.
- PDFSelection - A PDFSelection object identifies a contiguous or noncontiguous selection of text in a PDF document.
- PDFBorder - An optional border for an annotation that lies completely within the annotation rectangle.
- PDFAppearanceCharacteristics - An object that represents appearance characteristics of a widget annotation.
- PDFOutline - A PDFOutline object is an element in a tree-structured hierarchy that can represent the structure of a PDF document.
- PDFDestination - A PDFDestination object describes a point on a PDF page.
- PDFThumbnailView - An object that contains a set of thumbnails, each of which represents a page in a PDF document.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- type IPDFAction
- type IPDFActionGoTo
- type IPDFActionNamed
- type IPDFActionRemoteGoTo
- type IPDFActionResetForm
- type IPDFActionURL
- type IPDFAnnotation
- type IPDFAppearanceCharacteristics
- type IPDFBorder
- type IPDFDestination
- type IPDFDocument
- type IPDFOutline
- type IPDFPage
- type IPDFSelection
- type IPDFThumbnailView
- type IPDFView
- type PDFAccessPermissions
- type PDFAction
- func (p PDFAction) Action() IPDFAction
- func (p PDFAction) Autorelease() PDFAction
- func (p PDFAction) Init() PDFAction
- func (p PDFAction) ModificationDate() foundation.INSDate
- func (p PDFAction) Page() IPDFPage
- func (p PDFAction) SetAction(value IPDFAction)
- func (p PDFAction) SetModificationDate(value foundation.INSDate)
- func (p PDFAction) SetPage(value IPDFPage)
- func (p PDFAction) SetUserName(value string)
- func (p PDFAction) Type() string
- func (p PDFAction) UserName() string
- type PDFActionClass
- type PDFActionGoTo
- type PDFActionGoToClass
- type PDFActionNamed
- type PDFActionNamedClass
- type PDFActionNamedName
- type PDFActionRemoteGoTo
- func (p PDFActionRemoteGoTo) Autorelease() PDFActionRemoteGoTo
- func (p PDFActionRemoteGoTo) Init() PDFActionRemoteGoTo
- func (p PDFActionRemoteGoTo) InitWithPageIndexAtPointFileURL(pageIndex uint, point corefoundation.CGPoint, url foundation.INSURL) PDFActionRemoteGoTo
- func (p PDFActionRemoteGoTo) PageIndex() uint
- func (p PDFActionRemoteGoTo) Point() corefoundation.CGPoint
- func (p PDFActionRemoteGoTo) SetPageIndex(value uint)
- func (p PDFActionRemoteGoTo) SetPoint(value corefoundation.CGPoint)
- func (p PDFActionRemoteGoTo) SetURL(value foundation.INSURL)
- func (p PDFActionRemoteGoTo) URL() foundation.INSURL
- type PDFActionRemoteGoToClass
- type PDFActionResetForm
- func (p PDFActionResetForm) Autorelease() PDFActionResetForm
- func (p PDFActionResetForm) Fields() []string
- func (p PDFActionResetForm) FieldsIncludedAreCleared() bool
- func (p PDFActionResetForm) Init() PDFActionResetForm
- func (p PDFActionResetForm) SetFields(value []string)
- func (p PDFActionResetForm) SetFieldsIncludedAreCleared(value bool)
- type PDFActionResetFormClass
- type PDFActionURL
- type PDFActionURLClass
- type PDFAnnotation
- func (p PDFAnnotation) Action() IPDFAction
- func (p PDFAnnotation) ActivatableTextField() bool
- func (p PDFAnnotation) AddBezierPath(path objectivec.IObject)
- func (p PDFAnnotation) Alignment() appkit.NSTextAlignment
- func (p PDFAnnotation) AllowsToggleToOff() bool
- func (p PDFAnnotation) AnnotationKeyValues() foundation.INSDictionary
- func (p PDFAnnotation) Autorelease() PDFAnnotation
- func (p PDFAnnotation) BackgroundColor() objc.ID
- func (p PDFAnnotation) Border() IPDFBorder
- func (p PDFAnnotation) Bounds() corefoundation.CGRect
- func (p PDFAnnotation) ButtonWidgetState() PDFWidgetCellState
- func (p PDFAnnotation) ButtonWidgetStateString() string
- func (p PDFAnnotation) Caption() string
- func (p PDFAnnotation) Choices() []string
- func (p PDFAnnotation) Color() objc.ID
- func (p PDFAnnotation) Comb() bool
- func (p PDFAnnotation) Contents() string
- func (p PDFAnnotation) Destination() IPDFDestination
- func (p PDFAnnotation) DrawWithBoxInContext(box PDFDisplayBox, context coregraphics.CGContextRef)
- func (p PDFAnnotation) EncodeWithCoder(coder foundation.INSCoder)
- func (p PDFAnnotation) EndLineStyle() PDFLineStyle
- func (p PDFAnnotation) EndPoint() corefoundation.CGPoint
- func (p PDFAnnotation) FieldName() string
- func (p PDFAnnotation) Font() objectivec.IObject
- func (p PDFAnnotation) FontColor() objc.ID
- func (p PDFAnnotation) HasAppearanceStream() bool
- func (p PDFAnnotation) Highlighted() bool
- func (p PDFAnnotation) IconType() PDFTextAnnotationIconType
- func (p PDFAnnotation) Init() PDFAnnotation
- func (p PDFAnnotation) InitWithBoundsForTypeWithProperties(bounds corefoundation.CGRect, annotationType PDFAnnotationSubtype, ...) PDFAnnotation
- func (p PDFAnnotation) InteriorColor() objc.ID
- func (p PDFAnnotation) IsPasswordField() bool
- func (p PDFAnnotation) ListChoice() bool
- func (p PDFAnnotation) MarkupType() PDFMarkupType
- func (p PDFAnnotation) MaximumLength() int
- func (p PDFAnnotation) ModificationDate() foundation.INSDate
- func (p PDFAnnotation) Multiline() bool
- func (p PDFAnnotation) Open() bool
- func (p PDFAnnotation) Page() IPDFPage
- func (p PDFAnnotation) Paths() []objc.ID
- func (p PDFAnnotation) Popup() IPDFAnnotation
- func (p PDFAnnotation) QuadrilateralPoints() []foundation.NSValue
- func (p PDFAnnotation) RadiosInUnison() bool
- func (p PDFAnnotation) ReadOnly() bool
- func (p PDFAnnotation) RemoveBezierPath(path objectivec.IObject)
- func (p PDFAnnotation) RemoveValueForAnnotationKey(key PDFAnnotationKey)
- func (p PDFAnnotation) SetAction(value IPDFAction)
- func (p PDFAnnotation) SetAlignment(value appkit.NSTextAlignment)
- func (p PDFAnnotation) SetAllowsToggleToOff(value bool)
- func (p PDFAnnotation) SetBackgroundColor(value objc.ID)
- func (p PDFAnnotation) SetBooleanForAnnotationKey(value bool, key PDFAnnotationKey) bool
- func (p PDFAnnotation) SetBorder(value IPDFBorder)
- func (p PDFAnnotation) SetBounds(value corefoundation.CGRect)
- func (p PDFAnnotation) SetButtonWidgetState(value PDFWidgetCellState)
- func (p PDFAnnotation) SetButtonWidgetStateString(value string)
- func (p PDFAnnotation) SetCaption(value string)
- func (p PDFAnnotation) SetChoices(value []string)
- func (p PDFAnnotation) SetColor(value objc.ID)
- func (p PDFAnnotation) SetComb(value bool)
- func (p PDFAnnotation) SetContents(value string)
- func (p PDFAnnotation) SetDestination(value IPDFDestination)
- func (p PDFAnnotation) SetEndLineStyle(value PDFLineStyle)
- func (p PDFAnnotation) SetEndPoint(value corefoundation.CGPoint)
- func (p PDFAnnotation) SetFieldName(value string)
- func (p PDFAnnotation) SetFont(value objectivec.IObject)
- func (p PDFAnnotation) SetFontColor(value objc.ID)
- func (p PDFAnnotation) SetHighlighted(value bool)
- func (p PDFAnnotation) SetIconType(value PDFTextAnnotationIconType)
- func (p PDFAnnotation) SetInteriorColor(value objc.ID)
- func (p PDFAnnotation) SetListChoice(value bool)
- func (p PDFAnnotation) SetMarkupType(value PDFMarkupType)
- func (p PDFAnnotation) SetMaximumLength(value int)
- func (p PDFAnnotation) SetModificationDate(value foundation.INSDate)
- func (p PDFAnnotation) SetMultiline(value bool)
- func (p PDFAnnotation) SetOpen(value bool)
- func (p PDFAnnotation) SetPage(value IPDFPage)
- func (p PDFAnnotation) SetPopup(value IPDFAnnotation)
- func (p PDFAnnotation) SetQuadrilateralPoints(value []foundation.NSValue)
- func (p PDFAnnotation) SetRadiosInUnison(value bool)
- func (p PDFAnnotation) SetReadOnly(value bool)
- func (p PDFAnnotation) SetRectForAnnotationKey(value corefoundation.CGRect, key PDFAnnotationKey) bool
- func (p PDFAnnotation) SetShouldDisplay(value bool)
- func (p PDFAnnotation) SetShouldPrint(value bool)
- func (p PDFAnnotation) SetStampName(value string)
- func (p PDFAnnotation) SetStartLineStyle(value PDFLineStyle)
- func (p PDFAnnotation) SetStartPoint(value corefoundation.CGPoint)
- func (p PDFAnnotation) SetType(value string)
- func (p PDFAnnotation) SetURL(value foundation.INSURL)
- func (p PDFAnnotation) SetUserName(value string)
- func (p PDFAnnotation) SetValueForAnnotationKey(value objectivec.IObject, key PDFAnnotationKey) bool
- func (p PDFAnnotation) SetValues(value []string)
- func (p PDFAnnotation) SetWidgetControlType(value PDFWidgetControlType)
- func (p PDFAnnotation) SetWidgetDefaultStringValue(value string)
- func (p PDFAnnotation) SetWidgetFieldType(value PDFAnnotationWidgetSubtype)
- func (p PDFAnnotation) SetWidgetStringValue(value string)
- func (p PDFAnnotation) ShouldDisplay() bool
- func (p PDFAnnotation) ShouldPrint() bool
- func (p PDFAnnotation) StampName() string
- func (p PDFAnnotation) StartLineStyle() PDFLineStyle
- func (p PDFAnnotation) StartPoint() corefoundation.CGPoint
- func (p PDFAnnotation) Type() string
- func (p PDFAnnotation) URL() foundation.INSURL
- func (p PDFAnnotation) UserName() string
- func (p PDFAnnotation) ValueForAnnotationKey(key PDFAnnotationKey) objectivec.IObject
- func (p PDFAnnotation) Values() []string
- func (p PDFAnnotation) WidgetControlType() PDFWidgetControlType
- func (p PDFAnnotation) WidgetDefaultStringValue() string
- func (p PDFAnnotation) WidgetFieldType() PDFAnnotationWidgetSubtype
- func (p PDFAnnotation) WidgetStringValue() string
- type PDFAnnotationClass
- type PDFAnnotationHighlightingMode
- type PDFAnnotationKey
- type PDFAnnotationLineEndingStyle
- type PDFAnnotationSubtype
- type PDFAnnotationTextIconType
- type PDFAnnotationWidgetSubtype
- type PDFAppearanceCharacteristics
- func (p PDFAppearanceCharacteristics) AppearanceCharacteristicsKeyValues() foundation.INSDictionary
- func (p PDFAppearanceCharacteristics) Autorelease() PDFAppearanceCharacteristics
- func (p PDFAppearanceCharacteristics) BackgroundColor() objc.ID
- func (p PDFAppearanceCharacteristics) BorderColor() objc.ID
- func (p PDFAppearanceCharacteristics) Caption() string
- func (p PDFAppearanceCharacteristics) ControlType() PDFWidgetControlType
- func (p PDFAppearanceCharacteristics) DownCaption() string
- func (p PDFAppearanceCharacteristics) FieldName() string
- func (p PDFAppearanceCharacteristics) Init() PDFAppearanceCharacteristics
- func (p PDFAppearanceCharacteristics) IsReadOnly() bool
- func (p PDFAppearanceCharacteristics) RolloverCaption() string
- func (p PDFAppearanceCharacteristics) Rotation() int
- func (p PDFAppearanceCharacteristics) SetBackgroundColor(value objc.ID)
- func (p PDFAppearanceCharacteristics) SetBorderColor(value objc.ID)
- func (p PDFAppearanceCharacteristics) SetCaption(value string)
- func (p PDFAppearanceCharacteristics) SetControlType(value PDFWidgetControlType)
- func (p PDFAppearanceCharacteristics) SetDownCaption(value string)
- func (p PDFAppearanceCharacteristics) SetFieldName(value string)
- func (p PDFAppearanceCharacteristics) SetIsReadOnly(value bool)
- func (p PDFAppearanceCharacteristics) SetRolloverCaption(value string)
- func (p PDFAppearanceCharacteristics) SetRotation(value int)
- func (p PDFAppearanceCharacteristics) SetWidgetDefaultStringValue(value string)
- func (p PDFAppearanceCharacteristics) SetWidgetFieldType(value PDFAnnotationWidgetSubtype)
- func (p PDFAppearanceCharacteristics) SetWidgetStringValue(value string)
- func (p PDFAppearanceCharacteristics) WidgetDefaultStringValue() string
- func (p PDFAppearanceCharacteristics) WidgetFieldType() PDFAnnotationWidgetSubtype
- func (p PDFAppearanceCharacteristics) WidgetStringValue() string
- type PDFAppearanceCharacteristicsClass
- type PDFAppearanceCharacteristicsKey
- type PDFAreaOfInterest
- type PDFBorder
- func (p PDFBorder) Alignment() appkit.NSTextAlignment
- func (p PDFBorder) Autorelease() PDFBorder
- func (p PDFBorder) Border() IPDFBorder
- func (p PDFBorder) BorderKeyValues() foundation.INSDictionary
- func (p PDFBorder) Bounds() corefoundation.CGRect
- func (p PDFBorder) Color() objc.ID
- func (p PDFBorder) Contents() string
- func (p PDFBorder) DashPattern() foundation.INSArray
- func (p PDFBorder) DrawInRect(rect corefoundation.CGRect)
- func (p PDFBorder) EncodeWithCoder(coder foundation.INSCoder)
- func (p PDFBorder) Font() objectivec.IObject
- func (p PDFBorder) FontColor() objc.ID
- func (p PDFBorder) HasAppearanceStream() bool
- func (p PDFBorder) Init() PDFBorder
- func (p PDFBorder) IsHighlighted() bool
- func (p PDFBorder) LineWidth() float64
- func (p PDFBorder) SetAlignment(value appkit.NSTextAlignment)
- func (p PDFBorder) SetBorder(value IPDFBorder)
- func (p PDFBorder) SetBounds(value corefoundation.CGRect)
- func (p PDFBorder) SetColor(value objc.ID)
- func (p PDFBorder) SetContents(value string)
- func (p PDFBorder) SetDashPattern(value foundation.INSArray)
- func (p PDFBorder) SetFont(value objectivec.IObject)
- func (p PDFBorder) SetFontColor(value objc.ID)
- func (p PDFBorder) SetHasAppearanceStream(value bool)
- func (p PDFBorder) SetIsHighlighted(value bool)
- func (p PDFBorder) SetLineWidth(value float64)
- func (p PDFBorder) SetStyle(value PDFBorderStyle)
- func (p PDFBorder) Style() PDFBorderStyle
- type PDFBorderClass
- type PDFBorderKey
- type PDFBorderStyle
- type PDFDestination
- func (p PDFDestination) Action() IPDFAction
- func (p PDFDestination) Autorelease() PDFDestination
- func (p PDFDestination) Compare(destination IPDFDestination) foundation.NSComparisonResult
- func (p PDFDestination) CurrentDestination() IPDFDestination
- func (p PDFDestination) Init() PDFDestination
- func (p PDFDestination) InitWithPageAtPoint(page IPDFPage, point corefoundation.CGPoint) PDFDestination
- func (p PDFDestination) KPDFDestinationUnspecifiedValue() float64
- func (p PDFDestination) ModificationDate() foundation.INSDate
- func (p PDFDestination) Page() IPDFPage
- func (p PDFDestination) Point() corefoundation.CGPoint
- func (p PDFDestination) SetAction(value IPDFAction)
- func (p PDFDestination) SetCurrentDestination(value IPDFDestination)
- func (p PDFDestination) SetModificationDate(value foundation.INSDate)
- func (p PDFDestination) SetType(value string)
- func (p PDFDestination) SetUserName(value string)
- func (p PDFDestination) SetZoom(value float64)
- func (p PDFDestination) Type() string
- func (p PDFDestination) UserName() string
- func (p PDFDestination) Zoom() float64
- type PDFDestinationClass
- type PDFDisplayBox
- type PDFDisplayDirection
- type PDFDisplayMode
- type PDFDocument
- func (p PDFDocument) AccessPermissions() PDFAccessPermissions
- func (p PDFDocument) AllowsCommenting() bool
- func (p PDFDocument) AllowsContentAccessibility() bool
- func (p PDFDocument) AllowsCopying() bool
- func (p PDFDocument) AllowsDocumentAssembly() bool
- func (p PDFDocument) AllowsDocumentChanges() bool
- func (p PDFDocument) AllowsFormFieldEntry() bool
- func (p PDFDocument) AllowsPrinting() bool
- func (p PDFDocument) Autorelease() PDFDocument
- func (p PDFDocument) BeginFindStringWithOptions(string_ string, options foundation.NSStringCompareOptions)
- func (p PDFDocument) BeginFindStringsWithOptions(strings []string, options foundation.NSStringCompareOptions)
- func (p PDFDocument) CancelFindString()
- func (p PDFDocument) DataRepresentation() foundation.INSData
- func (p PDFDocument) DataRepresentationWithOptions(options foundation.INSDictionary) foundation.INSData
- func (p PDFDocument) Delegate() PDFDocumentDelegate
- func (p PDFDocument) DocumentAttributes() foundation.INSDictionary
- func (p PDFDocument) DocumentRef() coregraphics.CGPDFDocumentRef
- func (p PDFDocument) DocumentURL() foundation.INSURL
- func (p PDFDocument) ExchangePageAtIndexWithPageAtIndex(indexA uint, indexB uint)
- func (p PDFDocument) FindStringFromSelectionWithOptions(string_ string, selection IPDFSelection, ...) IPDFSelection
- func (p PDFDocument) FindStringWithOptions(string_ string, options foundation.NSStringCompareOptions) []PDFSelection
- func (p PDFDocument) IndexForPage(page IPDFPage) uint
- func (p PDFDocument) Init() PDFDocument
- func (p PDFDocument) InitWithData(data foundation.INSData) PDFDocument
- func (p PDFDocument) InitWithURL(url foundation.INSURL) PDFDocument
- func (p PDFDocument) InsertPageAtIndex(page IPDFPage, index uint)
- func (p PDFDocument) IsEncrypted() bool
- func (p PDFDocument) IsFinding() bool
- func (p PDFDocument) IsLocked() bool
- func (p PDFDocument) MajorVersion() int
- func (p PDFDocument) MinorVersion() int
- func (p PDFDocument) OutlineItemForSelection(selection IPDFSelection) IPDFOutline
- func (p PDFDocument) OutlineRoot() IPDFOutline
- func (p PDFDocument) PageAtIndex(index uint) IPDFPage
- func (p PDFDocument) PageClass() objc.Class
- func (p PDFDocument) PageCount() uint
- func (p PDFDocument) PermissionsStatus() PDFDocumentPermissions
- func (p PDFDocument) PrintOperationForPrintInfoScalingModeAutoRotate(printInfo appkit.NSPrintInfo, scaleMode PDFPrintScalingMode, doRotate bool) appkit.NSPrintOperation
- func (p PDFDocument) RemovePageAtIndex(index uint)
- func (p PDFDocument) SelectionForEntireDocument() IPDFSelection
- func (p PDFDocument) SelectionFromPageAtCharacterIndexToPageAtCharacterIndex(startPage IPDFPage, startCharacter uint, endPage IPDFPage, endCharacter uint) IPDFSelection
- func (p PDFDocument) SelectionFromPageAtPointToPageAtPoint(startPage IPDFPage, startPoint corefoundation.CGPoint, endPage IPDFPage, ...) IPDFSelection
- func (p PDFDocument) SelectionFromPageAtPointToPageAtPointWithGranularity(startPage IPDFPage, startPoint corefoundation.CGPoint, endPage IPDFPage, ...) IPDFSelection
- func (p PDFDocument) SetDelegate(value PDFDocumentDelegate)
- func (p PDFDocument) SetDocumentAttributes(value foundation.INSDictionary)
- func (p PDFDocument) SetOutlineRoot(value IPDFOutline)
- func (p PDFDocument) String() string
- func (p PDFDocument) UnlockWithPassword(password string) bool
- func (p PDFDocument) WriteToFile(path string) bool
- func (p PDFDocument) WriteToFileWithOptions(path string, options foundation.INSDictionary) bool
- func (p PDFDocument) WriteToURL(url foundation.INSURL) bool
- func (p PDFDocument) WriteToURLWithOptions(url foundation.INSURL, options foundation.INSDictionary) bool
- type PDFDocumentAttribute
- type PDFDocumentClass
- type PDFDocumentDelegate
- type PDFDocumentDelegateConfig
- type PDFDocumentDelegateObject
- func (o PDFDocumentDelegateObject) BaseObject() objectivec.Object
- func (o PDFDocumentDelegateObject) ClassForAnnotationType(annotationType string) objc.Class
- func (o PDFDocumentDelegateObject) ClassForPage() objc.Class
- func (o PDFDocumentDelegateObject) DidMatchString(instance IPDFSelection)
- func (o PDFDocumentDelegateObject) DocumentDidBeginDocumentFind(notification foundation.NSNotification)
- func (o PDFDocumentDelegateObject) DocumentDidBeginPageFind(notification foundation.NSNotification)
- func (o PDFDocumentDelegateObject) DocumentDidEndDocumentFind(notification foundation.NSNotification)
- func (o PDFDocumentDelegateObject) DocumentDidEndPageFind(notification foundation.NSNotification)
- func (o PDFDocumentDelegateObject) DocumentDidFindMatch(notification foundation.NSNotification)
- func (o PDFDocumentDelegateObject) DocumentDidUnlock(notification foundation.NSNotification)
- type PDFDocumentPermissions
- type PDFDocumentWriteOption
- type PDFInterpolationQuality
- type PDFLineStyle
- type PDFMarkupType
- type PDFOutline
- func (p PDFOutline) Action() IPDFAction
- func (p PDFOutline) Autorelease() PDFOutline
- func (p PDFOutline) ChildAtIndex(index uint) IPDFOutline
- func (p PDFOutline) Destination() IPDFDestination
- func (p PDFOutline) Document() IPDFDocument
- func (p PDFOutline) Index() uint
- func (p PDFOutline) Init() PDFOutline
- func (p PDFOutline) InsertChildAtIndex(child IPDFOutline, index uint)
- func (p PDFOutline) IsOpen() bool
- func (p PDFOutline) Label() string
- func (p PDFOutline) NumberOfChildren() uint
- func (p PDFOutline) Parent() IPDFOutline
- func (p PDFOutline) RemoveFromParent()
- func (p PDFOutline) SetAction(value IPDFAction)
- func (p PDFOutline) SetDestination(value IPDFDestination)
- func (p PDFOutline) SetIsOpen(value bool)
- func (p PDFOutline) SetLabel(value string)
- type PDFOutlineClass
- type PDFPage
- func (p PDFPage) AddAnnotation(annotation IPDFAnnotation)
- func (p PDFPage) AnnotationAtPoint(point corefoundation.CGPoint) IPDFAnnotation
- func (p PDFPage) Annotations() []PDFAnnotation
- func (p PDFPage) AttributedString() foundation.NSAttributedString
- func (p PDFPage) Autorelease() PDFPage
- func (p PDFPage) BoundsForBox(box PDFDisplayBox) corefoundation.CGRect
- func (p PDFPage) CharacterBoundsAtIndex(index int) corefoundation.CGRect
- func (p PDFPage) CharacterIndexAtPoint(point corefoundation.CGPoint) int
- func (p PDFPage) DataRepresentation() foundation.INSData
- func (p PDFPage) DisplaysAnnotations() bool
- func (p PDFPage) Document() IPDFDocument
- func (p PDFPage) DrawWithBoxToContext(box PDFDisplayBox, context coregraphics.CGContextRef)
- func (p PDFPage) Init() PDFPage
- func (p PDFPage) InitWithImage(image objectivec.IObject) PDFPage
- func (p PDFPage) InitWithImageOptions(image objectivec.IObject, options foundation.INSDictionary) PDFPage
- func (p PDFPage) Label() string
- func (p PDFPage) NumberOfCharacters() uint
- func (p PDFPage) PageRef() coregraphics.CGPDFPageRef
- func (p PDFPage) RemoveAnnotation(annotation IPDFAnnotation)
- func (p PDFPage) Rotation() int
- func (p PDFPage) SelectionForLineAtPoint(point corefoundation.CGPoint) IPDFSelection
- func (p PDFPage) SelectionForRange(range_ foundation.NSRange) IPDFSelection
- func (p PDFPage) SelectionForRect(rect corefoundation.CGRect) IPDFSelection
- func (p PDFPage) SelectionForWordAtPoint(point corefoundation.CGPoint) IPDFSelection
- func (p PDFPage) SelectionFromPointToPoint(startPoint corefoundation.CGPoint, endPoint corefoundation.CGPoint) IPDFSelection
- func (p PDFPage) SetBoundsForBox(bounds corefoundation.CGRect, box PDFDisplayBox)
- func (p PDFPage) SetDisplaysAnnotations(value bool)
- func (p PDFPage) SetRotation(value int)
- func (p PDFPage) String() string
- func (p PDFPage) ThumbnailOfSizeForBox(size corefoundation.CGSize, box PDFDisplayBox) objc.ID
- func (p PDFPage) TransformContextForBox(context coregraphics.CGContextRef, box PDFDisplayBox)
- func (p PDFPage) TransformForBox(box PDFDisplayBox) corefoundation.CGAffineTransform
- type PDFPageClass
- type PDFPageImageInitializationOption
- type PDFPageOverlayViewProvider
- type PDFPageOverlayViewProviderObject
- func (o PDFPageOverlayViewProviderObject) BaseObject() objectivec.Object
- func (o PDFPageOverlayViewProviderObject) PdfViewOverlayViewForPage(view IPDFView, page IPDFPage) objc.ID
- func (o PDFPageOverlayViewProviderObject) PdfViewWillDisplayOverlayViewForPage(pdfView IPDFView, overlayView objectivec.IObject, page IPDFPage)
- func (o PDFPageOverlayViewProviderObject) PdfViewWillEndDisplayingOverlayViewForPage(pdfView IPDFView, overlayView objectivec.IObject, page IPDFPage)
- type PDFPrintScalingMode
- type PDFSelection
- func (p PDFSelection) AddSelection(selection IPDFSelection)
- func (p PDFSelection) AddSelections(selections []PDFSelection)
- func (p PDFSelection) AttributedString() foundation.NSAttributedString
- func (p PDFSelection) Autorelease() PDFSelection
- func (p PDFSelection) BoundsForPage(page IPDFPage) corefoundation.CGRect
- func (p PDFSelection) Color() objc.ID
- func (p PDFSelection) DrawForPageActive(page IPDFPage, active bool)
- func (p PDFSelection) DrawForPageWithBoxActive(page IPDFPage, box PDFDisplayBox, active bool)
- func (p PDFSelection) ExtendSelectionAtEnd(succeed int)
- func (p PDFSelection) ExtendSelectionAtStart(precede int)
- func (p PDFSelection) ExtendSelectionForLineBoundaries()
- func (p PDFSelection) Init() PDFSelection
- func (p PDFSelection) InitWithDocument(document IPDFDocument) PDFSelection
- func (p PDFSelection) NumberOfTextRangesOnPage(page IPDFPage) uint
- func (p PDFSelection) Pages() []PDFPage
- func (p PDFSelection) RangeAtIndexOnPage(index uint, page IPDFPage) foundation.NSRange
- func (p PDFSelection) SelectionsByLine() []PDFSelection
- func (p PDFSelection) SetColor(value objc.ID)
- func (p PDFSelection) String() string
- type PDFSelectionClass
- type PDFSelectionGranularity
- type PDFTextAnnotationIconType
- type PDFThumbnailLayoutMode
- type PDFThumbnailView
- func (p PDFThumbnailView) AllowsDragging() bool
- func (p PDFThumbnailView) AllowsMultipleSelection() bool
- func (p PDFThumbnailView) Autorelease() PDFThumbnailView
- func (p PDFThumbnailView) BackgroundColor() objc.ID
- func (p PDFThumbnailView) Init() PDFThumbnailView
- func (p PDFThumbnailView) LabelFont() appkit.NSFont
- func (p PDFThumbnailView) MaximumNumberOfColumns() uint
- func (p PDFThumbnailView) PDFView() IPDFView
- func (p PDFThumbnailView) SelectedPages() []PDFPage
- func (p PDFThumbnailView) SetAllowsDragging(value bool)
- func (p PDFThumbnailView) SetAllowsMultipleSelection(value bool)
- func (p PDFThumbnailView) SetBackgroundColor(value objc.ID)
- func (p PDFThumbnailView) SetLabelFont(value appkit.NSFont)
- func (p PDFThumbnailView) SetMaximumNumberOfColumns(value uint)
- func (p PDFThumbnailView) SetPDFView(value IPDFView)
- func (p PDFThumbnailView) SetThumbnailSize(value corefoundation.CGSize)
- func (p PDFThumbnailView) ThumbnailSize() corefoundation.CGSize
- type PDFThumbnailViewClass
- type PDFView
- func (p PDFView) AcceptsDraggedFiles() bool
- func (p PDFView) AnnotationsChangedOnPage(page IPDFPage)
- func (p PDFView) AreaOfInterestForMouse(event objectivec.IObject) PDFAreaOfInterest
- func (p PDFView) AreaOfInterestForPoint(cursorLocation corefoundation.CGPoint) PDFAreaOfInterest
- func (p PDFView) AutoScales() bool
- func (p PDFView) Autorelease() PDFView
- func (p PDFView) BackgroundColor() objc.ID
- func (p PDFView) CanGoBack() bool
- func (p PDFView) CanGoForward() bool
- func (p PDFView) CanGoToFirstPage() bool
- func (p PDFView) CanGoToLastPage() bool
- func (p PDFView) CanGoToNextPage() bool
- func (p PDFView) CanGoToPreviousPage() bool
- func (p PDFView) CanZoomIn() bool
- func (p PDFView) CanZoomOut() bool
- func (p PDFView) ClearSelection()
- func (p PDFView) ConvertPointFromPage(point corefoundation.CGPoint, page IPDFPage) corefoundation.CGPoint
- func (p PDFView) ConvertPointToPage(point corefoundation.CGPoint, page IPDFPage) corefoundation.CGPoint
- func (p PDFView) ConvertRectFromPage(rect corefoundation.CGRect, page IPDFPage) corefoundation.CGRect
- func (p PDFView) ConvertRectToPage(rect corefoundation.CGRect, page IPDFPage) corefoundation.CGRect
- func (p PDFView) Copy(sender objectivec.IObject)
- func (p PDFView) CurrentDestination() IPDFDestination
- func (p PDFView) CurrentPage() IPDFPage
- func (p PDFView) CurrentSelection() IPDFSelection
- func (p PDFView) Delegate() PDFViewDelegate
- func (p PDFView) DisplayBox() PDFDisplayBox
- func (p PDFView) DisplayDirection() PDFDisplayDirection
- func (p PDFView) DisplayMode() PDFDisplayMode
- func (p PDFView) DisplaysAsBook() bool
- func (p PDFView) DisplaysPageBreaks() bool
- func (p PDFView) DisplaysRTL() bool
- func (p PDFView) Document() IPDFDocument
- func (p PDFView) DocumentView() objc.ID
- func (p PDFView) DrawPagePostToContext(page IPDFPage, context coregraphics.CGContextRef)
- func (p PDFView) DrawPageToContext(page IPDFPage, context coregraphics.CGContextRef)
- func (p PDFView) EnableDataDetectors() bool
- func (p PDFView) GoBack(sender objectivec.IObject)
- func (p PDFView) GoForward(sender objectivec.IObject)
- func (p PDFView) GoToDestination(destination IPDFDestination)
- func (p PDFView) GoToFirstPage(sender objectivec.IObject)
- func (p PDFView) GoToLastPage(sender objectivec.IObject)
- func (p PDFView) GoToNextPage(sender objectivec.IObject)
- func (p PDFView) GoToPage(page IPDFPage)
- func (p PDFView) GoToPreviousPage(sender objectivec.IObject)
- func (p PDFView) GoToRectOnPage(rect corefoundation.CGRect, page IPDFPage)
- func (p PDFView) GoToSelection(selection IPDFSelection)
- func (p PDFView) HighlightedSelections() []PDFSelection
- func (p PDFView) InMarkupMode() bool
- func (p PDFView) Init() PDFView
- func (p PDFView) InterpolationQuality() PDFInterpolationQuality
- func (p PDFView) LayoutDocumentView()
- func (p PDFView) MaxScaleFactor() float64
- func (p PDFView) MinScaleFactor() float64
- func (p PDFView) PageBreakMargins() objectivec.IObject
- func (p PDFView) PageForPointNearest(point corefoundation.CGPoint, nearest bool) IPDFPage
- func (p PDFView) PageOverlayViewProvider() PDFPageOverlayViewProvider
- func (p PDFView) PageShadowsEnabled() bool
- func (p PDFView) PerformAction(action IPDFAction)
- func (p PDFView) PrintWithInfoAutoRotate(printInfo appkit.NSPrintInfo, doRotate bool)
- func (p PDFView) PrintWithInfoAutoRotatePageScaling(printInfo appkit.NSPrintInfo, doRotate bool, scale PDFPrintScalingMode)
- func (p PDFView) RowSizeForPage(page IPDFPage) corefoundation.CGSize
- func (p PDFView) ScaleFactor() float64
- func (p PDFView) ScaleFactorForSizeToFit() float64
- func (p PDFView) ScrollSelectionToVisible(sender objectivec.IObject)
- func (p PDFView) SetAcceptsDraggedFiles(value bool)
- func (p PDFView) SetAutoScales(value bool)
- func (p PDFView) SetBackgroundColor(value objc.ID)
- func (p PDFView) SetCurrentSelection(value IPDFSelection)
- func (p PDFView) SetCurrentSelectionAnimate(selection IPDFSelection, animate bool)
- func (p PDFView) SetCursorForAreaOfInterest(area PDFAreaOfInterest)
- func (p PDFView) SetDelegate(value PDFViewDelegate)
- func (p PDFView) SetDisplayBox(value PDFDisplayBox)
- func (p PDFView) SetDisplayDirection(value PDFDisplayDirection)
- func (p PDFView) SetDisplayMode(value PDFDisplayMode)
- func (p PDFView) SetDisplaysAsBook(value bool)
- func (p PDFView) SetDisplaysPageBreaks(value bool)
- func (p PDFView) SetDisplaysRTL(value bool)
- func (p PDFView) SetDocument(value IPDFDocument)
- func (p PDFView) SetEnableDataDetectors(value bool)
- func (p PDFView) SetHighlightedSelections(value []PDFSelection)
- func (p PDFView) SetInMarkupMode(value bool)
- func (p PDFView) SetInterpolationQuality(value PDFInterpolationQuality)
- func (p PDFView) SetMaxScaleFactor(value float64)
- func (p PDFView) SetMinScaleFactor(value float64)
- func (p PDFView) SetPageBreakMargins(value objectivec.IObject)
- func (p PDFView) SetPageOverlayViewProvider(value PDFPageOverlayViewProvider)
- func (p PDFView) SetPageShadowsEnabled(value bool)
- func (p PDFView) SetScaleFactor(value float64)
- func (p PDFView) VisiblePages() []PDFPage
- func (p PDFView) ZoomIn(sender objectivec.IObject)
- func (p PDFView) ZoomOut(sender objectivec.IObject)
- type PDFViewClass
- type PDFViewDelegate
- type PDFViewDelegateConfig
- type PDFViewDelegateObject
- func (o PDFViewDelegateObject) BaseObject() objectivec.Object
- func (o PDFViewDelegateObject) PDFViewOpenPDFForRemoteGoToAction(sender IPDFView, action IPDFActionRemoteGoTo)
- func (o PDFViewDelegateObject) PDFViewParentViewController() objc.ID
- func (o PDFViewDelegateObject) PDFViewPerformFind(sender IPDFView)
- func (o PDFViewDelegateObject) PDFViewPerformGoToPage(sender IPDFView)
- func (o PDFViewDelegateObject) PDFViewPerformPrint(sender IPDFView)
- func (o PDFViewDelegateObject) PDFViewPrintJobTitle(sender IPDFView) string
- func (o PDFViewDelegateObject) PDFViewWillChangeScaleFactorToScale(sender IPDFView, scaler float64) float64
- func (o PDFViewDelegateObject) PDFViewWillClickOnLinkWithURL(sender IPDFView, url foundation.INSURL)
- type PDFWidgetCellState
- type PDFWidgetControlType
Constants ¶
This section is empty.
Variables ¶
var ( // PDFDocumentDidBeginFindNotification is a notification that the [beginFindString(_:withOptions:)] or [findString(_:withOptions:)] method begins finding. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidBeginFindNotification PDFDocumentDidBeginFindNotification foundation.NSNotificationName // PDFDocumentDidBeginPageFindNotification is a notification that a find operation begins working on a new page of a document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidBeginPageFindNotification PDFDocumentDidBeginPageFindNotification foundation.NSNotificationName // PDFDocumentDidBeginPageWriteNotification is a notification that a write operation begins working on a page in a document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidBeginPageWriteNotification PDFDocumentDidBeginPageWriteNotification foundation.NSNotificationName // PDFDocumentDidBeginWriteNotification is a notification that a write operation begins working on a document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidBeginWriteNotification PDFDocumentDidBeginWriteNotification foundation.NSNotificationName // PDFDocumentDidEndFindNotification is a notification that the [beginFindString(_:withOptions:)] or [findString(_:withOptions:)] method returns. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidEndFindNotification PDFDocumentDidEndFindNotification foundation.NSNotificationName // PDFDocumentDidEndPageFindNotification is a notification that a find operation finishes working on a page in a document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidEndPageFindNotification PDFDocumentDidEndPageFindNotification foundation.NSNotificationName // PDFDocumentDidEndPageWriteNotification is a notification that a write operation finishes working on a page in a document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidEndPageWriteNotification PDFDocumentDidEndPageWriteNotification foundation.NSNotificationName // PDFDocumentDidEndWriteNotification is a notification that a write operation finishes working on a document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidEndWriteNotification PDFDocumentDidEndWriteNotification foundation.NSNotificationName // PDFDocumentDidFindMatchNotification is a notification that a string match is found in a document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidFindMatchNotification PDFDocumentDidFindMatchNotification foundation.NSNotificationName // PDFDocumentDidUnlockNotification is a notification that a document unlocks after a [unlock(withPassword:)] message. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDidUnlockNotification PDFDocumentDidUnlockNotification foundation.NSNotificationName // PDFViewAnnotationHitNotification is a notification posted when the user clicks on an annotation. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewAnnotationHitNotification PDFViewAnnotationHitNotification foundation.NSNotificationName // PDFViewAnnotationWillHitNotification is a notification posted before the user clicks an annotation. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewAnnotationWillHitNotification PDFViewAnnotationWillHitNotification foundation.NSNotificationName // PDFViewChangedHistoryNotification is a notification posted when the page history changes. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewChangedHistoryNotification PDFViewChangedHistoryNotification foundation.NSNotificationName // PDFViewCopyPermissionNotification is a notification posted when the user attempts to copy to the pasteboard without the appropriate permissions. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewCopyPermissionNotification PDFViewCopyPermissionNotification foundation.NSNotificationName // PDFViewDisplayBoxChangedNotification is a notification posted when the display box has changed. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewDisplayBoxChangedNotification PDFViewDisplayBoxChangedNotification foundation.NSNotificationName // PDFViewDisplayModeChangedNotification is a notification posted when the display mode has changed. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewDisplayModeChangedNotification PDFViewDisplayModeChangedNotification foundation.NSNotificationName // PDFViewDocumentChangedNotification is a notification posted when a new document is associated with the view. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewDocumentChangedNotification PDFViewDocumentChangedNotification foundation.NSNotificationName // PDFViewPageChangedNotification is a notification posted when a new page becomes the current page. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewPageChangedNotification PDFViewPageChangedNotification foundation.NSNotificationName // PDFViewPrintPermissionNotification is a notification posted when the user attempts to print without the appropriate permissions. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewPrintPermissionNotification PDFViewPrintPermissionNotification foundation.NSNotificationName // PDFViewScaleChangedNotification is a notification posted when the scale factor changes. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewScaleChangedNotification PDFViewScaleChangedNotification foundation.NSNotificationName // PDFViewSelectionChangedNotification is a notification posted when the current selection has changed. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewSelectionChangedNotification PDFViewSelectionChangedNotification foundation.NSNotificationName // PDFViewVisiblePagesChangedNotification is a notification posted when the visible pages have changed. // // See: https://developer.apple.com/documentation/PDFKit/PDFViewVisiblePagesChangedNotification PDFViewVisiblePagesChangedNotification foundation.NSNotificationName )
var ( // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentFoundSelectionKey PDFDocumentFoundSelectionKey string // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentPageIndexKey PDFDocumentPageIndexKey string // See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailViewDocumentEditedNotification PDFThumbnailViewDocumentEditedNotification string )
var PDFAnnotationHighlightingModes struct { // Invert: A highlight mode that inverts the content of the annotation. Invert PDFAnnotationHighlightingMode // None: A highlight mode that doesn’t change the appearance of the annotation. None PDFAnnotationHighlightingMode // Outline: A highlight mode that inverts the annotation’s border. Outline PDFAnnotationHighlightingMode // Push: A highlight mode that renders a pressed appearance for the annotation. Push PDFAnnotationHighlightingMode }
PDFAnnotationHighlightingModes provides typed accessors for PDFAnnotationHighlightingMode constants.
var PDFAnnotationKeys struct { // Action: A dictionary or PDF action object that represents an action to take, such as when the user clicks or taps a button. Action PDFAnnotationKey // AdditionalActions: A dictionary or PDF action object that represents additional actions an annotation can perform, such as when it receives input focus. AdditionalActions PDFAnnotationKey // AppearanceDictionary: A dictionary that contains properties for controlling the annotation’s visual appearance. AppearanceDictionary PDFAnnotationKey // AppearanceState: A string that specifies the appearance stream for the annotation. AppearanceState PDFAnnotationKey // Border: An array of integers or border objects that describes the border of the annotation. Border PDFAnnotationKey // BorderStyle: A dictionary that contains the properties of the annotation’s border. BorderStyle PDFAnnotationKey // Color: An array of floats or a color object that specifies the annotation’s color. Color PDFAnnotationKey // Contents: The text that the annotation displays or represents. Contents PDFAnnotationKey // Date: The date, or string representation of a date, of the annotation’s most recent modification. Date PDFAnnotationKey // DefaultAppearance: A string value a free text annotation uses to format the text. DefaultAppearance PDFAnnotationKey // Destination: An array, name, or string that represents the destination of an action. Destination PDFAnnotationKey // Flags: An integer value that specifies flags for the annotation. Flags PDFAnnotationKey // HighlightingMode: A string value that defines the way an annotation highlights when the user activates it, such as when clicking or tapping a link. HighlightingMode PDFAnnotationKey // IconName: A string value that specifies the name of an icon for a text or stamp annotation. IconName PDFAnnotationKey // Inklist: An array of arrays that represents stroked paths. Inklist PDFAnnotationKey // InteriorColor: An array of floating point values or a PDF color object that annotations use to fill interior space, such as line endings, squares, or circles. InteriorColor PDFAnnotationKey // LineEndingStyles: An array of string values that specifies the styles to use for the ends of lines. LineEndingStyles PDFAnnotationKey // LinePoints: An array of floating point values that specifies the starting and ending points, in page-space coordinates, of a line. LinePoints PDFAnnotationKey // Name: A string that uniquely identifies the annotation among all annotations on the same page. Name PDFAnnotationKey // Open: A Boolean value that specifies whether the pop-up is in an opened state, showing its text content, or in a closed state and showing an icon. Open PDFAnnotationKey // Page: A dictionary or PDF page object that includes the annotation. Page PDFAnnotationKey // Parent: A dictionary or annotation object that a pop-up or widget belongs to. Parent PDFAnnotationKey // Popup: A dictionary or annotation object that specifies the annotation to pop up for text entry or editing. Popup PDFAnnotationKey // QuadPoints: An array of floating point values that specifies a rectangular region of a page. QuadPoints PDFAnnotationKey // Quadding: An integer value that specifies left, right, or center justification. Quadding PDFAnnotationKey // Rect: The rectangle that the annotation occupies on the page, in page-space coordinates. Rect PDFAnnotationKey // Subtype: The type of annotation that the entries in a dictionary describe. Subtype PDFAnnotationKey // TextLabel: A string that represents the title of the annotation. TextLabel PDFAnnotationKey // WidgetAppearanceDictionary: A dictionary or appearance characteristic object that contains properties for controlling the widget’s visual appearance. WidgetAppearanceDictionary PDFAnnotationKey // WidgetBackgroundColor: An array of floating point values or a PDF color object that specifies the widget’s background color. WidgetBackgroundColor PDFAnnotationKey // WidgetBorderColor: An array of floating point values or a PDF color object that specifies the widget’s border color. WidgetBorderColor PDFAnnotationKey // WidgetCaption: A string that a push button widget displays when it isn’t in a pressed state. WidgetCaption PDFAnnotationKey // WidgetDefaultValue: A default value for the widget. WidgetDefaultValue PDFAnnotationKey // WidgetDownCaption: A string that a push button widgets displays when it’s in a pressed state. WidgetDownCaption PDFAnnotationKey // WidgetFieldFlags: An integer value that specifies flags for a widget. WidgetFieldFlags PDFAnnotationKey // WidgetFieldType: A string that specifies the type of widget, such as button, checkbox, or signature field. WidgetFieldType PDFAnnotationKey // WidgetMaxLen: An integer value that specifies the maximum length of a text field, in characters. WidgetMaxLen PDFAnnotationKey // WidgetOptions: An array that specifies the options to present in radio buttons or choice lists. WidgetOptions PDFAnnotationKey // WidgetRolloverCaption: A string that push button widgets display when the pointer is over the button, but not clicking it. WidgetRolloverCaption PDFAnnotationKey // WidgetRotation: An integer value that specifies the rotation of the widget. WidgetRotation PDFAnnotationKey // WidgetTextLabelUI: A user-visible alternative field name that identifies the widget, typically for accessibility purposes. WidgetTextLabelUI PDFAnnotationKey // WidgetValue: The widget’s value, typically for text and choice widgets. WidgetValue PDFAnnotationKey }
PDFAnnotationKeys provides typed accessors for PDFAnnotationKey constants.
var PDFAnnotationLineEndingStyles struct { // Circle: A style that displays a circle line ending and fills it with the annotation’s interior color. Circle PDFAnnotationLineEndingStyle // ClosedArrow: A style that displays a closed arrowhead line ending and fills it with the annotation’s interior color. ClosedArrow PDFAnnotationLineEndingStyle Diamond PDFAnnotationLineEndingStyle None PDFAnnotationLineEndingStyle // OpenArrow: A style that displays an open arrowhead line ending. OpenArrow PDFAnnotationLineEndingStyle // Square: A style that displays a square line ending and fills it with the annotation’s interior color. Square PDFAnnotationLineEndingStyle }
PDFAnnotationLineEndingStyles provides typed accessors for PDFAnnotationLineEndingStyle constants.
var PDFAnnotationSubtypes struct { // Circle: An annotation that renders a circle shape. Circle PDFAnnotationSubtype // FreeText: An annotation that displays an editable text field. FreeText PDFAnnotationSubtype // Highlight: An annotation that highlights text. Highlight PDFAnnotationSubtype // Ink: An annotation that represents a freehand scribble. Ink PDFAnnotationSubtype // Line: An annotation that displays a single straight line. Line PDFAnnotationSubtype // Link: An annotation that provides a hyperlink to a location in the document, or an action to perform when the user clicks or taps it. Link PDFAnnotationSubtype // Popup: An annotation that displays text in a pop-up window for entry and editing. Popup PDFAnnotationSubtype // Square: An annotation that displays a square shape. Square PDFAnnotationSubtype // Stamp: An annotation that displays text or a graphic as if a rubber stamp imprints it on the page. Stamp PDFAnnotationSubtype // StrikeOut: An annotation that strikes out text. StrikeOut PDFAnnotationSubtype // Text: An annotation that displays a collapsible note that contains text. Text PDFAnnotationSubtype // Underline: An annotation that underlines text. Underline PDFAnnotationSubtype // Widget: An annotation that displays interactive form elements, including text or signature fields, radio buttons, checkboxes, push buttons, pop-ups, and tables. Widget PDFAnnotationSubtype }
PDFAnnotationSubtypes provides typed accessors for PDFAnnotationSubtype constants.
var PDFAnnotationTextIconTypes struct { // Comment: An icon that represents a comment. Comment PDFAnnotationTextIconType // Help: An icon that indicates help information is available. Help PDFAnnotationTextIconType // Insert: An icon that represents an insertion command. Insert PDFAnnotationTextIconType // Key: An icon that represents a key. Key PDFAnnotationTextIconType // NewParagraph: An icon that represents a new paragraph. NewParagraph PDFAnnotationTextIconType // Note: An icon that represents a note. Note PDFAnnotationTextIconType // Paragraph: An icon that represents a paragraph. Paragraph PDFAnnotationTextIconType }
PDFAnnotationTextIconTypes provides typed accessors for PDFAnnotationTextIconType constants.
var PDFAnnotationWidgetSubtypes struct { // Button: A button widget type, including push buttons, checkboxes, and radio buttons. Button PDFAnnotationWidgetSubtype // Choice: A type that presents a list of choices the user can choose from. Choice PDFAnnotationWidgetSubtype // Signature: A digital signature widget type. Signature PDFAnnotationWidgetSubtype // Text: A text field the user can type text in. Text PDFAnnotationWidgetSubtype }
PDFAnnotationWidgetSubtypes provides typed accessors for PDFAnnotationWidgetSubtype constants.
var PDFAppearanceCharacteristicsKeys struct { // BackgroundColor: The background color of the widget annotation. BackgroundColor PDFAppearanceCharacteristicsKey // BorderColor: The border color of the widget annotation. BorderColor PDFAppearanceCharacteristicsKey // Caption: The text that the button widget annotation displays when the user isn’t interacting with it. Caption PDFAppearanceCharacteristicsKey // DownCaption: The text that the button widget annotation displays when the user holds down on it. DownCaption PDFAppearanceCharacteristicsKey // RolloverCaption: The text that the button widget annotation displays when the user hovers the pointer over it. RolloverCaption PDFAppearanceCharacteristicsKey // Rotation: The number of degrees, in multiples of 90, that the widget annotation rotates counterclockwise relative to the page. Rotation PDFAppearanceCharacteristicsKey }
PDFAppearanceCharacteristicsKeys provides typed accessors for PDFAppearanceCharacteristicsKey constants.
var PDFBorderKeys struct { DashPattern PDFBorderKey LineWidth PDFBorderKey Style PDFBorderKey }
PDFBorderKeys provides typed accessors for PDFBorderKey constants.
var PDFPageImageInitializationOptions struct { CompressionQuality PDFPageImageInitializationOption MediaBox PDFPageImageInitializationOption Rotation PDFPageImageInitializationOption UpscaleIfSmaller PDFPageImageInitializationOption }
PDFPageImageInitializationOptions provides typed accessors for PDFPageImageInitializationOption constants.
Functions ¶
This section is empty.
Types ¶
type IPDFAction ¶
type IPDFAction interface {
objectivec.IObject
// Returns the type of the action.
Type() string
// An object that represents an action for a PDF element, such as a link annotation.
Action() IPDFAction
SetAction(value IPDFAction)
// Returns the modification date of the annotation.
ModificationDate() foundation.INSDate
SetModificationDate(value foundation.INSDate)
// Returns the page that the annotation is associated with.
Page() IPDFPage
SetPage(value IPDFPage)
// Returns the name of the user who created the annotation.
UserName() string
SetUserName(value string)
}
An interface definition for the PDFAction class.
Getting the Action Type ¶
- [IPDFAction.Type]: Returns the type of the action.
See: https://developer.apple.com/documentation/PDFKit/PDFAction
type IPDFActionGoTo ¶
type IPDFActionGoTo interface {
IPDFAction
// Returns the destination associated with the action.
Destination() IPDFDestination
SetDestination(value IPDFDestination)
// Initializes the go-to action.
InitWithDestination(destination IPDFDestination) PDFActionGoTo
}
An interface definition for the PDFActionGoTo class.
Accessing the Destination ¶
- [IPDFActionGoTo.Destination]: Returns the destination associated with the action.
- [IPDFActionGoTo.SetDestination]
Initializing the Action ¶
- [IPDFActionGoTo.InitWithDestination]: Initializes the go-to action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionGoTo
type IPDFActionNamed ¶
type IPDFActionNamed interface {
IPDFAction
// Returns the name of the named action.
Name() PDFActionNamedName
SetName(value PDFActionNamedName)
// Initializes the [PDFActionName] object with the specified named action.
InitWithName(name PDFActionNamedName) PDFActionNamed
}
An interface definition for the PDFActionNamed class.
Accessing the Name of the Action ¶
- [IPDFActionNamed.Name]: Returns the name of the named action.
- [IPDFActionNamed.SetName]
Initializing the Action ¶
- [IPDFActionNamed.InitWithName]: Initializes the [PDFActionName] object with the specified named action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionNamed
type IPDFActionRemoteGoTo ¶
type IPDFActionRemoteGoTo interface {
IPDFAction
// Initializes the remote go-to action with the specified page index, point, and document URL.
InitWithPageIndexAtPointFileURL(pageIndex uint, point corefoundation.CGPoint, url foundation.INSURL) PDFActionRemoteGoTo
// Returns the zero-based page index referenced by the remote go-to action.
PageIndex() uint
SetPageIndex(value uint)
// Sets the point, in page space, on the page referenced by the remote go-to action.
Point() corefoundation.CGPoint
SetPoint(value corefoundation.CGPoint)
// Returns the URL of the document referenced by the remote go-to action.
URL() foundation.INSURL
SetURL(value foundation.INSURL)
}
An interface definition for the PDFActionRemoteGoTo class.
Initializing the Remote Go-to Action ¶
- [IPDFActionRemoteGoTo.InitWithPageIndexAtPointFileURL]: Initializes the remote go-to action with the specified page index, point, and document URL.
Accessing the Page Index of the Referenced Document ¶
- [IPDFActionRemoteGoTo.PageIndex]: Returns the zero-based page index referenced by the remote go-to action.
- [IPDFActionRemoteGoTo.SetPageIndex]
Accessing a Point on the Referenced Page ¶
- [IPDFActionRemoteGoTo.Point]: Sets the point, in page space, on the page referenced by the remote go-to action.
- [IPDFActionRemoteGoTo.SetPoint]
Accessing the URL of the Referenced Document ¶
- [IPDFActionRemoteGoTo.URL]: Returns the URL of the document referenced by the remote go-to action.
- [IPDFActionRemoteGoTo.SetURL]
See: https://developer.apple.com/documentation/PDFKit/PDFActionRemoteGoTo
type IPDFActionResetForm ¶
type IPDFActionResetForm interface {
IPDFAction
// Returns an array of fields associated with the reset action.
Fields() []string
SetFields(value []string)
// Sets whether the fields associated with the reset action are cleared when the action is performed.
FieldsIncludedAreCleared() bool
SetFieldsIncludedAreCleared(value bool)
}
An interface definition for the PDFActionResetForm class.
Accessing and Changing Fields ¶
- [IPDFActionResetForm.Fields]: Returns an array of fields associated with the reset action.
- [IPDFActionResetForm.SetFields]
Determining Whether Fields are Cleared When the Action is Performed ¶
- [IPDFActionResetForm.FieldsIncludedAreCleared]: Sets whether the fields associated with the reset action are cleared when the action is performed.
- [IPDFActionResetForm.SetFieldsIncludedAreCleared]
See: https://developer.apple.com/documentation/PDFKit/PDFActionResetForm
type IPDFActionURL ¶
type IPDFActionURL interface {
IPDFAction
// Initializes a URL action with the specified URL.
InitWithURL(url foundation.INSURL) PDFActionURL
// Returns the URL associated with the URL action.
URL() foundation.INSURL
SetURL(value foundation.INSURL)
}
An interface definition for the PDFActionURL class.
Initializing a URL Action ¶
- [IPDFActionURL.InitWithURL]: Initializes a URL action with the specified URL.
Accessing and Changing the URL ¶
- [IPDFActionURL.URL]: Returns the URL associated with the URL action.
- [IPDFActionURL.SetURL]
See: https://developer.apple.com/documentation/PDFKit/PDFActionURL
type IPDFAnnotation ¶
type IPDFAnnotation interface {
objectivec.IObject
// Creates a PDF annotation with the specified bounds, type, and optional properties.
InitWithBoundsForTypeWithProperties(bounds corefoundation.CGRect, annotationType PDFAnnotationSubtype, properties foundation.INSDictionary) PDFAnnotation
// Returns the page that the annotation is associated with.
Page() IPDFPage
SetPage(value IPDFPage)
// Returns the modification date of the annotation.
ModificationDate() foundation.INSDate
SetModificationDate(value foundation.INSDate)
// Returns the name of the user who created the annotation.
UserName() string
SetUserName(value string)
// Returns the type of the annotation.
Type() string
SetType(value string)
// An object that represents an action for a PDF element, such as a link annotation.
Action() IPDFAction
SetAction(value IPDFAction)
// Draws the annotation in a graphics context using page-space coordinates relative to the origin of the specified box.
DrawWithBoxInContext(box PDFDisplayBox, context coregraphics.CGContextRef)
// Returns a Boolean value indicating whether the annotation should be displayed.
ShouldDisplay() bool
SetShouldDisplay(value bool)
// Returns a Boolean value indicating whether the annotation should appear when the document is printed.
ShouldPrint() bool
SetShouldPrint(value bool)
// A dictionary that contains a deep copy of the widget’s properties.
AnnotationKeyValues() foundation.INSDictionary
// Returns a deep copy of the key-value pairs of properties for the specified key.
ValueForAnnotationKey(key PDFAnnotationKey) objectivec.IObject
// Sets a value in the annotation’s dictionary.
SetValueForAnnotationKey(value objectivec.IObject, key PDFAnnotationKey) bool
// Sets a Boolean value in the annotation’s dictionary.
SetBooleanForAnnotationKey(value bool, key PDFAnnotationKey) bool
// Sets a rectangle value in the annotation’s dictionary.
SetRectForAnnotationKey(value corefoundation.CGRect, key PDFAnnotationKey) bool
// Removes a value from the annotation’s dictionary.
RemoveValueForAnnotationKey(key PDFAnnotationKey)
// The alignment of the free text and text widget annotation’s text content.
Alignment() appkit.NSTextAlignment
SetAlignment(value appkit.NSTextAlignment)
// Returns the bounding box for the annotation in page space.
Bounds() corefoundation.CGRect
SetBounds(value corefoundation.CGRect)
// Returns the textual content (if any) associated with the annotation.
Contents() string
SetContents(value string)
// The font the annotation uses to display text.
Font() objectivec.IObject
SetFont(value objectivec.IObject)
// The font color the annotation uses to display text.
FontColor() objc.ID
SetFontColor(value objc.ID)
// Sets the border style for the annotation.
Border() IPDFBorder
SetBorder(value IPDFBorder)
// A Boolean value that indicates whether the annotation is in a highlighted state, such as when the mouse is down on a link annotation.
Highlighted() bool
SetHighlighted(value bool)
// Sets the stroke color for the annotation.
Color() objc.ID
SetColor(value objc.ID)
// Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.
HasAppearanceStream() bool
// The fill color for drawing a circle, line, or square annotation.
InteriorColor() objc.ID
SetInteriorColor(value objc.ID)
// The point where a line begins, in annotation-space coordinates.
StartPoint() corefoundation.CGPoint
SetStartPoint(value corefoundation.CGPoint)
// The point where a line ends, in annotation-space coordinates.
EndPoint() corefoundation.CGPoint
SetEndPoint(value corefoundation.CGPoint)
// The style of the line annotation’s starting point, such as square or filled arrowhead.
StartLineStyle() PDFLineStyle
SetStartLineStyle(value PDFLineStyle)
// The style of the line annotation’s ending point, such as square or filled arrowhead.
EndLineStyle() PDFLineStyle
SetEndLineStyle(value PDFLineStyle)
// The destination for a link annotation.
Destination() IPDFDestination
SetDestination(value IPDFDestination)
// A URL for a link annotation.
URL() foundation.INSURL
SetURL(value foundation.INSURL)
// The type of icon to display for a pop-up text annotation.
IconType() PDFTextAnnotationIconType
SetIconType(value PDFTextAnnotationIconType)
// Returns the pop-up annotation associated with an annotation.
Popup() IPDFAnnotation
SetPopup(value IPDFAnnotation)
// A Boolean value that indicates whether the pop-up annotation is in an opened state, displaying its text content, or in a closed state, displaying an icon.
Open() bool
SetOpen(value bool)
// The markup type that the annotation displays, either highlight, strikethrough, underline, or redact.
MarkupType() PDFMarkupType
SetMarkupType(value PDFMarkupType)
// An array of values that represents the points bounding the marked-up text.
QuadrilateralPoints() []foundation.NSValue
SetQuadrilateralPoints(value []foundation.NSValue)
// The type of widget annotation, such as button, choice, or text.
WidgetFieldType() PDFAnnotationWidgetSubtype
SetWidgetFieldType(value PDFAnnotationWidgetSubtype)
// The string value of the widget annotation.
WidgetStringValue() string
SetWidgetStringValue(value string)
// The string value that the widget reverts to when performing a reset form action.
WidgetDefaultStringValue() string
SetWidgetDefaultStringValue(value string)
// The widget identifier for form annotation actions and behaviors.
FieldName() string
SetFieldName(value string)
// The color of the widget’s background.
BackgroundColor() objc.ID
SetBackgroundColor(value objc.ID)
// A Boolean value that determines whether the widget is editable.
ReadOnly() bool
SetReadOnly(value bool)
// A Boolean value that indicates whether the text widget annotation displays multiple lines.
Multiline() bool
SetMultiline(value bool)
// A Boolean value that indicates whether the text widget annotation displays a password field using bullet characters.
IsPasswordField() bool
// The maximum number of characters the text widget annotation allows.
MaximumLength() int
SetMaximumLength(value int)
// A Boolean value that indicates whether the annotation divides the text widget’s bounds into equally spaced segments, such as in a form entry field.
Comb() bool
SetComb(value bool)
// The type of button widget control, either radio button, push button, or checkbox.
WidgetControlType() PDFWidgetControlType
SetWidgetControlType(value PDFWidgetControlType)
// The current state of the button widget annotation.
ButtonWidgetState() PDFWidgetCellState
SetButtonWidgetState(value PDFWidgetCellState)
// A string value that differentiates button widgets in the same group, such as to identify mutually exclusive radio buttons from each other.
ButtonWidgetStateString() string
SetButtonWidgetStateString(value string)
// The title of push button widget annotations.
Caption() string
SetCaption(value string)
// A Boolean value that indicates whether clicking or tapping a selected radio button toggles it to an unselected state.
AllowsToggleToOff() bool
SetAllowsToggleToOff(value bool)
// A Boolean value that indicates whether radio buttons in a group turn on and off in unison.
RadiosInUnison() bool
SetRadiosInUnison(value bool)
// An array of strings that specifies the options in either a list or a pop-up menu.
Choices() []string
SetChoices(value []string)
// A Boolean value that indicates whether the choice widget annotation is a list or a pop-up menu.
ListChoice() bool
SetListChoice(value bool)
// An array of strings that specifies the export values for items in a list or a pop-up menu.
Values() []string
SetValues(value []string)
// An array of bezier paths, in annotation-space coordinates, that compose the annotation.
Paths() []objc.ID
// Adds a bezier path to the ink annotation.
AddBezierPath(path objectivec.IObject)
// Removes a bezier path from an ink annotation.
RemoveBezierPath(path objectivec.IObject)
// The name of the stamp, a text or graphics annotation that emulates a rubber stamp effect.
StampName() string
SetStampName(value string)
ActivatableTextField() bool
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the PDFAnnotation class.
Creating an Annotation ¶
- [IPDFAnnotation.InitWithBoundsForTypeWithProperties]: Creates a PDF annotation with the specified bounds, type, and optional properties.
Accessing Information About an Annotation ¶
- [IPDFAnnotation.Page]: Returns the page that the annotation is associated with.
- [IPDFAnnotation.SetPage]
- [IPDFAnnotation.ModificationDate]: Returns the modification date of the annotation.
- [IPDFAnnotation.SetModificationDate]
- [IPDFAnnotation.UserName]: Returns the name of the user who created the annotation.
- [IPDFAnnotation.SetUserName]
- [IPDFAnnotation.Type]: Returns the type of the annotation.
- [IPDFAnnotation.SetType]
- [IPDFAnnotation.Action]: An object that represents an action for a PDF element, such as a link annotation.
- [IPDFAnnotation.SetAction]
Managing Annotation Drawing and Output ¶
- [IPDFAnnotation.DrawWithBoxInContext]: Draws the annotation in a graphics context using page-space coordinates relative to the origin of the specified box.
- [IPDFAnnotation.ShouldDisplay]: Returns a Boolean value indicating whether the annotation should be displayed.
- [IPDFAnnotation.SetShouldDisplay]
- [IPDFAnnotation.ShouldPrint]: Returns a Boolean value indicating whether the annotation should appear when the document is printed.
- [IPDFAnnotation.SetShouldPrint]
Modifying Annotation Attributes ¶
- [IPDFAnnotation.AnnotationKeyValues]: A dictionary that contains a deep copy of the widget’s properties.
- [IPDFAnnotation.ValueForAnnotationKey]: Returns a deep copy of the key-value pairs of properties for the specified key.
- [IPDFAnnotation.SetValueForAnnotationKey]: Sets a value in the annotation’s dictionary.
- [IPDFAnnotation.SetBooleanForAnnotationKey]: Sets a Boolean value in the annotation’s dictionary.
- [IPDFAnnotation.SetRectForAnnotationKey]: Sets a rectangle value in the annotation’s dictionary.
- [IPDFAnnotation.RemoveValueForAnnotationKey]: Removes a value from the annotation’s dictionary.
Managing Annotation Display Characteristics ¶
- [IPDFAnnotation.Alignment]: The alignment of the free text and text widget annotation’s text content.
- [IPDFAnnotation.SetAlignment]
- [IPDFAnnotation.Bounds]: Returns the bounding box for the annotation in page space.
- [IPDFAnnotation.SetBounds]
- [IPDFAnnotation.Contents]: Returns the textual content (if any) associated with the annotation.
- [IPDFAnnotation.SetContents]
- [IPDFAnnotation.Font]: The font the annotation uses to display text.
- [IPDFAnnotation.SetFont]
- [IPDFAnnotation.FontColor]: The font color the annotation uses to display text.
- [IPDFAnnotation.SetFontColor]
- [IPDFAnnotation.Border]: Sets the border style for the annotation.
- [IPDFAnnotation.SetBorder]
- [IPDFAnnotation.Highlighted]: A Boolean value that indicates whether the annotation is in a highlighted state, such as when the mouse is down on a link annotation.
- [IPDFAnnotation.SetHighlighted]
- [IPDFAnnotation.Color]: Sets the stroke color for the annotation.
- [IPDFAnnotation.SetColor]
- [IPDFAnnotation.HasAppearanceStream]: Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.
Configuring Shape Annotations ¶
- [IPDFAnnotation.InteriorColor]: The fill color for drawing a circle, line, or square annotation.
- [IPDFAnnotation.SetInteriorColor]
Configuring Line Annotations ¶
- [IPDFAnnotation.StartPoint]: The point where a line begins, in annotation-space coordinates.
- [IPDFAnnotation.SetStartPoint]
- [IPDFAnnotation.EndPoint]: The point where a line ends, in annotation-space coordinates.
- [IPDFAnnotation.SetEndPoint]
- [IPDFAnnotation.StartLineStyle]: The style of the line annotation’s starting point, such as square or filled arrowhead.
- [IPDFAnnotation.SetStartLineStyle]
- [IPDFAnnotation.EndLineStyle]: The style of the line annotation’s ending point, such as square or filled arrowhead.
- [IPDFAnnotation.SetEndLineStyle]
Configuring Link Annotations ¶
- [IPDFAnnotation.Destination]: The destination for a link annotation.
- [IPDFAnnotation.SetDestination]
- [IPDFAnnotation.URL]: A URL for a link annotation.
- [IPDFAnnotation.SetURL]
Configuring Text Annotations ¶
- [IPDFAnnotation.IconType]: The type of icon to display for a pop-up text annotation.
- [IPDFAnnotation.SetIconType]
Configuring Pop-Up Annotations ¶
- [IPDFAnnotation.Popup]: Returns the pop-up annotation associated with an annotation.
- [IPDFAnnotation.SetPopup]
- [IPDFAnnotation.Open]: A Boolean value that indicates whether the pop-up annotation is in an opened state, displaying its text content, or in a closed state, displaying an icon.
- [IPDFAnnotation.SetOpen]
Configuring Text Markup Annotations ¶
- [IPDFAnnotation.MarkupType]: The markup type that the annotation displays, either highlight, strikethrough, underline, or redact.
- [IPDFAnnotation.SetMarkupType]
- [IPDFAnnotation.QuadrilateralPoints]: An array of values that represents the points bounding the marked-up text.
- [IPDFAnnotation.SetQuadrilateralPoints]
Configuring Widget Annotations ¶
- [IPDFAnnotation.WidgetFieldType]: The type of widget annotation, such as button, choice, or text.
- [IPDFAnnotation.SetWidgetFieldType]
- [IPDFAnnotation.WidgetStringValue]: The string value of the widget annotation.
- [IPDFAnnotation.SetWidgetStringValue]
- [IPDFAnnotation.WidgetDefaultStringValue]: The string value that the widget reverts to when performing a reset form action.
- [IPDFAnnotation.SetWidgetDefaultStringValue]
- [IPDFAnnotation.FieldName]: The widget identifier for form annotation actions and behaviors.
- [IPDFAnnotation.SetFieldName]
- [IPDFAnnotation.BackgroundColor]: The color of the widget’s background.
- [IPDFAnnotation.SetBackgroundColor]
- [IPDFAnnotation.ReadOnly]: A Boolean value that determines whether the widget is editable.
- [IPDFAnnotation.SetReadOnly]
Configuring Text Widget Annotations ¶
- [IPDFAnnotation.Multiline]: A Boolean value that indicates whether the text widget annotation displays multiple lines.
- [IPDFAnnotation.SetMultiline]
- [IPDFAnnotation.IsPasswordField]: A Boolean value that indicates whether the text widget annotation displays a password field using bullet characters.
- [IPDFAnnotation.MaximumLength]: The maximum number of characters the text widget annotation allows.
- [IPDFAnnotation.SetMaximumLength]
- [IPDFAnnotation.Comb]: A Boolean value that indicates whether the annotation divides the text widget’s bounds into equally spaced segments, such as in a form entry field.
- [IPDFAnnotation.SetComb]
Configuring Button Widget Annotations ¶
- [IPDFAnnotation.WidgetControlType]: The type of button widget control, either radio button, push button, or checkbox.
- [IPDFAnnotation.SetWidgetControlType]
- [IPDFAnnotation.ButtonWidgetState]: The current state of the button widget annotation.
- [IPDFAnnotation.SetButtonWidgetState]
- [IPDFAnnotation.ButtonWidgetStateString]: A string value that differentiates button widgets in the same group, such as to identify mutually exclusive radio buttons from each other.
- [IPDFAnnotation.SetButtonWidgetStateString]
- [IPDFAnnotation.Caption]: The title of push button widget annotations.
- [IPDFAnnotation.SetCaption]
- [IPDFAnnotation.AllowsToggleToOff]: A Boolean value that indicates whether clicking or tapping a selected radio button toggles it to an unselected state.
- [IPDFAnnotation.SetAllowsToggleToOff]
- [IPDFAnnotation.RadiosInUnison]: A Boolean value that indicates whether radio buttons in a group turn on and off in unison.
- [IPDFAnnotation.SetRadiosInUnison]
Configuring Choice Widget Annotations ¶
- [IPDFAnnotation.Choices]: An array of strings that specifies the options in either a list or a pop-up menu.
- [IPDFAnnotation.SetChoices]
- [IPDFAnnotation.ListChoice]: A Boolean value that indicates whether the choice widget annotation is a list or a pop-up menu.
- [IPDFAnnotation.SetListChoice]
- [IPDFAnnotation.Values]: An array of strings that specifies the export values for items in a list or a pop-up menu.
- [IPDFAnnotation.SetValues]
Configuring Ink Annotations ¶
- [IPDFAnnotation.Paths]: An array of bezier paths, in annotation-space coordinates, that compose the annotation.
- [IPDFAnnotation.AddBezierPath]: Adds a bezier path to the ink annotation.
- [IPDFAnnotation.RemoveBezierPath]: Removes a bezier path from an ink annotation.
Configuring Stamp Annotations ¶
- [IPDFAnnotation.StampName]: The name of the stamp, a text or graphics annotation that emulates a rubber stamp effect.
- [IPDFAnnotation.SetStampName]
Instance Properties ¶
- [IPDFAnnotation.ActivatableTextField]
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation
type IPDFAppearanceCharacteristics ¶
type IPDFAppearanceCharacteristics interface {
objectivec.IObject
// The background color of the widget annotation.
BackgroundColor() objc.ID
SetBackgroundColor(value objc.ID)
// The border color of the widget annotation.
BorderColor() objc.ID
SetBorderColor(value objc.ID)
// The text that the button widget annotation displays when the user isn’t interacting with it.
Caption() string
SetCaption(value string)
// The type of button widget annotation.
ControlType() PDFWidgetControlType
SetControlType(value PDFWidgetControlType)
// The text that the button widget annotation displays when the user holds down on it.
DownCaption() string
SetDownCaption(value string)
// The text that the widget annotation displays when the user hovers the pointer over it.
RolloverCaption() string
SetRolloverCaption(value string)
// The number of degrees, in multiples of 90, that the widget annotation rotates counterclockwise relative to the page.
Rotation() int
SetRotation(value int)
// A dictionary that contains a deep copy of the appearance characteristic key-value pairs.
AppearanceCharacteristicsKeyValues() foundation.INSDictionary
// The widget identifier for form annotation actions and behaviors.
FieldName() string
SetFieldName(value string)
// A Boolean value that determines whether the widget is editable.
IsReadOnly() bool
SetIsReadOnly(value bool)
// The string value that the widget reverts to when performing a reset form action.
WidgetDefaultStringValue() string
SetWidgetDefaultStringValue(value string)
// The type of widget annotation, such as button, choice, or text.
WidgetFieldType() PDFAnnotationWidgetSubtype
SetWidgetFieldType(value PDFAnnotationWidgetSubtype)
// The string value of the widget annotation.
WidgetStringValue() string
SetWidgetStringValue(value string)
}
An interface definition for the PDFAppearanceCharacteristics class.
Configuring a Widget’s Appearance ¶
- [IPDFAppearanceCharacteristics.BackgroundColor]: The background color of the widget annotation.
- [IPDFAppearanceCharacteristics.SetBackgroundColor]
- [IPDFAppearanceCharacteristics.BorderColor]: The border color of the widget annotation.
- [IPDFAppearanceCharacteristics.SetBorderColor]
- [IPDFAppearanceCharacteristics.Caption]: The text that the button widget annotation displays when the user isn’t interacting with it.
- [IPDFAppearanceCharacteristics.SetCaption]
- [IPDFAppearanceCharacteristics.ControlType]: The type of button widget annotation.
- [IPDFAppearanceCharacteristics.SetControlType]
- [IPDFAppearanceCharacteristics.DownCaption]: The text that the button widget annotation displays when the user holds down on it.
- [IPDFAppearanceCharacteristics.SetDownCaption]
- [IPDFAppearanceCharacteristics.RolloverCaption]: The text that the widget annotation displays when the user hovers the pointer over it.
- [IPDFAppearanceCharacteristics.SetRolloverCaption]
- [IPDFAppearanceCharacteristics.Rotation]: The number of degrees, in multiples of 90, that the widget annotation rotates counterclockwise relative to the page.
- [IPDFAppearanceCharacteristics.SetRotation]
- [IPDFAppearanceCharacteristics.AppearanceCharacteristicsKeyValues]: A dictionary that contains a deep copy of the appearance characteristic key-value pairs.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics
type IPDFBorder ¶
type IPDFBorder interface {
objectivec.IObject
// Sets the border style.
Style() PDFBorderStyle
SetStyle(value PDFBorderStyle)
// Sets the line width (in points) for the border.
LineWidth() float64
SetLineWidth(value float64)
// Gets the dash pattern for the border as an array of NSNumber objects.
DashPattern() foundation.INSArray
SetDashPattern(value foundation.INSArray)
// A dictionary that contains a deep copy of all border properties.
BorderKeyValues() foundation.INSDictionary
// Draws the border.
DrawInRect(rect corefoundation.CGRect)
// The alignment of the free text and text widget annotation’s text content.
Alignment() appkit.NSTextAlignment
SetAlignment(value appkit.NSTextAlignment)
// Sets the border style for the annotation.
Border() IPDFBorder
SetBorder(value IPDFBorder)
// Returns the bounding box for the annotation in page space.
Bounds() corefoundation.CGRect
SetBounds(value corefoundation.CGRect)
// Sets the stroke color for the annotation.
Color() objc.ID
SetColor(value objc.ID)
// Returns the textual content (if any) associated with the annotation.
Contents() string
SetContents(value string)
// The font the annotation uses to display text.
Font() objectivec.IObject
SetFont(value objectivec.IObject)
// The font color the annotation uses to display text.
FontColor() objc.ID
SetFontColor(value objc.ID)
// Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.
HasAppearanceStream() bool
SetHasAppearanceStream(value bool)
// A Boolean value that indicates whether the annotation is in a highlighted state, such as when the mouse is down on a link annotation.
IsHighlighted() bool
SetIsHighlighted(value bool)
EncodeWithCoder(coder foundation.INSCoder)
}
An interface definition for the PDFBorder class.
Working with Border Styles and Characteristics ¶
- [IPDFBorder.Style]: Sets the border style.
- [IPDFBorder.SetStyle]
- [IPDFBorder.LineWidth]: Sets the line width (in points) for the border.
- [IPDFBorder.SetLineWidth]
- [IPDFBorder.DashPattern]: Gets the dash pattern for the border as an array of NSNumber objects.
- [IPDFBorder.SetDashPattern]
- [IPDFBorder.BorderKeyValues]: A dictionary that contains a deep copy of all border properties.
Drawing Borders ¶
- [IPDFBorder.DrawInRect]: Draws the border.
See: https://developer.apple.com/documentation/PDFKit/PDFBorder
type IPDFDestination ¶
type IPDFDestination interface {
objectivec.IObject
// Initializes the destination.
InitWithPageAtPoint(page IPDFPage, point corefoundation.CGPoint) PDFDestination
// Returns the page that the destination refers to.
Page() IPDFPage
// Returns the point, in page space, that the destination refers to.
Point() corefoundation.CGPoint
KPDFDestinationUnspecifiedValue() float64
// Returns a comparison result that indicates the location of the destination in the document, relative to the current position.
Compare(destination IPDFDestination) foundation.NSComparisonResult
Zoom() float64
SetZoom(value float64)
// An object that represents an action for a PDF element, such as a link annotation.
Action() IPDFAction
SetAction(value IPDFAction)
// Returns a
CurrentDestination() IPDFDestination
SetCurrentDestination(value IPDFDestination)
// Returns the modification date of the annotation.
ModificationDate() foundation.INSDate
SetModificationDate(value foundation.INSDate)
// Returns the type of the annotation.
Type() string
SetType(value string)
// Returns the name of the user who created the annotation.
UserName() string
SetUserName(value string)
}
An interface definition for the PDFDestination class.
Initializing a Destination ¶
- [IPDFDestination.InitWithPageAtPoint]: Initializes the destination.
Getting Pages and Points ¶
- [IPDFDestination.Page]: Returns the page that the destination refers to.
- [IPDFDestination.Point]: Returns the point, in page space, that the destination refers to.
- [IPDFDestination.KPDFDestinationUnspecifiedValue]
Getting a Relative Location ¶
- [IPDFDestination.Compare]: Returns a comparison result that indicates the location of the destination in the document, relative to the current position.
Instance Properties ¶
- [IPDFDestination.Zoom]
- [IPDFDestination.SetZoom]
See: https://developer.apple.com/documentation/PDFKit/PDFDestination
type IPDFDocument ¶
type IPDFDocument interface {
objectivec.IObject
// Initializes a [PDFDocument] object with the contents at the specified URL (if the URL is invalid, this method returns [NULL]).
InitWithURL(url foundation.INSURL) PDFDocument
// Initializes a [PDFDocument] object with the passed-in data.
InitWithData(data foundation.INSData) PDFDocument
// The object acting as the delegate for the [PDFDocument] object.
Delegate() PDFDocumentDelegate
SetDelegate(value PDFDocumentDelegate)
AccessPermissions() PDFAccessPermissions
SelectionFromPageAtPointToPageAtPointWithGranularity(startPage IPDFPage, startPoint corefoundation.CGPoint, endPage IPDFPage, endPoint corefoundation.CGPoint, granularity PDFSelectionGranularity) IPDFSelection
// A Boolean value indicating whether you can create or modify document annotations, including form field entries.
AllowsCommenting() bool
// A Boolean value indicating whether you can extract content from the document, but only for the purpose of accessibility.
AllowsContentAccessibility() bool
// A Boolean value indicating whether the document allows copying of content to the Pasteboard.
AllowsCopying() bool
// A Boolean value indicating whether you can manage a document by inserting, deleting, and rotating pages.
AllowsDocumentAssembly() bool
// A Boolean value indicating whether you can modify the document contents except for document attributes.
AllowsDocumentChanges() bool
// A Boolean value indicating whether you can modify form field entries even if you can’t edit document annotations.
AllowsFormFieldEntry() bool
// A Boolean value indicating whether the document allows printing.
AllowsPrinting() bool
// A dictionary of document metadata.
DocumentAttributes() foundation.INSDictionary
SetDocumentAttributes(value foundation.INSDictionary)
// The [CGPDFDocument] associated with the [PDFDocument] object.
DocumentRef() coregraphics.CGPDFDocumentRef
// The URL for the document.
DocumentURL() foundation.INSURL
// A Boolean value specifying whether the document is encrypted.
IsEncrypted() bool
// Returns a Boolean value indicating whether an asynchronous find operation is in progress.
IsFinding() bool
// A Boolean value indicating whether the document is locked.
IsLocked() bool
// The major version of the document.
MajorVersion() int
// The minor version of the document.
MinorVersion() int
// The document’s root outline to a PDF outline object.
OutlineRoot() IPDFOutline
SetOutlineRoot(value IPDFOutline)
// The class that is allocated and initialized when page objects are created for the document.
PageClass() objc.Class
// The number of pages in the document.
PageCount() uint
// The permissions status of the PDF document.
PermissionsStatus() PDFDocumentPermissions
// Returns a selection representing the textual content of the entire document.
SelectionForEntireDocument() IPDFSelection
// A string representing the textual content for the entire document.
String() string
// Asynchronously finds all instances of the specified string in the document.
BeginFindStringWithOptions(string_ string, options foundation.NSStringCompareOptions)
// Asynchronously finds all instances of the specified array of strings in the document.
BeginFindStringsWithOptions(strings []string, options foundation.NSStringCompareOptions)
// Cancels a search initiated with [beginFindString(_:withOptions:)](<doc://com.apple.pdfkit/documentation/PDFKit/PDFDocument/beginFindString(_:withOptions:)>).
CancelFindString()
// Returns a representation of the document as an [NSData] object.
DataRepresentation() foundation.INSData
// Returns a representation of the document as an [NSData] object with additional options applied, such as filters.
DataRepresentationWithOptions(options foundation.INSDictionary) foundation.INSData
// Swaps one page with another.
ExchangePageAtIndexWithPageAtIndex(indexA uint, indexB uint)
// Synchronously finds the next occurance of a string after the specified selection (or before the selection if you specified [NSBackwardsSearch] as a search option.
FindStringFromSelectionWithOptions(string_ string, selection IPDFSelection, options foundation.NSStringCompareOptions) IPDFSelection
// Synchronously finds all instances of the specified string in the document.
FindStringWithOptions(string_ string, options foundation.NSStringCompareOptions) []PDFSelection
// Gets the index number for the specified page.
IndexForPage(page IPDFPage) uint
// Inserts a page at the specified index point.
InsertPageAtIndex(page IPDFPage, index uint)
// Returns the most likely parent PDF outline object for the selection.
OutlineItemForSelection(selection IPDFSelection) IPDFOutline
// Returns the page at the specified index number.
PageAtIndex(index uint) IPDFPage
// Returns a print operation suitable for printing the PDF document.
PrintOperationForPrintInfoScalingModeAutoRotate(printInfo appkit.NSPrintInfo, scaleMode PDFPrintScalingMode, doRotate bool) appkit.NSPrintOperation
// Removes the page at the specified index point.
RemovePageAtIndex(index uint)
// Returns the specified selection based on starting and ending character indexes.
SelectionFromPageAtCharacterIndexToPageAtCharacterIndex(startPage IPDFPage, startCharacter uint, endPage IPDFPage, endCharacter uint) IPDFSelection
// Returns the specified selection based on starting and ending points.
SelectionFromPageAtPointToPageAtPoint(startPage IPDFPage, startPoint corefoundation.CGPoint, endPage IPDFPage, endPoint corefoundation.CGPoint) IPDFSelection
// Attempts to unlock an encrypted document.
UnlockWithPassword(password string) bool
// Writes the document to a file at the specified path.
WriteToFile(path string) bool
// Writes the document to a file at the specified path with the specified options.
WriteToFileWithOptions(path string, options foundation.INSDictionary) bool
// Writes the document to a location specified by the passed-in URL.
WriteToURL(url foundation.INSURL) bool
// Writes the document to the specified URL with the specified options.
WriteToURLWithOptions(url foundation.INSURL, options foundation.INSDictionary) bool
}
An interface definition for the PDFDocument class.
Initializing Documents ¶
- [IPDFDocument.InitWithURL]: Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid, this method returns [NULL]).
- [IPDFDocument.InitWithData]: Initializes a PDFDocument object with the passed-in data.
Setting the Delegate ¶
- [IPDFDocument.Delegate]: The object acting as the delegate for the PDFDocument object.
- [IPDFDocument.SetDelegate]
Instance Properties ¶
- [IPDFDocument.AccessPermissions]
Instance Methods ¶
- [IPDFDocument.SelectionFromPageAtPointToPageAtPointWithGranularity]
See: https://developer.apple.com/documentation/PDFKit/PDFDocument
type IPDFOutline ¶
type IPDFOutline interface {
objectivec.IObject
// Returns the document with which the outline is associated.
Document() IPDFDocument
// Returns the number of child outline objects in the outline.
NumberOfChildren() uint
// Returns the parent outline object of the outline (returns [NULL] if called on the root outline object).
Parent() IPDFOutline
// Returns the child outline object at the specified index.
ChildAtIndex(index uint) IPDFOutline
// Returns the index of the outline.
Index() uint
// Returns the label for the outline.
Label() string
SetLabel(value string)
// Returns the destination associated with the outline.
Destination() IPDFDestination
SetDestination(value IPDFDestination)
// Returns the action performed when users click the outline.
Action() IPDFAction
SetAction(value IPDFAction)
// Inserts the specified outline object at the specified index.
InsertChildAtIndex(child IPDFOutline, index uint)
// Removes the outline object from its parent (does nothing if outline object is the root outline object).
RemoveFromParent()
// Returns a Boolean value that indicates whether the outline object is initially disclosed.
IsOpen() bool
SetIsOpen(value bool)
}
An interface definition for the PDFOutline class.
Getting Information About an Outline ¶
- [IPDFOutline.Document]: Returns the document with which the outline is associated.
- [IPDFOutline.NumberOfChildren]: Returns the number of child outline objects in the outline.
- [IPDFOutline.Parent]: Returns the parent outline object of the outline (returns [NULL] if called on the root outline object).
- [IPDFOutline.ChildAtIndex]: Returns the child outline object at the specified index.
- [IPDFOutline.Index]: Returns the index of the outline.
Managing Outline Labels ¶
- [IPDFOutline.Label]: Returns the label for the outline.
- [IPDFOutline.SetLabel]
Managing Actions and Destinations ¶
- [IPDFOutline.Destination]: Returns the destination associated with the outline.
- [IPDFOutline.SetDestination]
- [IPDFOutline.Action]: Returns the action performed when users click the outline.
- [IPDFOutline.SetAction]
Changing an Outline Hierarchy ¶
- [IPDFOutline.InsertChildAtIndex]: Inserts the specified outline object at the specified index.
- [IPDFOutline.RemoveFromParent]: Removes the outline object from its parent (does nothing if outline object is the root outline object).
Managing the Disclosure of an Outline Object ¶
- [IPDFOutline.IsOpen]: Returns a Boolean value that indicates whether the outline object is initially disclosed.
- [IPDFOutline.SetIsOpen]
See: https://developer.apple.com/documentation/PDFKit/PDFOutline
type IPDFPage ¶
type IPDFPage interface {
objectivec.IObject
// Creates a new [PDFPage] object and initializes it with the specified [NSImage] object.
InitWithImage(image objectivec.IObject) PDFPage
// Returns the [PDFDocument] object with which the page is associated.
Document() IPDFDocument
// Returns the label for the page.
Label() string
// Returns the bounds for the specified PDF display box.
BoundsForBox(box PDFDisplayBox) corefoundation.CGRect
// Sets the bounds for the specified box.
SetBoundsForBox(bounds corefoundation.CGRect, box PDFDisplayBox)
// Sets the rotation angle for the page in degrees.
Rotation() int
SetRotation(value int)
// Returns an array containing the page’s annotations.
Annotations() []PDFAnnotation
// Returns a Boolean value indicating whether annotations are displayed for the page.
DisplaysAnnotations() bool
SetDisplaysAnnotations(value bool)
// Adds the specified annotation object to the page.
AddAnnotation(annotation IPDFAnnotation)
// Removes the specified annotation from the page.
RemoveAnnotation(annotation IPDFAnnotation)
// Returns the annotation, if there is one, at the specified point.
AnnotationAtPoint(point corefoundation.CGPoint) IPDFAnnotation
// Returns the number of characters on the page, including whitespace characters.
NumberOfCharacters() uint
// Returns an [NSString] object representing the text on the page.
String() string
// Returns an [NSAttributedString] object representing the text on the page.
AttributedString() foundation.NSAttributedString
// Returns the bounds, in page space, of the character at the specified index.
CharacterBoundsAtIndex(index int) corefoundation.CGRect
// Returns the character index value for the specified point in page space.
CharacterIndexAtPoint(point corefoundation.CGPoint) int
// Returns the text enclosed within the specified rectangle, expressed in page (user) coordinates.
SelectionForRect(rect corefoundation.CGRect) IPDFSelection
// Returns the whole word that includes the specified point.
SelectionForWordAtPoint(point corefoundation.CGPoint) IPDFSelection
// Returns the whole line of text that includes the specified point.
SelectionForLineAtPoint(point corefoundation.CGPoint) IPDFSelection
// Returns the text between the two specified points in page space.
SelectionFromPointToPoint(startPoint corefoundation.CGPoint, endPoint corefoundation.CGPoint) IPDFSelection
// Returns the text contained within the specified range.
SelectionForRange(range_ foundation.NSRange) IPDFSelection
InitWithImageOptions(image objectivec.IObject, options foundation.INSDictionary) PDFPage
// Returns the PDF data (that is, a PDF document) representing this page. This method does not preserve external page links.
DataRepresentation() foundation.INSData
PageRef() coregraphics.CGPDFPageRef
DrawWithBoxToContext(box PDFDisplayBox, context coregraphics.CGContextRef)
ThumbnailOfSizeForBox(size corefoundation.CGSize, box PDFDisplayBox) objc.ID
TransformContextForBox(context coregraphics.CGContextRef, box PDFDisplayBox)
TransformForBox(box PDFDisplayBox) corefoundation.CGAffineTransform
}
An interface definition for the PDFPage class.
Initializing a Page ¶
- [IPDFPage.InitWithImage]: Creates a new PDFPage object and initializes it with the specified [NSImage] object.
Getting Information About a Page ¶
- [IPDFPage.Document]: Returns the PDFDocument object with which the page is associated.
- [IPDFPage.Label]: Returns the label for the page.
- [IPDFPage.BoundsForBox]: Returns the bounds for the specified PDF display box.
- [IPDFPage.SetBoundsForBox]: Sets the bounds for the specified box.
- [IPDFPage.Rotation]: Sets the rotation angle for the page in degrees.
- [IPDFPage.SetRotation]
Working with Annotations ¶
- [IPDFPage.Annotations]: Returns an array containing the page’s annotations.
- [IPDFPage.DisplaysAnnotations]: Returns a Boolean value indicating whether annotations are displayed for the page.
- [IPDFPage.SetDisplaysAnnotations]
- [IPDFPage.AddAnnotation]: Adds the specified annotation object to the page.
- [IPDFPage.RemoveAnnotation]: Removes the specified annotation from the page.
- [IPDFPage.AnnotationAtPoint]: Returns the annotation, if there is one, at the specified point.
Working with Textual Content ¶
- [IPDFPage.NumberOfCharacters]: Returns the number of characters on the page, including whitespace characters.
- [IPDFPage.String]: Returns an [NSString] object representing the text on the page.
- [IPDFPage.AttributedString]: Returns an [NSAttributedString] object representing the text on the page.
- [IPDFPage.CharacterBoundsAtIndex]: Returns the bounds, in page space, of the character at the specified index.
- [IPDFPage.CharacterIndexAtPoint]: Returns the character index value for the specified point in page space.
Working with Selections ¶
- [IPDFPage.SelectionForRect]: Returns the text enclosed within the specified rectangle, expressed in page (user) coordinates.
- [IPDFPage.SelectionForWordAtPoint]: Returns the whole word that includes the specified point.
- [IPDFPage.SelectionForLineAtPoint]: Returns the whole line of text that includes the specified point.
- [IPDFPage.SelectionFromPointToPoint]: Returns the text between the two specified points in page space.
- [IPDFPage.SelectionForRange]: Returns the text contained within the specified range.
Initializers ¶
- [IPDFPage.InitWithImageOptions]
Instance Properties ¶
- [IPDFPage.DataRepresentation]: Returns the PDF data (that is, a PDF document) representing this page. This method does not preserve external page links.
- [IPDFPage.PageRef]
Instance Methods ¶
- [IPDFPage.DrawWithBoxToContext]
- [IPDFPage.ThumbnailOfSizeForBox]
- [IPDFPage.TransformContextForBox]
- [IPDFPage.TransformForBox]
See: https://developer.apple.com/documentation/PDFKit/PDFPage
type IPDFSelection ¶
type IPDFSelection interface {
objectivec.IObject
// Returns an empty [PDFSelection] object.
InitWithDocument(document IPDFDocument) PDFSelection
// Returns the array of pages contained in the selection.
Pages() []PDFPage
// Returns an [NSString] object representing the text contained in the selection (may contain linefeed characters).
String() string
// Returns an [NSAttributedString] object representing the text contained in the selection (may contain linefeed characters).
AttributedString() foundation.NSAttributedString
// Returns the bounds of the selection on the specified page.
BoundsForPage(page IPDFPage) corefoundation.CGRect
// Returns an array of selections, one for each line of text covered by the receiver.
SelectionsByLine() []PDFSelection
// Sets the color used for the drawing of a selection in both active and inactive states.
Color() objc.ID
SetColor(value objc.ID)
// Adds the specified selection to the receiving selection.
AddSelection(selection IPDFSelection)
// Adds the specified array of selections to the receiving selection.
AddSelections(selections []PDFSelection)
// Extends the selection from its end toward the end of the document.
ExtendSelectionAtEnd(succeed int)
// Extends the selection from its start toward the beginning of the document.
ExtendSelectionAtStart(precede int)
// Calls [draw(for:with:active:)](<doc://com.apple.pdfkit/documentation/PDFKit/PDFSelection/draw(for:with:active:)>) with a default value for box parameter.
DrawForPageActive(page IPDFPage, active bool)
// Draws the selection relative to the origin of the specified box in page space.
DrawForPageWithBoxActive(page IPDFPage, box PDFDisplayBox, active bool)
ExtendSelectionForLineBoundaries()
NumberOfTextRangesOnPage(page IPDFPage) uint
RangeAtIndexOnPage(index uint, page IPDFPage) foundation.NSRange
}
An interface definition for the PDFSelection class.
Initializing a Selection ¶
- [IPDFSelection.InitWithDocument]: Returns an empty PDFSelection object.
Getting Information About a Selection ¶
- [IPDFSelection.Pages]: Returns the array of pages contained in the selection.
- [IPDFSelection.String]: Returns an [NSString] object representing the text contained in the selection (may contain linefeed characters).
- [IPDFSelection.AttributedString]: Returns an [NSAttributedString] object representing the text contained in the selection (may contain linefeed characters).
- [IPDFSelection.BoundsForPage]: Returns the bounds of the selection on the specified page.
- [IPDFSelection.SelectionsByLine]: Returns an array of selections, one for each line of text covered by the receiver.
- [IPDFSelection.Color]: Sets the color used for the drawing of a selection in both active and inactive states.
- [IPDFSelection.SetColor]
Modifying a Selection ¶
- [IPDFSelection.AddSelection]: Adds the specified selection to the receiving selection.
- [IPDFSelection.AddSelections]: Adds the specified array of selections to the receiving selection.
- [IPDFSelection.ExtendSelectionAtEnd]: Extends the selection from its end toward the end of the document.
- [IPDFSelection.ExtendSelectionAtStart]: Extends the selection from its start toward the beginning of the document.
Managing Selection Drawing ¶
- [IPDFSelection.DrawForPageActive]: Calls [draw(for:with:active:)](<doc://com.apple.pdfkit/documentation/PDFKit/PDFSelection/draw(for:with:active:)>) with a default value for box parameter.
- [IPDFSelection.DrawForPageWithBoxActive]: Draws the selection relative to the origin of the specified box in page space.
Instance Methods ¶
- [IPDFSelection.ExtendSelectionForLineBoundaries]
- [IPDFSelection.NumberOfTextRangesOnPage]
- [IPDFSelection.RangeAtIndexOnPage]
See: https://developer.apple.com/documentation/PDFKit/PDFSelection
type IPDFThumbnailView ¶
type IPDFThumbnailView interface {
appkit.INSView
// Returns the [PDFView] object associated with the thumbnail view.
PDFView() IPDFView
SetPDFView(value IPDFView)
// Returns the maximum width and height of the thumbnails in the thumbnail view.
ThumbnailSize() corefoundation.CGSize
SetThumbnailSize(value corefoundation.CGSize)
// Returns the maximum number of columns of thumbnails the thumbnail view can display.
MaximumNumberOfColumns() uint
SetMaximumNumberOfColumns(value uint)
// Returns the font used to label the thumbnails.
LabelFont() appkit.NSFont
SetLabelFont(value appkit.NSFont)
// Returns the color used in the background of the thumbnail view.
BackgroundColor() objc.ID
SetBackgroundColor(value objc.ID)
// Returns a Boolean value indicating whether users can drag thumbnails (that is, re-order pages in the document) within the thumbnail view.
AllowsDragging() bool
SetAllowsDragging(value bool)
// Returns a Boolean value indicating whether users can select multiple thumbnails in the thumbnail view at one time.
AllowsMultipleSelection() bool
SetAllowsMultipleSelection(value bool)
// Returns an array of PDF pages that correspond to the selected thumbnails in the thumbnail view.
SelectedPages() []PDFPage
}
An interface definition for the PDFThumbnailView class.
Accessing the Associated PDF View ¶
- [IPDFThumbnailView.PDFView]: Returns the PDFView object associated with the thumbnail view.
- [IPDFThumbnailView.SetPDFView]
Managing the Size of a Thumbnail View ¶
- [IPDFThumbnailView.ThumbnailSize]: Returns the maximum width and height of the thumbnails in the thumbnail view.
- [IPDFThumbnailView.SetThumbnailSize]
Working with Thumbnail View Display Characteristics ¶
- [IPDFThumbnailView.MaximumNumberOfColumns]: Returns the maximum number of columns of thumbnails the thumbnail view can display.
- [IPDFThumbnailView.SetMaximumNumberOfColumns]
- [IPDFThumbnailView.LabelFont]: Returns the font used to label the thumbnails.
- [IPDFThumbnailView.SetLabelFont]
- [IPDFThumbnailView.BackgroundColor]: Returns the color used in the background of the thumbnail view.
- [IPDFThumbnailView.SetBackgroundColor]
Managing the Behavior of a Thumbnail View ¶
- [IPDFThumbnailView.AllowsDragging]: Returns a Boolean value indicating whether users can drag thumbnails (that is, re-order pages in the document) within the thumbnail view.
- [IPDFThumbnailView.SetAllowsDragging]
- [IPDFThumbnailView.AllowsMultipleSelection]: Returns a Boolean value indicating whether users can select multiple thumbnails in the thumbnail view at one time.
- [IPDFThumbnailView.SetAllowsMultipleSelection]
- [IPDFThumbnailView.SelectedPages]: Returns an array of PDF pages that correspond to the selected thumbnails in the thumbnail view.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView
type IPDFView ¶
type IPDFView interface {
appkit.INSView
// Returns the document associated with a [PDFView] object.
Document() IPDFDocument
SetDocument(value IPDFDocument)
// Returns the current page.
CurrentPage() IPDFPage
// Returns a [PDFDestination] object representing the current page and the current point in the view specified in page space.
CurrentDestination() IPDFDestination
// Returns an array of [PDFPage] objects that represent the currently visible pages.
VisiblePages() []PDFPage
// Returns the view’s delegate.
Delegate() PDFViewDelegate
SetDelegate(value PDFViewDelegate)
InMarkupMode() bool
SetInMarkupMode(value bool)
PageOverlayViewProvider() PDFPageOverlayViewProvider
SetPageOverlayViewProvider(value PDFPageOverlayViewProvider)
PageShadowsEnabled() bool
SetPageShadowsEnabled(value bool)
// A Boolean value indicating whether you can drag a file into the view.
AcceptsDraggedFiles() bool
SetAcceptsDraggedFiles(value bool)
// A Boolean value indicating whether autoscaling is set.
AutoScales() bool
SetAutoScales(value bool)
// The view’s background color.
BackgroundColor() objc.ID
SetBackgroundColor(value objc.ID)
// Returns a Boolean value indicating whether the user can navigate to the previous page in the page history.
CanGoBack() bool
// Returns a Boolean value indicating whether the user can navigate to the next page in the page history.
CanGoForward() bool
// Returns a Boolean value indicating whether the user can navigate to the first page of the document.
CanGoToFirstPage() bool
// Returns a Boolean value indicating whether the user can navigate to the last page of the document.
CanGoToLastPage() bool
// Returns a Boolean value indicating whether the user can navigate to the next page of the document.
CanGoToNextPage() bool
// Returns a Boolean value indicating whether the user can navigate to the previous page of the document.
CanGoToPreviousPage() bool
// Returns a Boolean value indicating whether the user can magnify the view and zoom in.
CanZoomIn() bool
// Returns a Boolean value indicating whether the user can view an expanded area and zoom out.
CanZoomOut() bool
// The current selection.
CurrentSelection() IPDFSelection
SetCurrentSelection(value IPDFSelection)
// The current style of display box.
DisplayBox() PDFDisplayBox
SetDisplayBox(value PDFDisplayBox)
// The layout direction, either vertical or horizontal, for the given display mode.
DisplayDirection() PDFDisplayDirection
SetDisplayDirection(value PDFDisplayDirection)
// The current display mode.
DisplayMode() PDFDisplayMode
SetDisplayMode(value PDFDisplayMode)
// A Boolean value indicating whether the view will display the first page as a book cover (meaningful only when the document is in two-up or two-up continuous display mode).
DisplaysAsBook() bool
SetDisplaysAsBook(value bool)
// A Boolean value indicating whether the view is displaying page breaks.
DisplaysPageBreaks() bool
SetDisplaysPageBreaks(value bool)
// The presentation of pages from right-to-left.
DisplaysRTL() bool
SetDisplaysRTL(value bool)
// The innermost view used by [PDFView] or by your [PDFView] subclass.
DocumentView() objc.ID
// A Boolean value indicating whether to turns on or off data detection, which adds annotations for detected URLs in a page.
EnableDataDetectors() bool
SetEnableDataDetectors(value bool)
// Returns the array of selections that are highlighted using `setHighlightedSelections`.
HighlightedSelections() []PDFSelection
SetHighlightedSelections(value []PDFSelection)
// The interpolation quality for images drawn into the [PDFView] context.
InterpolationQuality() PDFInterpolationQuality
SetInterpolationQuality(value PDFInterpolationQuality)
// The maximum scaling factor for the PDF document.
MaxScaleFactor() float64
SetMaxScaleFactor(value float64)
// The minimum scaling factor for the PDF document.
MinScaleFactor() float64
SetMinScaleFactor(value float64)
// The spacing between pages as defined by the top, bottom, left, and right margins.
PageBreakMargins() objectivec.IObject
SetPageBreakMargins(value objectivec.IObject)
// The current scale factor for the view.
ScaleFactor() float64
SetScaleFactor(value float64)
// The “size to fit” scale factor that `autoScales` would use for scaling the current document and layout.
ScaleFactorForSizeToFit() float64
// Tells the PDF view that an annotation on the specified page has changed.
AnnotationsChangedOnPage(page IPDFPage)
// Returns the type of area the mouse cursor is over.
AreaOfInterestForMouse(event objectivec.IObject) PDFAreaOfInterest
// Returns the type of area for a specific cursor location point.
AreaOfInterestForPoint(cursorLocation corefoundation.CGPoint) PDFAreaOfInterest
// Clears the selection.
ClearSelection()
// Converts a point from page space to view space.
ConvertPointFromPage(point corefoundation.CGPoint, page IPDFPage) corefoundation.CGPoint
// Converts a point from view space to page space.
ConvertPointToPage(point corefoundation.CGPoint, page IPDFPage) corefoundation.CGPoint
// Converts a rectangle from page space to view space.
ConvertRectFromPage(rect corefoundation.CGRect, page IPDFPage) corefoundation.CGRect
// Converts a rectangle from view space to page space.
ConvertRectToPage(rect corefoundation.CGRect, page IPDFPage) corefoundation.CGRect
// Copies the text in the selection, if any, to the Pasteboard.
Copy(sender objectivec.IObject)
// Perform post-page rendering for a page rendered to a context.
DrawPagePostToContext(page IPDFPage, context coregraphics.CGContextRef)
// Draw and render a visible page to a context.
DrawPageToContext(page IPDFPage, context coregraphics.CGContextRef)
// Navigates back one step in the page history.
GoBack(sender objectivec.IObject)
// Navigates forward one step in the page history.
GoForward(sender objectivec.IObject)
// Navigates to the specified destination.
GoToDestination(destination IPDFDestination)
// Navigates to the first page of the document.
GoToFirstPage(sender objectivec.IObject)
// Navigates to the last page of the document.
GoToLastPage(sender objectivec.IObject)
// Navigates to the next page of the document.
GoToNextPage(sender objectivec.IObject)
// Scrolls to the specified page.
GoToPage(page IPDFPage)
// Navigates to the previous page of the document.
GoToPreviousPage(sender objectivec.IObject)
// Navigates to the specified rectangle on the specified page.
GoToRectOnPage(rect corefoundation.CGRect, page IPDFPage)
// Scrolls to the first character of the specified selection.
GoToSelection(selection IPDFSelection)
// Performs layout of the inner views.
LayoutDocumentView()
// Returns the page containing a point specified in view coordinates.
PageForPointNearest(point corefoundation.CGPoint, nearest bool) IPDFPage
// Performs the specified action.
PerformAction(action IPDFAction)
// Prints the document with the specified printer information.
PrintWithInfoAutoRotate(printInfo appkit.NSPrintInfo, doRotate bool)
// Prints the document with the specified printer and page-scaling information.
PrintWithInfoAutoRotatePageScaling(printInfo appkit.NSPrintInfo, doRotate bool, scale PDFPrintScalingMode)
// Returns the size needed to display a row of the current document page.
RowSizeForPage(page IPDFPage) corefoundation.CGSize
// Scrolls the view until the selection is visible.
ScrollSelectionToVisible(sender objectivec.IObject)
// Sets the current selection, in an animated way, if desired.
SetCurrentSelectionAnimate(selection IPDFSelection, animate bool)
// Sets the type of mouse cursor according to the type of area the mouse cursor is over.
SetCursorForAreaOfInterest(area PDFAreaOfInterest)
// Zooms in by increasing the scaling factor.
ZoomIn(sender objectivec.IObject)
// Zooms out by decreasing the scaling factor.
ZoomOut(sender objectivec.IObject)
}
An interface definition for the PDFView class.
Associating a Document with a View ¶
- [IPDFView.Document]: Returns the document associated with a PDFView object.
- [IPDFView.SetDocument]
Navigating Within a Document ¶
- [IPDFView.CurrentPage]: Returns the current page.
- [IPDFView.CurrentDestination]: Returns a PDFDestination object representing the current page and the current point in the view specified in page space.
- [IPDFView.VisiblePages]: Returns an array of PDFPage objects that represent the currently visible pages.
Setting the Delegate ¶
- [IPDFView.Delegate]: Returns the view’s delegate.
- [IPDFView.SetDelegate]
Instance Properties ¶
- [IPDFView.InMarkupMode]
- [IPDFView.SetInMarkupMode]
- [IPDFView.PageOverlayViewProvider]
- [IPDFView.SetPageOverlayViewProvider]
- [IPDFView.PageShadowsEnabled]
- [IPDFView.SetPageShadowsEnabled]
See: https://developer.apple.com/documentation/PDFKit/PDFView
type PDFAccessPermissions ¶
type PDFAccessPermissions uint
See: https://developer.apple.com/documentation/PDFKit/PDFAccessPermissions
const ( PDFAllowsCommenting PDFAccessPermissions = 64 PDFAllowsContentAccessibility PDFAccessPermissions = 32 PDFAllowsContentCopying PDFAccessPermissions = 16 PDFAllowsDocumentAssembly PDFAccessPermissions = 8 PDFAllowsDocumentChanges PDFAccessPermissions = 4 PDFAllowsFormFieldEntry PDFAccessPermissions = 128 PDFAllowsHighQualityPrinting PDFAccessPermissions = 2 PDFAllowsLowQualityPrinting PDFAccessPermissions = 1 )
func (PDFAccessPermissions) String ¶
func (e PDFAccessPermissions) String() string
type PDFAction ¶
type PDFAction struct {
objectivec.Object
}
An action that is performed when, for example, a PDF annotation is activated or an outline item is clicked.
Overview ¶
A PDFAction object represents an action associated with a PDF element, such as an annotation or a link, that the viewer application can perform. See the Adobe PDF Specification for more about actions and action types.
PDFAction is an abstract superclass of the following concrete classes:
- PDFActionGoTo - PDFActionNamed - PDFActionRemoteGoTo - PDFActionResetForm - PDFActionURL
Getting the Action Type ¶
- PDFAction.Type: Returns the type of the action.
See: https://developer.apple.com/documentation/PDFKit/PDFAction
func PDFActionFromID ¶
PDFActionFromID constructs a PDFAction from an objc.ID.
An action that is performed when, for example, a PDF annotation is activated or an outline item is clicked.
func (PDFAction) Action ¶
func (p PDFAction) Action() IPDFAction
An object that represents an action for a PDF element, such as a link annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/action
func (PDFAction) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (PDFAction) ModificationDate ¶
func (p PDFAction) ModificationDate() foundation.INSDate
Returns the modification date of the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/modificationdate
func (PDFAction) Page ¶
Returns the page that the annotation is associated with.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/page
func (PDFAction) SetAction ¶
func (p PDFAction) SetAction(value IPDFAction)
func (PDFAction) SetModificationDate ¶
func (p PDFAction) SetModificationDate(value foundation.INSDate)
func (PDFAction) SetUserName ¶
func (PDFAction) Type ¶
Returns the type of the action.
Return Value ¶
The type of the PDF action.
Discussion ¶
The PDF action type returned by this method may not correspond precisely to the name of a PDFAction subclass. For example, a PDFActionURL object might return “URI” or “Launch,” depending on the original action as defined by the Adobe PDF Specification. In the PDF Kit, these two actions are handled in the single PDFActionURL subclass, and the more familiar term “URL” is used instead.
See: https://developer.apple.com/documentation/PDFKit/PDFAction/type
func (PDFAction) UserName ¶
Returns the name of the user who created the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/username
type PDFActionClass ¶
type PDFActionClass struct {
// contains filtered or unexported fields
}
func GetPDFActionClass ¶
func GetPDFActionClass() PDFActionClass
GetPDFActionClass returns the class object for PDFAction.
func (PDFActionClass) Alloc ¶
func (pc PDFActionClass) Alloc() PDFAction
Alloc allocates memory for a new instance of the class.
func (PDFActionClass) Class ¶
func (pc PDFActionClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFActionGoTo ¶
type PDFActionGoTo struct {
PDFAction
}
PDFActionGoTo, a subclass of PDFAction, defines methods for getting and setting the destination of a go-to action.
Overview ¶
A PDFActionGoTo object represents the action of going to a specific location within the PDF document.
Accessing the Destination ¶
- PDFActionGoTo.Destination: Returns the destination associated with the action.
- PDFActionGoTo.SetDestination
Initializing the Action ¶
- PDFActionGoTo.InitWithDestination: Initializes the go-to action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionGoTo
func NewPDFActionGoTo ¶
func NewPDFActionGoTo() PDFActionGoTo
NewPDFActionGoTo creates a new PDFActionGoTo instance.
func NewPDFActionGoToWithDestination ¶
func NewPDFActionGoToWithDestination(destination IPDFDestination) PDFActionGoTo
Initializes the go-to action.
destination: The destination with which to initialize the go-to action.
Return Value ¶
An initialized PDFActionGoTo instance, or [NULL] if the object could not be initialized.
See: https://developer.apple.com/documentation/PDFKit/PDFActionGoTo/init(destination:)
func PDFActionGoToFromID ¶
func PDFActionGoToFromID(id objc.ID) PDFActionGoTo
PDFActionGoToFromID constructs a PDFActionGoTo from an objc.ID.
PDFActionGoTo, a subclass of PDFAction, defines methods for getting and setting the destination of a go-to action.
func (PDFActionGoTo) Autorelease ¶
func (p PDFActionGoTo) Autorelease() PDFActionGoTo
Autorelease adds the receiver to the current autorelease pool.
func (PDFActionGoTo) Destination ¶
func (p PDFActionGoTo) Destination() IPDFDestination
Returns the destination associated with the action.
Return Value ¶
The destination specified by the go-to action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionGoTo/destination
func (PDFActionGoTo) Init ¶
func (p PDFActionGoTo) Init() PDFActionGoTo
Init initializes the instance.
func (PDFActionGoTo) InitWithDestination ¶
func (p PDFActionGoTo) InitWithDestination(destination IPDFDestination) PDFActionGoTo
Initializes the go-to action.
destination: The destination with which to initialize the go-to action.
Return Value ¶
An initialized PDFActionGoTo instance, or [NULL] if the object could not be initialized.
See: https://developer.apple.com/documentation/PDFKit/PDFActionGoTo/init(destination:)
func (PDFActionGoTo) SetDestination ¶
func (p PDFActionGoTo) SetDestination(value IPDFDestination)
type PDFActionGoToClass ¶
type PDFActionGoToClass struct {
// contains filtered or unexported fields
}
func GetPDFActionGoToClass ¶
func GetPDFActionGoToClass() PDFActionGoToClass
GetPDFActionGoToClass returns the class object for PDFActionGoTo.
func (PDFActionGoToClass) Alloc ¶
func (pc PDFActionGoToClass) Alloc() PDFActionGoTo
Alloc allocates memory for a new instance of the class.
func (PDFActionGoToClass) Class ¶
func (pc PDFActionGoToClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFActionNamed ¶
type PDFActionNamed struct {
PDFAction
}
PDFActionNamed defines methods used to work with actions in PDF documents, some of which are named in the Adobe PDF Specification.
Overview ¶
A PDFActionNamed object represents an action with a defined name, such as “Go back” or “Zoom in.”
Accessing the Name of the Action ¶
- PDFActionNamed.Name: Returns the name of the named action.
- PDFActionNamed.SetName
Initializing the Action ¶
- PDFActionNamed.InitWithName: Initializes the [PDFActionName] object with the specified named action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionNamed
func NewPDFActionNamed ¶
func NewPDFActionNamed() PDFActionNamed
NewPDFActionNamed creates a new PDFActionNamed instance.
func NewPDFActionNamedWithName ¶
func NewPDFActionNamedWithName(name PDFActionNamedName) PDFActionNamed
Initializes the [PDFActionName] object with the specified named action.
name: The action name used to initialize the named action.
Return Value ¶
An initialized PDFActionNamed instance, or [NULL] if the object could not be initialized.
Discussion ¶
See PDFActionNamed for the names of named actions you can specify.
See: https://developer.apple.com/documentation/PDFKit/PDFActionNamed/init(name:)
func PDFActionNamedFromID ¶
func PDFActionNamedFromID(id objc.ID) PDFActionNamed
PDFActionNamedFromID constructs a PDFActionNamed from an objc.ID.
PDFActionNamed defines methods used to work with actions in PDF documents, some of which are named in the Adobe PDF Specification.
func (PDFActionNamed) Autorelease ¶
func (p PDFActionNamed) Autorelease() PDFActionNamed
Autorelease adds the receiver to the current autorelease pool.
func (PDFActionNamed) Init ¶
func (p PDFActionNamed) Init() PDFActionNamed
Init initializes the instance.
func (PDFActionNamed) InitWithName ¶
func (p PDFActionNamed) InitWithName(name PDFActionNamedName) PDFActionNamed
Initializes the [PDFActionName] object with the specified named action.
name: The action name used to initialize the named action.
Return Value ¶
An initialized PDFActionNamed instance, or [NULL] if the object could not be initialized.
Discussion ¶
See PDFActionNamed for the names of named actions you can specify.
See: https://developer.apple.com/documentation/PDFKit/PDFActionNamed/init(name:)
func (PDFActionNamed) Name ¶
func (p PDFActionNamed) Name() PDFActionNamedName
Returns the name of the named action.
Return Value ¶
The name of the named action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionNamed/name
func (PDFActionNamed) SetName ¶
func (p PDFActionNamed) SetName(value PDFActionNamedName)
type PDFActionNamedClass ¶
type PDFActionNamedClass struct {
// contains filtered or unexported fields
}
func GetPDFActionNamedClass ¶
func GetPDFActionNamedClass() PDFActionNamedClass
GetPDFActionNamedClass returns the class object for PDFActionNamed.
func (PDFActionNamedClass) Alloc ¶
func (pc PDFActionNamedClass) Alloc() PDFActionNamed
Alloc allocates memory for a new instance of the class.
func (PDFActionNamedClass) Class ¶
func (pc PDFActionNamedClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFActionNamedName ¶
type PDFActionNamedName int
See: https://developer.apple.com/documentation/PDFKit/PDFActionNamedName
const ( // KPDFActionNamedFind: The Find action. KPDFActionNamedFind PDFActionNamedName = 8 // KPDFActionNamedFirstPage: The First Page action. KPDFActionNamedFirstPage PDFActionNamedName = 3 // KPDFActionNamedGoBack: The Go Back action. KPDFActionNamedGoBack PDFActionNamedName = 5 // KPDFActionNamedGoForward: The Go Forward action. KPDFActionNamedGoForward PDFActionNamedName = 6 // KPDFActionNamedGoToPage: The Go to Page action. KPDFActionNamedGoToPage PDFActionNamedName = 7 // KPDFActionNamedLastPage: The Last Page action. KPDFActionNamedLastPage PDFActionNamedName = 4 // KPDFActionNamedNextPage: The Next Page action. KPDFActionNamedNextPage PDFActionNamedName = 1 // KPDFActionNamedNone: The action has no name. KPDFActionNamedNone PDFActionNamedName = 0 // KPDFActionNamedPreviousPage: The Previous Page action. KPDFActionNamedPreviousPage PDFActionNamedName = 2 // KPDFActionNamedPrint: The Print action. KPDFActionNamedPrint PDFActionNamedName = 9 // KPDFActionNamedZoomIn: The Zoom In action. KPDFActionNamedZoomIn PDFActionNamedName = 10 // KPDFActionNamedZoomOut: The Zoom Out action. KPDFActionNamedZoomOut PDFActionNamedName = 11 )
func (PDFActionNamedName) String ¶
func (e PDFActionNamedName) String() string
type PDFActionRemoteGoTo ¶
type PDFActionRemoteGoTo struct {
PDFAction
}
PDFActionRemoteGoTo, a subclass of PDFAction, defines methods for getting and setting the destination of a go-to action that targets another document.
Initializing the Remote Go-to Action ¶
- PDFActionRemoteGoTo.InitWithPageIndexAtPointFileURL: Initializes the remote go-to action with the specified page index, point, and document URL.
Accessing the Page Index of the Referenced Document ¶
- PDFActionRemoteGoTo.PageIndex: Returns the zero-based page index referenced by the remote go-to action.
- PDFActionRemoteGoTo.SetPageIndex
Accessing a Point on the Referenced Page ¶
- PDFActionRemoteGoTo.Point: Sets the point, in page space, on the page referenced by the remote go-to action.
- PDFActionRemoteGoTo.SetPoint
Accessing the URL of the Referenced Document ¶
- PDFActionRemoteGoTo.URL: Returns the URL of the document referenced by the remote go-to action.
- PDFActionRemoteGoTo.SetURL
See: https://developer.apple.com/documentation/PDFKit/PDFActionRemoteGoTo
func NewPDFActionRemoteGoTo ¶
func NewPDFActionRemoteGoTo() PDFActionRemoteGoTo
NewPDFActionRemoteGoTo creates a new PDFActionRemoteGoTo instance.
func NewPDFActionRemoteGoToWithPageIndexAtPointFileURL ¶
func NewPDFActionRemoteGoToWithPageIndexAtPointFileURL(pageIndex uint, point corefoundation.CGPoint, url foundation.INSURL) PDFActionRemoteGoTo
Initializes the remote go-to action with the specified page index, point, and document URL.
pageIndex: The page index of the remote document.
point: The point on the page in the remote document.
url: The URL of the remote PDF document.
Return Value ¶
An initialized PDFActionRemoteGoTo instance, or [NULL] if the object could not be initialized.
Discussion ¶
The PDFActionRemoteGoTo object uses a zero-based page index, not a PDFPage object. This simplifies the handling of remote destinations for documents that may not be instantiated yet.
See: https://developer.apple.com/documentation/PDFKit/PDFActionRemoteGoTo/init(pageIndex:at:fileURL:)
func PDFActionRemoteGoToFromID ¶
func PDFActionRemoteGoToFromID(id objc.ID) PDFActionRemoteGoTo
PDFActionRemoteGoToFromID constructs a PDFActionRemoteGoTo from an objc.ID.
PDFActionRemoteGoTo, a subclass of PDFAction, defines methods for getting and setting the destination of a go-to action that targets another document.
func (PDFActionRemoteGoTo) Autorelease ¶
func (p PDFActionRemoteGoTo) Autorelease() PDFActionRemoteGoTo
Autorelease adds the receiver to the current autorelease pool.
func (PDFActionRemoteGoTo) Init ¶
func (p PDFActionRemoteGoTo) Init() PDFActionRemoteGoTo
Init initializes the instance.
func (PDFActionRemoteGoTo) InitWithPageIndexAtPointFileURL ¶
func (p PDFActionRemoteGoTo) InitWithPageIndexAtPointFileURL(pageIndex uint, point corefoundation.CGPoint, url foundation.INSURL) PDFActionRemoteGoTo
Initializes the remote go-to action with the specified page index, point, and document URL.
pageIndex: The page index of the remote document.
point: The point on the page in the remote document.
url: The URL of the remote PDF document.
Return Value ¶
An initialized PDFActionRemoteGoTo instance, or [NULL] if the object could not be initialized.
Discussion ¶
The PDFActionRemoteGoTo object uses a zero-based page index, not a PDFPage object. This simplifies the handling of remote destinations for documents that may not be instantiated yet.
See: https://developer.apple.com/documentation/PDFKit/PDFActionRemoteGoTo/init(pageIndex:at:fileURL:)
func (PDFActionRemoteGoTo) PageIndex ¶
func (p PDFActionRemoteGoTo) PageIndex() uint
Returns the zero-based page index referenced by the remote go-to action.
Return Value ¶
The page index referenced by the remote go-to action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionRemoteGoTo/pageIndex
func (PDFActionRemoteGoTo) Point ¶
func (p PDFActionRemoteGoTo) Point() corefoundation.CGPoint
Sets the point, in page space, on the page referenced by the remote go-to action.
Discussion ¶
Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFActionRemoteGoTo/point
func (PDFActionRemoteGoTo) SetPageIndex ¶
func (p PDFActionRemoteGoTo) SetPageIndex(value uint)
func (PDFActionRemoteGoTo) SetPoint ¶
func (p PDFActionRemoteGoTo) SetPoint(value corefoundation.CGPoint)
func (PDFActionRemoteGoTo) SetURL ¶
func (p PDFActionRemoteGoTo) SetURL(value foundation.INSURL)
func (PDFActionRemoteGoTo) URL ¶
func (p PDFActionRemoteGoTo) URL() foundation.INSURL
Returns the URL of the document referenced by the remote go-to action.
Return Value ¶
The URL of the remote document referenced by the action.
See: https://developer.apple.com/documentation/PDFKit/PDFActionRemoteGoTo/url
type PDFActionRemoteGoToClass ¶
type PDFActionRemoteGoToClass struct {
// contains filtered or unexported fields
}
func GetPDFActionRemoteGoToClass ¶
func GetPDFActionRemoteGoToClass() PDFActionRemoteGoToClass
GetPDFActionRemoteGoToClass returns the class object for PDFActionRemoteGoTo.
func (PDFActionRemoteGoToClass) Alloc ¶
func (pc PDFActionRemoteGoToClass) Alloc() PDFActionRemoteGoTo
Alloc allocates memory for a new instance of the class.
func (PDFActionRemoteGoToClass) Class ¶
func (pc PDFActionRemoteGoToClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFActionResetForm ¶
type PDFActionResetForm struct {
PDFAction
}
PDFActionResetForm, a subclass of PDFAction, defines methods for getting and clearing fields in a PDF form.
Overview ¶
A PDFActionResetForm object represents an action associated with a PDF form.
Accessing and Changing Fields ¶
- PDFActionResetForm.Fields: Returns an array of fields associated with the reset action.
- PDFActionResetForm.SetFields
Determining Whether Fields are Cleared When the Action is Performed ¶
- PDFActionResetForm.FieldsIncludedAreCleared: Sets whether the fields associated with the reset action are cleared when the action is performed.
- PDFActionResetForm.SetFieldsIncludedAreCleared
See: https://developer.apple.com/documentation/PDFKit/PDFActionResetForm
func NewPDFActionResetForm ¶
func NewPDFActionResetForm() PDFActionResetForm
NewPDFActionResetForm creates a new PDFActionResetForm instance.
func PDFActionResetFormFromID ¶
func PDFActionResetFormFromID(id objc.ID) PDFActionResetForm
PDFActionResetFormFromID constructs a PDFActionResetForm from an objc.ID.
PDFActionResetForm, a subclass of PDFAction, defines methods for getting and clearing fields in a PDF form.
func (PDFActionResetForm) Autorelease ¶
func (p PDFActionResetForm) Autorelease() PDFActionResetForm
Autorelease adds the receiver to the current autorelease pool.
func (PDFActionResetForm) Fields ¶
func (p PDFActionResetForm) Fields() []string
Returns an array of fields associated with the reset action.
Return Value ¶
An array of [NSString] objects that corresponds to the `fieldNames` property of widget annotations (such as PDFAnnotationButtonWidget) on the PDF page. This method can return [NULL].
See: https://developer.apple.com/documentation/PDFKit/PDFActionResetForm/fields
func (PDFActionResetForm) FieldsIncludedAreCleared ¶
func (p PDFActionResetForm) FieldsIncludedAreCleared() bool
Sets whether the fields associated with the reset action are cleared when the action is performed.
See: https://developer.apple.com/documentation/PDFKit/PDFActionResetForm/fieldsIncludedAreCleared
func (PDFActionResetForm) Init ¶
func (p PDFActionResetForm) Init() PDFActionResetForm
Init initializes the instance.
func (PDFActionResetForm) SetFields ¶
func (p PDFActionResetForm) SetFields(value []string)
func (PDFActionResetForm) SetFieldsIncludedAreCleared ¶
func (p PDFActionResetForm) SetFieldsIncludedAreCleared(value bool)
type PDFActionResetFormClass ¶
type PDFActionResetFormClass struct {
// contains filtered or unexported fields
}
func GetPDFActionResetFormClass ¶
func GetPDFActionResetFormClass() PDFActionResetFormClass
GetPDFActionResetFormClass returns the class object for PDFActionResetForm.
func (PDFActionResetFormClass) Alloc ¶
func (pc PDFActionResetFormClass) Alloc() PDFActionResetForm
Alloc allocates memory for a new instance of the class.
func (PDFActionResetFormClass) Class ¶
func (pc PDFActionResetFormClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFActionURL ¶
type PDFActionURL struct {
PDFAction
}
PDFActionURL, a subclass of PDFAction, defines methods for getting and setting the URL associated with a URL action.
Initializing a URL Action ¶
- PDFActionURL.InitWithURL: Initializes a URL action with the specified URL.
Accessing and Changing the URL ¶
- PDFActionURL.URL: Returns the URL associated with the URL action.
- PDFActionURL.SetURL
See: https://developer.apple.com/documentation/PDFKit/PDFActionURL
func NewPDFActionURL ¶
func NewPDFActionURL() PDFActionURL
NewPDFActionURL creates a new PDFActionURL instance.
func NewPDFActionURLWithURL ¶
func NewPDFActionURLWithURL(url foundation.INSURL) PDFActionURL
Initializes a URL action with the specified URL.
url: The URL to set the action to.
Return Value ¶
An initialized PDFActionURL instance, or [NULL] if the object could not be initialized.
See: https://developer.apple.com/documentation/PDFKit/PDFActionURL/init(url:)
func PDFActionURLFromID ¶
func PDFActionURLFromID(id objc.ID) PDFActionURL
PDFActionURLFromID constructs a PDFActionURL from an objc.ID.
PDFActionURL, a subclass of PDFAction, defines methods for getting and setting the URL associated with a URL action.
func (PDFActionURL) Autorelease ¶
func (p PDFActionURL) Autorelease() PDFActionURL
Autorelease adds the receiver to the current autorelease pool.
func (PDFActionURL) InitWithURL ¶
func (p PDFActionURL) InitWithURL(url foundation.INSURL) PDFActionURL
Initializes a URL action with the specified URL.
url: The URL to set the action to.
Return Value ¶
An initialized PDFActionURL instance, or [NULL] if the object could not be initialized.
See: https://developer.apple.com/documentation/PDFKit/PDFActionURL/init(url:)
func (PDFActionURL) SetURL ¶
func (p PDFActionURL) SetURL(value foundation.INSURL)
func (PDFActionURL) URL ¶
func (p PDFActionURL) URL() foundation.INSURL
Returns the URL associated with the URL action.
Return Value ¶
The URL associated with the action, or [NULL] if no URL is specified.
See: https://developer.apple.com/documentation/PDFKit/PDFActionURL/url
type PDFActionURLClass ¶
type PDFActionURLClass struct {
// contains filtered or unexported fields
}
func GetPDFActionURLClass ¶
func GetPDFActionURLClass() PDFActionURLClass
GetPDFActionURLClass returns the class object for PDFActionURL.
func (PDFActionURLClass) Alloc ¶
func (pc PDFActionURLClass) Alloc() PDFActionURL
Alloc allocates memory for a new instance of the class.
func (PDFActionURLClass) Class ¶
func (pc PDFActionURLClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFAnnotation ¶
type PDFAnnotation struct {
objectivec.Object
}
An annotation in a PDF document.
Overview ¶
In addition to its primary textual content, a PDF file can contain annotations that represent links, form elements, highlighting circles, textual notes, and so on. Each annotation has a specific location on a page and may offer interactivity with the user.
Creating an Annotation ¶
- PDFAnnotation.InitWithBoundsForTypeWithProperties: Creates a PDF annotation with the specified bounds, type, and optional properties.
Accessing Information About an Annotation ¶
- PDFAnnotation.Page: Returns the page that the annotation is associated with.
- PDFAnnotation.SetPage
- PDFAnnotation.ModificationDate: Returns the modification date of the annotation.
- PDFAnnotation.SetModificationDate
- PDFAnnotation.UserName: Returns the name of the user who created the annotation.
- PDFAnnotation.SetUserName
- PDFAnnotation.Type: Returns the type of the annotation.
- PDFAnnotation.SetType
- PDFAnnotation.Action: An object that represents an action for a PDF element, such as a link annotation.
- PDFAnnotation.SetAction
Managing Annotation Drawing and Output ¶
- PDFAnnotation.DrawWithBoxInContext: Draws the annotation in a graphics context using page-space coordinates relative to the origin of the specified box.
- PDFAnnotation.ShouldDisplay: Returns a Boolean value indicating whether the annotation should be displayed.
- PDFAnnotation.SetShouldDisplay
- PDFAnnotation.ShouldPrint: Returns a Boolean value indicating whether the annotation should appear when the document is printed.
- PDFAnnotation.SetShouldPrint
Modifying Annotation Attributes ¶
- PDFAnnotation.AnnotationKeyValues: A dictionary that contains a deep copy of the widget’s properties.
- PDFAnnotation.ValueForAnnotationKey: Returns a deep copy of the key-value pairs of properties for the specified key.
- PDFAnnotation.SetValueForAnnotationKey: Sets a value in the annotation’s dictionary.
- PDFAnnotation.SetBooleanForAnnotationKey: Sets a Boolean value in the annotation’s dictionary.
- PDFAnnotation.SetRectForAnnotationKey: Sets a rectangle value in the annotation’s dictionary.
- PDFAnnotation.RemoveValueForAnnotationKey: Removes a value from the annotation’s dictionary.
Managing Annotation Display Characteristics ¶
- PDFAnnotation.Alignment: The alignment of the free text and text widget annotation’s text content.
- PDFAnnotation.SetAlignment
- PDFAnnotation.Bounds: Returns the bounding box for the annotation in page space.
- PDFAnnotation.SetBounds
- PDFAnnotation.Contents: Returns the textual content (if any) associated with the annotation.
- PDFAnnotation.SetContents
- PDFAnnotation.Font: The font the annotation uses to display text.
- PDFAnnotation.SetFont
- PDFAnnotation.FontColor: The font color the annotation uses to display text.
- PDFAnnotation.SetFontColor
- PDFAnnotation.Border: Sets the border style for the annotation.
- PDFAnnotation.SetBorder
- PDFAnnotation.Highlighted: A Boolean value that indicates whether the annotation is in a highlighted state, such as when the mouse is down on a link annotation.
- PDFAnnotation.SetHighlighted
- PDFAnnotation.Color: Sets the stroke color for the annotation.
- PDFAnnotation.SetColor
- PDFAnnotation.HasAppearanceStream: Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.
Configuring Shape Annotations ¶
- PDFAnnotation.InteriorColor: The fill color for drawing a circle, line, or square annotation.
- PDFAnnotation.SetInteriorColor
Configuring Line Annotations ¶
- PDFAnnotation.StartPoint: The point where a line begins, in annotation-space coordinates.
- PDFAnnotation.SetStartPoint
- PDFAnnotation.EndPoint: The point where a line ends, in annotation-space coordinates.
- PDFAnnotation.SetEndPoint
- PDFAnnotation.StartLineStyle: The style of the line annotation’s starting point, such as square or filled arrowhead.
- PDFAnnotation.SetStartLineStyle
- PDFAnnotation.EndLineStyle: The style of the line annotation’s ending point, such as square or filled arrowhead.
- PDFAnnotation.SetEndLineStyle
Configuring Link Annotations ¶
- PDFAnnotation.Destination: The destination for a link annotation.
- PDFAnnotation.SetDestination
- PDFAnnotation.URL: A URL for a link annotation.
- PDFAnnotation.SetURL
Configuring Text Annotations ¶
- PDFAnnotation.IconType: The type of icon to display for a pop-up text annotation.
- PDFAnnotation.SetIconType
Configuring Pop-Up Annotations ¶
- PDFAnnotation.Popup: Returns the pop-up annotation associated with an annotation.
- PDFAnnotation.SetPopup
- PDFAnnotation.Open: A Boolean value that indicates whether the pop-up annotation is in an opened state, displaying its text content, or in a closed state, displaying an icon.
- PDFAnnotation.SetOpen
Configuring Text Markup Annotations ¶
- PDFAnnotation.MarkupType: The markup type that the annotation displays, either highlight, strikethrough, underline, or redact.
- PDFAnnotation.SetMarkupType
- PDFAnnotation.QuadrilateralPoints: An array of values that represents the points bounding the marked-up text.
- PDFAnnotation.SetQuadrilateralPoints
Configuring Widget Annotations ¶
- PDFAnnotation.WidgetFieldType: The type of widget annotation, such as button, choice, or text.
- PDFAnnotation.SetWidgetFieldType
- PDFAnnotation.WidgetStringValue: The string value of the widget annotation.
- PDFAnnotation.SetWidgetStringValue
- PDFAnnotation.WidgetDefaultStringValue: The string value that the widget reverts to when performing a reset form action.
- PDFAnnotation.SetWidgetDefaultStringValue
- PDFAnnotation.FieldName: The widget identifier for form annotation actions and behaviors.
- PDFAnnotation.SetFieldName
- PDFAnnotation.BackgroundColor: The color of the widget’s background.
- PDFAnnotation.SetBackgroundColor
- PDFAnnotation.ReadOnly: A Boolean value that determines whether the widget is editable.
- PDFAnnotation.SetReadOnly
Configuring Text Widget Annotations ¶
- PDFAnnotation.Multiline: A Boolean value that indicates whether the text widget annotation displays multiple lines.
- PDFAnnotation.SetMultiline
- PDFAnnotation.IsPasswordField: A Boolean value that indicates whether the text widget annotation displays a password field using bullet characters.
- PDFAnnotation.MaximumLength: The maximum number of characters the text widget annotation allows.
- PDFAnnotation.SetMaximumLength
- PDFAnnotation.Comb: A Boolean value that indicates whether the annotation divides the text widget’s bounds into equally spaced segments, such as in a form entry field.
- PDFAnnotation.SetComb
Configuring Button Widget Annotations ¶
- PDFAnnotation.WidgetControlType: The type of button widget control, either radio button, push button, or checkbox.
- PDFAnnotation.SetWidgetControlType
- PDFAnnotation.ButtonWidgetState: The current state of the button widget annotation.
- PDFAnnotation.SetButtonWidgetState
- PDFAnnotation.ButtonWidgetStateString: A string value that differentiates button widgets in the same group, such as to identify mutually exclusive radio buttons from each other.
- PDFAnnotation.SetButtonWidgetStateString
- PDFAnnotation.Caption: The title of push button widget annotations.
- PDFAnnotation.SetCaption
- PDFAnnotation.AllowsToggleToOff: A Boolean value that indicates whether clicking or tapping a selected radio button toggles it to an unselected state.
- PDFAnnotation.SetAllowsToggleToOff
- PDFAnnotation.RadiosInUnison: A Boolean value that indicates whether radio buttons in a group turn on and off in unison.
- PDFAnnotation.SetRadiosInUnison
Configuring Choice Widget Annotations ¶
- PDFAnnotation.Choices: An array of strings that specifies the options in either a list or a pop-up menu.
- PDFAnnotation.SetChoices
- PDFAnnotation.ListChoice: A Boolean value that indicates whether the choice widget annotation is a list or a pop-up menu.
- PDFAnnotation.SetListChoice
- PDFAnnotation.Values: An array of strings that specifies the export values for items in a list or a pop-up menu.
- PDFAnnotation.SetValues
Configuring Ink Annotations ¶
- PDFAnnotation.Paths: An array of bezier paths, in annotation-space coordinates, that compose the annotation.
- PDFAnnotation.AddBezierPath: Adds a bezier path to the ink annotation.
- PDFAnnotation.RemoveBezierPath: Removes a bezier path from an ink annotation.
Configuring Stamp Annotations ¶
- PDFAnnotation.StampName: The name of the stamp, a text or graphics annotation that emulates a rubber stamp effect.
- PDFAnnotation.SetStampName
Instance Properties ¶
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation
func NewPDFAnnotation ¶
func NewPDFAnnotation() PDFAnnotation
NewPDFAnnotation creates a new PDFAnnotation instance.
func NewPDFAnnotationWithBoundsForTypeWithProperties ¶
func NewPDFAnnotationWithBoundsForTypeWithProperties(bounds corefoundation.CGRect, annotationType PDFAnnotationSubtype, properties foundation.INSDictionary) PDFAnnotation
Creates a PDF annotation with the specified bounds, type, and optional properties.
bounds: The bounding box of the annotation, in page-space coordinates.
annotationType: The subtype of the annotation, such as text, link, or line.
properties: A dictionary that contains properties of the annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/init(bounds:forType:withProperties:)
func PDFAnnotationFromID ¶
func PDFAnnotationFromID(id objc.ID) PDFAnnotation
PDFAnnotationFromID constructs a PDFAnnotation from an objc.ID.
An annotation in a PDF document.
func (PDFAnnotation) Action ¶
func (p PDFAnnotation) Action() IPDFAction
An object that represents an action for a PDF element, such as a link annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/action
func (PDFAnnotation) ActivatableTextField ¶
func (p PDFAnnotation) ActivatableTextField() bool
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/isActivatableTextField
func (PDFAnnotation) AddBezierPath ¶
func (p PDFAnnotation) AddBezierPath(path objectivec.IObject)
Adds a bezier path to the ink annotation.
path: The bezier path to add, in annotation-space coordinates.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/add(_:)
func (PDFAnnotation) Alignment ¶
func (p PDFAnnotation) Alignment() appkit.NSTextAlignment
The alignment of the free text and text widget annotation’s text content.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/alignment
func (PDFAnnotation) AllowsToggleToOff ¶
func (p PDFAnnotation) AllowsToggleToOff() bool
A Boolean value that indicates whether clicking or tapping a selected radio button toggles it to an unselected state.
Discussion ¶
To implement a group of radio buttons where at least one option must remain in a selected state, set [AllowsToggleToOff] to false on each button in the group.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/allowsToggleToOff
func (PDFAnnotation) AnnotationKeyValues ¶
func (p PDFAnnotation) AnnotationKeyValues() foundation.INSDictionary
A dictionary that contains a deep copy of the widget’s properties.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/annotationKeyValues
func (PDFAnnotation) Autorelease ¶
func (p PDFAnnotation) Autorelease() PDFAnnotation
Autorelease adds the receiver to the current autorelease pool.
func (PDFAnnotation) BackgroundColor ¶
func (p PDFAnnotation) BackgroundColor() objc.ID
The color of the widget’s background.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/backgroundColor
func (PDFAnnotation) Border ¶
func (p PDFAnnotation) Border() IPDFBorder
Sets the border style for the annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/border
func (PDFAnnotation) Bounds ¶
func (p PDFAnnotation) Bounds() corefoundation.CGRect
Returns the bounding box for the annotation in page space.
Return Value ¶
The bounding box for the annotation in page space.
Discussion ¶
Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/bounds
func (PDFAnnotation) ButtonWidgetState ¶
func (p PDFAnnotation) ButtonWidgetState() PDFWidgetCellState
The current state of the button widget annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/buttonWidgetState
func (PDFAnnotation) ButtonWidgetStateString ¶
func (p PDFAnnotation) ButtonWidgetStateString() string
A string value that differentiates button widgets in the same group, such as to identify mutually exclusive radio buttons from each other.
Discussion ¶
The default value is [Yes].
To group button widgets, set the same [FieldName] on the button widgets. The [ButtonWidgetStateString] property allows you to identify individual button widgets in that group.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/buttonWidgetStateString
func (PDFAnnotation) Caption ¶
func (p PDFAnnotation) Caption() string
The title of push button widget annotations.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/caption
func (PDFAnnotation) Choices ¶
func (p PDFAnnotation) Choices() []string
An array of strings that specifies the options in either a list or a pop-up menu.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/choices
func (PDFAnnotation) Color ¶
func (p PDFAnnotation) Color() objc.ID
Sets the stroke color for the annotation.
Discussion ¶
Where this color is used depends on the annotation type.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/color
func (PDFAnnotation) Comb ¶
func (p PDFAnnotation) Comb() bool
A Boolean value that indicates whether the annotation divides the text widget’s bounds into equally spaced segments, such as in a form entry field.
Discussion ¶
The [MaximumLength] property specifies the number of spaces the text widget divides the bounds into.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/hasComb
func (PDFAnnotation) Contents ¶
func (p PDFAnnotation) Contents() string
Returns the textual content (if any) associated with the annotation.
Return Value ¶
A string representing the textual content associated with the annotation.
Discussion ¶
Textual content is typically associated with [PDFAnnotationText] and [PDFAnnotationFreeText] annotations.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/contents
func (PDFAnnotation) Destination ¶
func (p PDFAnnotation) Destination() IPDFDestination
The destination for a link annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/destination
func (PDFAnnotation) DrawWithBoxInContext ¶
func (p PDFAnnotation) DrawWithBoxInContext(box PDFDisplayBox, context coregraphics.CGContextRef)
Draws the annotation in a graphics context using page-space coordinates relative to the origin of the specified box.
box: The display box that represents the rectangle to draw the annotation in, in page-space coordinates.
context: The graphics context to draw the annotation in.
Discussion ¶
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/draw(with:in:)
func (PDFAnnotation) EncodeWithCoder ¶
func (p PDFAnnotation) EncodeWithCoder(coder foundation.INSCoder)
func (PDFAnnotation) EndLineStyle ¶
func (p PDFAnnotation) EndLineStyle() PDFLineStyle
The style of the line annotation’s ending point, such as square or filled arrowhead.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/endLineStyle
func (PDFAnnotation) EndPoint ¶
func (p PDFAnnotation) EndPoint() corefoundation.CGPoint
The point where a line ends, in annotation-space coordinates.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/endPoint
func (PDFAnnotation) FieldName ¶
func (p PDFAnnotation) FieldName() string
The widget identifier for form annotation actions and behaviors.
Discussion ¶
Use this identifier to refer to the widget when using a PDFActionResetForm action.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/fieldName
func (PDFAnnotation) Font ¶
func (p PDFAnnotation) Font() objectivec.IObject
The font the annotation uses to display text.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/font
func (PDFAnnotation) FontColor ¶
func (p PDFAnnotation) FontColor() objc.ID
The font color the annotation uses to display text.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/fontColor
func (PDFAnnotation) HasAppearanceStream ¶
func (p PDFAnnotation) HasAppearanceStream() bool
Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.
Return Value ¶
true if the annotation has an appearance stream; otherwise false.
Discussion ¶
An appearance stream is a sequence of draw instructions used to render a PDF item. If an appearance stream exists, PDF Kit draws the annotation using the stream, which may override existing set parameters (such as the stroke color set with `setColor`).
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/hasAppearanceStream
func (PDFAnnotation) Highlighted ¶
func (p PDFAnnotation) Highlighted() bool
A Boolean value that indicates whether the annotation is in a highlighted state, such as when the mouse is down on a link annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/isHighlighted
func (PDFAnnotation) IconType ¶
func (p PDFAnnotation) IconType() PDFTextAnnotationIconType
The type of icon to display for a pop-up text annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/iconType
func (PDFAnnotation) Init ¶
func (p PDFAnnotation) Init() PDFAnnotation
Init initializes the instance.
func (PDFAnnotation) InitWithBoundsForTypeWithProperties ¶
func (p PDFAnnotation) InitWithBoundsForTypeWithProperties(bounds corefoundation.CGRect, annotationType PDFAnnotationSubtype, properties foundation.INSDictionary) PDFAnnotation
Creates a PDF annotation with the specified bounds, type, and optional properties.
bounds: The bounding box of the annotation, in page-space coordinates.
annotationType: The subtype of the annotation, such as text, link, or line.
properties: A dictionary that contains properties of the annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/init(bounds:forType:withProperties:)
func (PDFAnnotation) InteriorColor ¶
func (p PDFAnnotation) InteriorColor() objc.ID
The fill color for drawing a circle, line, or square annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/interiorColor
func (PDFAnnotation) IsPasswordField ¶
func (p PDFAnnotation) IsPasswordField() bool
A Boolean value that indicates whether the text widget annotation displays a password field using bullet characters.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/isPasswordField
func (PDFAnnotation) ListChoice ¶
func (p PDFAnnotation) ListChoice() bool
A Boolean value that indicates whether the choice widget annotation is a list or a pop-up menu.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/isListChoice
func (PDFAnnotation) MarkupType ¶
func (p PDFAnnotation) MarkupType() PDFMarkupType
The markup type that the annotation displays, either highlight, strikethrough, underline, or redact.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/markupType
func (PDFAnnotation) MaximumLength ¶
func (p PDFAnnotation) MaximumLength() int
The maximum number of characters the text widget annotation allows.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/maximumLength
func (PDFAnnotation) ModificationDate ¶
func (p PDFAnnotation) ModificationDate() foundation.INSDate
Returns the modification date of the annotation.
Return Value ¶
The modification date of the annotation, or [NULL] if there is no modification date.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/modificationDate
func (PDFAnnotation) Multiline ¶
func (p PDFAnnotation) Multiline() bool
A Boolean value that indicates whether the text widget annotation displays multiple lines.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/isMultiline
func (PDFAnnotation) Open ¶
func (p PDFAnnotation) Open() bool
A Boolean value that indicates whether the pop-up annotation is in an opened state, displaying its text content, or in a closed state, displaying an icon.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/isOpen
func (PDFAnnotation) Page ¶
func (p PDFAnnotation) Page() IPDFPage
Returns the page that the annotation is associated with.
Return Value ¶
The PDF page associated with the annotation.
Discussion ¶
The [AddAnnotation] method in the PDFPage class lets you associate an annotation with a page.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/page
func (PDFAnnotation) Paths ¶
func (p PDFAnnotation) Paths() []objc.ID
An array of bezier paths, in annotation-space coordinates, that compose the annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/paths
func (PDFAnnotation) Popup ¶
func (p PDFAnnotation) Popup() IPDFAnnotation
Returns the pop-up annotation associated with an annotation.
Return Value ¶
The pop-up annotation associated with the annotation, or [NULL] if no pop-up exists.
Discussion ¶
Pop-up annotations are not used with links or widgets. The bounds and open state of the pop-up annotation indicate the placement and open state of the pop-up window.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/popup
func (PDFAnnotation) QuadrilateralPoints ¶
func (p PDFAnnotation) QuadrilateralPoints() []foundation.NSValue
An array of values that represents the points bounding the marked-up text.
Discussion ¶
The array contains `N * 4` NSValue objects that use pointValue or cgPointValue to define [N] quadrilaterals in page-space coordinates, where [N] is the number of quad points. The order of the points is a Z pattern as follows:
- Upper-left point - Upper-right point - Lower-left point - Lower-right point
The coordinates of each point are relative to the bound’s origin of the annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/quadrilateralPoints
func (PDFAnnotation) RadiosInUnison ¶
func (p PDFAnnotation) RadiosInUnison() bool
A Boolean value that indicates whether radio buttons in a group turn on and off in unison.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/radiosInUnison
func (PDFAnnotation) ReadOnly ¶
func (p PDFAnnotation) ReadOnly() bool
A Boolean value that determines whether the widget is editable.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/isReadOnly
func (PDFAnnotation) RemoveBezierPath ¶
func (p PDFAnnotation) RemoveBezierPath(path objectivec.IObject)
Removes a bezier path from an ink annotation.
path: The bezier path to remove, in annotation-space coordinates.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/remove(_:)
func (PDFAnnotation) RemoveValueForAnnotationKey ¶
func (p PDFAnnotation) RemoveValueForAnnotationKey(key PDFAnnotationKey)
Removes a value from the annotation’s dictionary.
key: A PDFAnnotationKey or appropriate string from the Adobe PDF Specification.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/removeValue(forAnnotationKey:)
func (PDFAnnotation) SetAction ¶
func (p PDFAnnotation) SetAction(value IPDFAction)
func (PDFAnnotation) SetAlignment ¶
func (p PDFAnnotation) SetAlignment(value appkit.NSTextAlignment)
func (PDFAnnotation) SetAllowsToggleToOff ¶
func (p PDFAnnotation) SetAllowsToggleToOff(value bool)
func (PDFAnnotation) SetBackgroundColor ¶
func (p PDFAnnotation) SetBackgroundColor(value objc.ID)
func (PDFAnnotation) SetBooleanForAnnotationKey ¶
func (p PDFAnnotation) SetBooleanForAnnotationKey(value bool, key PDFAnnotationKey) bool
Sets a Boolean value in the annotation’s dictionary.
value: The Boolean value to set in the annotation’s dictionary.
key: A PDFAnnotationKey or appropriate string from the Adobe PDF Specification.
Return Value ¶
true if the value sets successfully; otherwise, false.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/setBoolean(_:forAnnotationKey:)
func (PDFAnnotation) SetBorder ¶
func (p PDFAnnotation) SetBorder(value IPDFBorder)
func (PDFAnnotation) SetBounds ¶
func (p PDFAnnotation) SetBounds(value corefoundation.CGRect)
func (PDFAnnotation) SetButtonWidgetState ¶
func (p PDFAnnotation) SetButtonWidgetState(value PDFWidgetCellState)
func (PDFAnnotation) SetButtonWidgetStateString ¶
func (p PDFAnnotation) SetButtonWidgetStateString(value string)
func (PDFAnnotation) SetCaption ¶
func (p PDFAnnotation) SetCaption(value string)
func (PDFAnnotation) SetChoices ¶
func (p PDFAnnotation) SetChoices(value []string)
func (PDFAnnotation) SetColor ¶
func (p PDFAnnotation) SetColor(value objc.ID)
func (PDFAnnotation) SetComb ¶
func (p PDFAnnotation) SetComb(value bool)
func (PDFAnnotation) SetContents ¶
func (p PDFAnnotation) SetContents(value string)
func (PDFAnnotation) SetDestination ¶
func (p PDFAnnotation) SetDestination(value IPDFDestination)
func (PDFAnnotation) SetEndLineStyle ¶
func (p PDFAnnotation) SetEndLineStyle(value PDFLineStyle)
func (PDFAnnotation) SetEndPoint ¶
func (p PDFAnnotation) SetEndPoint(value corefoundation.CGPoint)
func (PDFAnnotation) SetFieldName ¶
func (p PDFAnnotation) SetFieldName(value string)
func (PDFAnnotation) SetFont ¶
func (p PDFAnnotation) SetFont(value objectivec.IObject)
func (PDFAnnotation) SetFontColor ¶
func (p PDFAnnotation) SetFontColor(value objc.ID)
func (PDFAnnotation) SetHighlighted ¶
func (p PDFAnnotation) SetHighlighted(value bool)
func (PDFAnnotation) SetIconType ¶
func (p PDFAnnotation) SetIconType(value PDFTextAnnotationIconType)
func (PDFAnnotation) SetInteriorColor ¶
func (p PDFAnnotation) SetInteriorColor(value objc.ID)
func (PDFAnnotation) SetListChoice ¶
func (p PDFAnnotation) SetListChoice(value bool)
func (PDFAnnotation) SetMarkupType ¶
func (p PDFAnnotation) SetMarkupType(value PDFMarkupType)
func (PDFAnnotation) SetMaximumLength ¶
func (p PDFAnnotation) SetMaximumLength(value int)
func (PDFAnnotation) SetModificationDate ¶
func (p PDFAnnotation) SetModificationDate(value foundation.INSDate)
func (PDFAnnotation) SetMultiline ¶
func (p PDFAnnotation) SetMultiline(value bool)
func (PDFAnnotation) SetOpen ¶
func (p PDFAnnotation) SetOpen(value bool)
func (PDFAnnotation) SetPage ¶
func (p PDFAnnotation) SetPage(value IPDFPage)
func (PDFAnnotation) SetPopup ¶
func (p PDFAnnotation) SetPopup(value IPDFAnnotation)
func (PDFAnnotation) SetQuadrilateralPoints ¶
func (p PDFAnnotation) SetQuadrilateralPoints(value []foundation.NSValue)
func (PDFAnnotation) SetRadiosInUnison ¶
func (p PDFAnnotation) SetRadiosInUnison(value bool)
func (PDFAnnotation) SetReadOnly ¶
func (p PDFAnnotation) SetReadOnly(value bool)
func (PDFAnnotation) SetRectForAnnotationKey ¶
func (p PDFAnnotation) SetRectForAnnotationKey(value corefoundation.CGRect, key PDFAnnotationKey) bool
Sets a rectangle value in the annotation’s dictionary.
value: The rectangle value to set in the annotation’s dictionary.
key: A PDFAnnotationKey or appropriate string from the Adobe PDF Specification.
Return Value ¶
true if the value sets successfully; otherwise, false.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/setRect(_:forAnnotationKey:)
func (PDFAnnotation) SetShouldDisplay ¶
func (p PDFAnnotation) SetShouldDisplay(value bool)
func (PDFAnnotation) SetShouldPrint ¶
func (p PDFAnnotation) SetShouldPrint(value bool)
func (PDFAnnotation) SetStampName ¶
func (p PDFAnnotation) SetStampName(value string)
func (PDFAnnotation) SetStartLineStyle ¶
func (p PDFAnnotation) SetStartLineStyle(value PDFLineStyle)
func (PDFAnnotation) SetStartPoint ¶
func (p PDFAnnotation) SetStartPoint(value corefoundation.CGPoint)
func (PDFAnnotation) SetType ¶
func (p PDFAnnotation) SetType(value string)
func (PDFAnnotation) SetURL ¶
func (p PDFAnnotation) SetURL(value foundation.INSURL)
func (PDFAnnotation) SetUserName ¶
func (p PDFAnnotation) SetUserName(value string)
func (PDFAnnotation) SetValueForAnnotationKey ¶
func (p PDFAnnotation) SetValueForAnnotationKey(value objectivec.IObject, key PDFAnnotationKey) bool
Sets a value in the annotation’s dictionary.
value: The value to set in the attribute’s dictionary.
key: A PDFAnnotationKey or appropriate string from the Adobe PDF Specification.
Return Value ¶
true if the value sets successfully; otherwise, false.
Discussion ¶
Some keys expect a complex type. For example, the color key expects an array of zero, one, two, three, or four elements, where each element is a floating-point number from `0.0` to `1.0`. As a convenience, this key accepts an NSColor or UIColor value. For details about other conveniences, see the individual PDFAnnotationKey properties or the `PDFAnnotationUtilities.H()` header file.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/setValue(_:forAnnotationKey:)
func (PDFAnnotation) SetValues ¶
func (p PDFAnnotation) SetValues(value []string)
func (PDFAnnotation) SetWidgetControlType ¶
func (p PDFAnnotation) SetWidgetControlType(value PDFWidgetControlType)
func (PDFAnnotation) SetWidgetDefaultStringValue ¶
func (p PDFAnnotation) SetWidgetDefaultStringValue(value string)
func (PDFAnnotation) SetWidgetFieldType ¶
func (p PDFAnnotation) SetWidgetFieldType(value PDFAnnotationWidgetSubtype)
func (PDFAnnotation) SetWidgetStringValue ¶
func (p PDFAnnotation) SetWidgetStringValue(value string)
func (PDFAnnotation) ShouldDisplay ¶
func (p PDFAnnotation) ShouldDisplay() bool
Returns a Boolean value indicating whether the annotation should be displayed.
Return Value ¶
true if the annotation should be displayed; otherwise false.
Discussion ¶
PDFPage respects this flag when drawing.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/shouldDisplay
func (PDFAnnotation) ShouldPrint ¶
func (p PDFAnnotation) ShouldPrint() bool
Returns a Boolean value indicating whether the annotation should appear when the document is printed.
Return Value ¶
true if the annotation should appear when the PDF document is printed; otherwise false.
Discussion ¶
PDFPage respects this flag when printing.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/shouldPrint
func (PDFAnnotation) StampName ¶
func (p PDFAnnotation) StampName() string
The name of the stamp, a text or graphics annotation that emulates a rubber stamp effect.
Discussion ¶
The default value for this property is [Default]. Additional possible values for `stampName` are: [Approved], [Asis], [Confidential], [Departmental], [Experimental], [Expired], [Final], [ForComment], [ForPublicRelease], [NotApproved], [NotForPublicRelease], [Sold], and [TopSecret]. Custom values are also supported.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/stampName
func (PDFAnnotation) StartLineStyle ¶
func (p PDFAnnotation) StartLineStyle() PDFLineStyle
The style of the line annotation’s starting point, such as square or filled arrowhead.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/startLineStyle
func (PDFAnnotation) StartPoint ¶
func (p PDFAnnotation) StartPoint() corefoundation.CGPoint
The point where a line begins, in annotation-space coordinates.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/startPoint
func (PDFAnnotation) Type ¶
func (p PDFAnnotation) Type() string
Returns the type of the annotation.
Return Value ¶
The type of the annotation. Types include [Line], [Link], [Text], and so on, referring to the PDFAnnotation subclasses. In the Adobe PDF Specification, this attribute is called [Subtype], and the common “type” for all annotations in the PDF Specification is [Annot].
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/type
func (PDFAnnotation) URL ¶
func (p PDFAnnotation) URL() foundation.INSURL
A URL for a link annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/url
func (PDFAnnotation) UserName ¶
func (p PDFAnnotation) UserName() string
Returns the name of the user who created the annotation.
Return Value ¶
The name of the user who created the annotation, or NULL if no user name is set.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/userName
func (PDFAnnotation) ValueForAnnotationKey ¶
func (p PDFAnnotation) ValueForAnnotationKey(key PDFAnnotationKey) objectivec.IObject
Returns a deep copy of the key-value pairs of properties for the specified key.
key: A PDFAnnotationKey or appropriate string from the Adobe PDF Specification.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/value(forAnnotationKey:)
func (PDFAnnotation) Values ¶
func (p PDFAnnotation) Values() []string
An array of strings that specifies the export values for items in a list or a pop-up menu.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/values
func (PDFAnnotation) WidgetControlType ¶
func (p PDFAnnotation) WidgetControlType() PDFWidgetControlType
The type of button widget control, either radio button, push button, or checkbox.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/widgetControlType
func (PDFAnnotation) WidgetDefaultStringValue ¶
func (p PDFAnnotation) WidgetDefaultStringValue() string
The string value that the widget reverts to when performing a reset form action.
Discussion ¶
For text and choice widgets, this property specifies the string value that a reset form action sets on a widget.
For radio buttons and checkboxes, set this property to [Off] if the desired default is for the button to be in an unselected state; otherwise, set it to the [ButtonWidgetStateString].
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/widgetDefaultStringValue
func (PDFAnnotation) WidgetFieldType ¶
func (p PDFAnnotation) WidgetFieldType() PDFAnnotationWidgetSubtype
The type of widget annotation, such as button, choice, or text.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/widgetFieldType
func (PDFAnnotation) WidgetStringValue ¶
func (p PDFAnnotation) WidgetStringValue() string
The string value of the widget annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/widgetStringValue
type PDFAnnotationClass ¶
type PDFAnnotationClass struct {
// contains filtered or unexported fields
}
func GetPDFAnnotationClass ¶
func GetPDFAnnotationClass() PDFAnnotationClass
GetPDFAnnotationClass returns the class object for PDFAnnotation.
func (PDFAnnotationClass) Alloc ¶
func (pc PDFAnnotationClass) Alloc() PDFAnnotation
Alloc allocates memory for a new instance of the class.
func (PDFAnnotationClass) Class ¶
func (pc PDFAnnotationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
func (PDFAnnotationClass) LineStyleFromName ¶
func (_PDFAnnotationClass PDFAnnotationClass) LineStyleFromName(name string) PDFLineStyle
Returns a line style that corresponds to the specified name.
name: The name of a line style, which matches the definition in the Adobe PDF Specification.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/lineStyle(fromName:)
func (PDFAnnotationClass) NameForLineStyle ¶
func (_PDFAnnotationClass PDFAnnotationClass) NameForLineStyle(style PDFLineStyle) string
Returns the name of the line style, which matches the definition in the Adobe PDF Specification.
style: A line style to get a name for.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotation/name(for:)
type PDFAnnotationHighlightingMode ¶
type PDFAnnotationHighlightingMode = string
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotationHighlightingMode
type PDFAnnotationKey ¶
type PDFAnnotationKey = string
PDFAnnotationKey is keys for setting properties of annotations.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotationKey
type PDFAnnotationLineEndingStyle ¶
type PDFAnnotationLineEndingStyle = string
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotationLineEndingStyle
type PDFAnnotationSubtype ¶
type PDFAnnotationSubtype = string
PDFAnnotationSubtype is the type of annotation, such as circle, text, or ink.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotationSubtype
type PDFAnnotationTextIconType ¶
type PDFAnnotationTextIconType = string
PDFAnnotationTextIconType is constants for icon type values in text annotation property dictionaries.
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotationTextIconType
type PDFAnnotationWidgetSubtype ¶
type PDFAnnotationWidgetSubtype = string
See: https://developer.apple.com/documentation/PDFKit/PDFAnnotationWidgetSubtype
type PDFAppearanceCharacteristics ¶
type PDFAppearanceCharacteristics struct {
objectivec.Object
}
An object that represents appearance characteristics of a widget annotation.
Configuring a Widget’s Appearance ¶
- PDFAppearanceCharacteristics.BackgroundColor: The background color of the widget annotation.
- PDFAppearanceCharacteristics.SetBackgroundColor
- PDFAppearanceCharacteristics.BorderColor: The border color of the widget annotation.
- PDFAppearanceCharacteristics.SetBorderColor
- PDFAppearanceCharacteristics.Caption: The text that the button widget annotation displays when the user isn’t interacting with it.
- PDFAppearanceCharacteristics.SetCaption
- PDFAppearanceCharacteristics.ControlType: The type of button widget annotation.
- PDFAppearanceCharacteristics.SetControlType
- PDFAppearanceCharacteristics.DownCaption: The text that the button widget annotation displays when the user holds down on it.
- PDFAppearanceCharacteristics.SetDownCaption
- PDFAppearanceCharacteristics.RolloverCaption: The text that the widget annotation displays when the user hovers the pointer over it.
- PDFAppearanceCharacteristics.SetRolloverCaption
- PDFAppearanceCharacteristics.Rotation: The number of degrees, in multiples of 90, that the widget annotation rotates counterclockwise relative to the page.
- PDFAppearanceCharacteristics.SetRotation
- PDFAppearanceCharacteristics.AppearanceCharacteristicsKeyValues: A dictionary that contains a deep copy of the appearance characteristic key-value pairs.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics
func NewPDFAppearanceCharacteristics ¶
func NewPDFAppearanceCharacteristics() PDFAppearanceCharacteristics
NewPDFAppearanceCharacteristics creates a new PDFAppearanceCharacteristics instance.
func PDFAppearanceCharacteristicsFromID ¶
func PDFAppearanceCharacteristicsFromID(id objc.ID) PDFAppearanceCharacteristics
PDFAppearanceCharacteristicsFromID constructs a PDFAppearanceCharacteristics from an objc.ID.
An object that represents appearance characteristics of a widget annotation.
func (PDFAppearanceCharacteristics) AppearanceCharacteristicsKeyValues ¶
func (p PDFAppearanceCharacteristics) AppearanceCharacteristicsKeyValues() foundation.INSDictionary
A dictionary that contains a deep copy of the appearance characteristic key-value pairs.
func (PDFAppearanceCharacteristics) Autorelease ¶
func (p PDFAppearanceCharacteristics) Autorelease() PDFAppearanceCharacteristics
Autorelease adds the receiver to the current autorelease pool.
func (PDFAppearanceCharacteristics) BackgroundColor ¶
func (p PDFAppearanceCharacteristics) BackgroundColor() objc.ID
The background color of the widget annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics/backgroundColor
func (PDFAppearanceCharacteristics) BorderColor ¶
func (p PDFAppearanceCharacteristics) BorderColor() objc.ID
The border color of the widget annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics/borderColor
func (PDFAppearanceCharacteristics) Caption ¶
func (p PDFAppearanceCharacteristics) Caption() string
The text that the button widget annotation displays when the user isn’t interacting with it.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics/caption
func (PDFAppearanceCharacteristics) ControlType ¶
func (p PDFAppearanceCharacteristics) ControlType() PDFWidgetControlType
The type of button widget annotation.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics/controlType
func (PDFAppearanceCharacteristics) DownCaption ¶
func (p PDFAppearanceCharacteristics) DownCaption() string
The text that the button widget annotation displays when the user holds down on it.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics/downCaption
func (PDFAppearanceCharacteristics) FieldName ¶
func (p PDFAppearanceCharacteristics) FieldName() string
The widget identifier for form annotation actions and behaviors.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/fieldname
func (PDFAppearanceCharacteristics) Init ¶
func (p PDFAppearanceCharacteristics) Init() PDFAppearanceCharacteristics
Init initializes the instance.
func (PDFAppearanceCharacteristics) IsReadOnly ¶
func (p PDFAppearanceCharacteristics) IsReadOnly() bool
A Boolean value that determines whether the widget is editable.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/isreadonly
func (PDFAppearanceCharacteristics) RolloverCaption ¶
func (p PDFAppearanceCharacteristics) RolloverCaption() string
The text that the widget annotation displays when the user hovers the pointer over it.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics/rolloverCaption
func (PDFAppearanceCharacteristics) Rotation ¶
func (p PDFAppearanceCharacteristics) Rotation() int
The number of degrees, in multiples of 90, that the widget annotation rotates counterclockwise relative to the page.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristics/rotation
func (PDFAppearanceCharacteristics) SetBackgroundColor ¶
func (p PDFAppearanceCharacteristics) SetBackgroundColor(value objc.ID)
func (PDFAppearanceCharacteristics) SetBorderColor ¶
func (p PDFAppearanceCharacteristics) SetBorderColor(value objc.ID)
func (PDFAppearanceCharacteristics) SetCaption ¶
func (p PDFAppearanceCharacteristics) SetCaption(value string)
func (PDFAppearanceCharacteristics) SetControlType ¶
func (p PDFAppearanceCharacteristics) SetControlType(value PDFWidgetControlType)
func (PDFAppearanceCharacteristics) SetDownCaption ¶
func (p PDFAppearanceCharacteristics) SetDownCaption(value string)
func (PDFAppearanceCharacteristics) SetFieldName ¶
func (p PDFAppearanceCharacteristics) SetFieldName(value string)
func (PDFAppearanceCharacteristics) SetIsReadOnly ¶
func (p PDFAppearanceCharacteristics) SetIsReadOnly(value bool)
func (PDFAppearanceCharacteristics) SetRolloverCaption ¶
func (p PDFAppearanceCharacteristics) SetRolloverCaption(value string)
func (PDFAppearanceCharacteristics) SetRotation ¶
func (p PDFAppearanceCharacteristics) SetRotation(value int)
func (PDFAppearanceCharacteristics) SetWidgetDefaultStringValue ¶
func (p PDFAppearanceCharacteristics) SetWidgetDefaultStringValue(value string)
func (PDFAppearanceCharacteristics) SetWidgetFieldType ¶
func (p PDFAppearanceCharacteristics) SetWidgetFieldType(value PDFAnnotationWidgetSubtype)
func (PDFAppearanceCharacteristics) SetWidgetStringValue ¶
func (p PDFAppearanceCharacteristics) SetWidgetStringValue(value string)
func (PDFAppearanceCharacteristics) WidgetDefaultStringValue ¶
func (p PDFAppearanceCharacteristics) WidgetDefaultStringValue() string
The string value that the widget reverts to when performing a reset form action.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/widgetdefaultstringvalue
func (PDFAppearanceCharacteristics) WidgetFieldType ¶
func (p PDFAppearanceCharacteristics) WidgetFieldType() PDFAnnotationWidgetSubtype
The type of widget annotation, such as button, choice, or text.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/widgetfieldtype
func (PDFAppearanceCharacteristics) WidgetStringValue ¶
func (p PDFAppearanceCharacteristics) WidgetStringValue() string
The string value of the widget annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/widgetstringvalue
type PDFAppearanceCharacteristicsClass ¶
type PDFAppearanceCharacteristicsClass struct {
// contains filtered or unexported fields
}
func GetPDFAppearanceCharacteristicsClass ¶
func GetPDFAppearanceCharacteristicsClass() PDFAppearanceCharacteristicsClass
GetPDFAppearanceCharacteristicsClass returns the class object for PDFAppearanceCharacteristics.
func (PDFAppearanceCharacteristicsClass) Alloc ¶
func (pc PDFAppearanceCharacteristicsClass) Alloc() PDFAppearanceCharacteristics
Alloc allocates memory for a new instance of the class.
func (PDFAppearanceCharacteristicsClass) Class ¶
func (pc PDFAppearanceCharacteristicsClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFAppearanceCharacteristicsKey ¶
type PDFAppearanceCharacteristicsKey = string
PDFAppearanceCharacteristicsKey is keys to control a widget’s appearance.
See: https://developer.apple.com/documentation/PDFKit/PDFAppearanceCharacteristicsKey
type PDFAreaOfInterest ¶
type PDFAreaOfInterest int
See: https://developer.apple.com/documentation/PDFKit/PDFAreaOfInterest
const ( // KPDFAnnotationArea: The mouse is over an annotation. KPDFAnnotationArea PDFAreaOfInterest = 4 KPDFAnyArea PDFAreaOfInterest = 9223372036854775807 // KPDFControlArea: The mouse is over a control. KPDFControlArea PDFAreaOfInterest = 16 // KPDFIconArea: The mouse is over an icon. KPDFIconArea PDFAreaOfInterest = 64 // KPDFImageArea: The mouse is over an image. KPDFImageArea PDFAreaOfInterest = 256 // KPDFLinkArea: The mouse is over a link. KPDFLinkArea PDFAreaOfInterest = 8 // KPDFNoArea: The mouse is over an undefined area. KPDFNoArea PDFAreaOfInterest = 0 // KPDFPageArea: The mouse is over a page. KPDFPageArea PDFAreaOfInterest = 1 // KPDFPopupArea: The mouse is over a popup menu. KPDFPopupArea PDFAreaOfInterest = 128 // KPDFTextArea: The mouse is over text. KPDFTextArea PDFAreaOfInterest = 2 // KPDFTextFieldArea: The mouse is over a text field. KPDFTextFieldArea PDFAreaOfInterest = 32 )
func (PDFAreaOfInterest) String ¶
func (e PDFAreaOfInterest) String() string
type PDFBorder ¶
type PDFBorder struct {
objectivec.Object
}
An optional border for an annotation that lies completely within the annotation rectangle.
Working with Border Styles and Characteristics ¶
- PDFBorder.Style: Sets the border style.
- PDFBorder.SetStyle
- PDFBorder.LineWidth: Sets the line width (in points) for the border.
- PDFBorder.SetLineWidth
- PDFBorder.DashPattern: Gets the dash pattern for the border as an array of NSNumber objects.
- PDFBorder.SetDashPattern
- PDFBorder.BorderKeyValues: A dictionary that contains a deep copy of all border properties.
Drawing Borders ¶
- PDFBorder.DrawInRect: Draws the border.
See: https://developer.apple.com/documentation/PDFKit/PDFBorder
func PDFBorderFromID ¶
PDFBorderFromID constructs a PDFBorder from an objc.ID.
An optional border for an annotation that lies completely within the annotation rectangle.
func (PDFBorder) Alignment ¶
func (p PDFBorder) Alignment() appkit.NSTextAlignment
The alignment of the free text and text widget annotation’s text content.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/alignment
func (PDFBorder) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (PDFBorder) Border ¶
func (p PDFBorder) Border() IPDFBorder
Sets the border style for the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/border
func (PDFBorder) BorderKeyValues ¶
func (p PDFBorder) BorderKeyValues() foundation.INSDictionary
A dictionary that contains a deep copy of all border properties.
See: https://developer.apple.com/documentation/PDFKit/PDFBorder/borderKeyValues
func (PDFBorder) Bounds ¶
func (p PDFBorder) Bounds() corefoundation.CGRect
Returns the bounding box for the annotation in page space.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/bounds
func (PDFBorder) Color ¶
Sets the stroke color for the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/color
func (PDFBorder) Contents ¶
Returns the textual content (if any) associated with the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/contents
func (PDFBorder) DashPattern ¶
func (p PDFBorder) DashPattern() foundation.INSArray
Gets the dash pattern for the border as an array of NSNumber objects.
Discussion ¶
Refer to the description for [NSBezierPath] for more information.
See: https://developer.apple.com/documentation/PDFKit/PDFBorder/dashPattern
func (PDFBorder) DrawInRect ¶
func (p PDFBorder) DrawInRect(rect corefoundation.CGRect)
Draws the border.
See: https://developer.apple.com/documentation/PDFKit/PDFBorder/draw(in:)
func (PDFBorder) EncodeWithCoder ¶
func (p PDFBorder) EncodeWithCoder(coder foundation.INSCoder)
func (PDFBorder) Font ¶
func (p PDFBorder) Font() objectivec.IObject
The font the annotation uses to display text.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/font
func (PDFBorder) FontColor ¶
The font color the annotation uses to display text.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/fontcolor
func (PDFBorder) HasAppearanceStream ¶
Returns a Boolean value that indicates whether the annotation has an appearance stream associated with it.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/hasappearancestream
func (PDFBorder) IsHighlighted ¶
A Boolean value that indicates whether the annotation is in a highlighted state, such as when the mouse is down on a link annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/ishighlighted
func (PDFBorder) LineWidth ¶
Sets the line width (in points) for the border.
See: https://developer.apple.com/documentation/PDFKit/PDFBorder/lineWidth
func (PDFBorder) SetAlignment ¶
func (p PDFBorder) SetAlignment(value appkit.NSTextAlignment)
func (PDFBorder) SetBorder ¶
func (p PDFBorder) SetBorder(value IPDFBorder)
func (PDFBorder) SetBounds ¶
func (p PDFBorder) SetBounds(value corefoundation.CGRect)
func (PDFBorder) SetContents ¶
func (PDFBorder) SetDashPattern ¶
func (p PDFBorder) SetDashPattern(value foundation.INSArray)
func (PDFBorder) SetFont ¶
func (p PDFBorder) SetFont(value objectivec.IObject)
func (PDFBorder) SetFontColor ¶
func (PDFBorder) SetHasAppearanceStream ¶
func (PDFBorder) SetIsHighlighted ¶
func (PDFBorder) SetLineWidth ¶
func (PDFBorder) SetStyle ¶
func (p PDFBorder) SetStyle(value PDFBorderStyle)
func (PDFBorder) Style ¶
func (p PDFBorder) Style() PDFBorderStyle
Sets the border style.
Discussion ¶
Refer to [Constants] for the available border styles.
See: https://developer.apple.com/documentation/PDFKit/PDFBorder/style
type PDFBorderClass ¶
type PDFBorderClass struct {
// contains filtered or unexported fields
}
func GetPDFBorderClass ¶
func GetPDFBorderClass() PDFBorderClass
GetPDFBorderClass returns the class object for PDFBorder.
func (PDFBorderClass) Alloc ¶
func (pc PDFBorderClass) Alloc() PDFBorder
Alloc allocates memory for a new instance of the class.
func (PDFBorderClass) Class ¶
func (pc PDFBorderClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFBorderKey ¶
type PDFBorderKey = string
See: https://developer.apple.com/documentation/PDFKit/PDFBorderKey
type PDFBorderStyle ¶
type PDFBorderStyle int
See: https://developer.apple.com/documentation/PDFKit/PDFBorderStyle
const ( // KPDFBorderStyleBeveled: Beveled border. KPDFBorderStyleBeveled PDFBorderStyle = 2 // KPDFBorderStyleDashed: Dashed border. KPDFBorderStyleDashed PDFBorderStyle = 1 // KPDFBorderStyleInset: Inset border. KPDFBorderStyleInset PDFBorderStyle = 3 // KPDFBorderStyleSolid: Solid border. KPDFBorderStyleSolid PDFBorderStyle = 0 // KPDFBorderStyleUnderline: Underline border. KPDFBorderStyleUnderline PDFBorderStyle = 4 )
func (PDFBorderStyle) String ¶
func (e PDFBorderStyle) String() string
type PDFDestination ¶
type PDFDestination struct {
objectivec.Object
}
A PDFDestination object describes a point on a PDF page.
Overview ¶
In typical usage, you do not initialize PDFDestination objects but rather get them as either attributes of PDFAnnotationLink or PDFOutline objects, or in response to the PDFView method PDFDestination.CurrentDestination.
Initializing a Destination ¶
- PDFDestination.InitWithPageAtPoint: Initializes the destination.
Getting Pages and Points ¶
- PDFDestination.Page: Returns the page that the destination refers to.
- PDFDestination.Point: Returns the point, in page space, that the destination refers to.
- PDFDestination.KPDFDestinationUnspecifiedValue
Getting a Relative Location ¶
- PDFDestination.Compare: Returns a comparison result that indicates the location of the destination in the document, relative to the current position.
Instance Properties ¶
See: https://developer.apple.com/documentation/PDFKit/PDFDestination
func NewPDFDestination ¶
func NewPDFDestination() PDFDestination
NewPDFDestination creates a new PDFDestination instance.
func NewPDFDestinationWithPageAtPoint ¶
func NewPDFDestinationWithPageAtPoint(page IPDFPage, point corefoundation.CGPoint) PDFDestination
Initializes the destination.
page: The page of the destination.
point: The point of the destination, in page space.
Return Value ¶
An initialized PDFDestination instance, or [NULL] if the object could not be initialized.
Discussion ¶
Specify `point` in page space. Typically, there’s no need to initialize destinations. Instead, you get them from PDFAnnotationLink, PDFOutline, or PDFView objects.
Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFDestination/init(page:at:)
func PDFDestinationFromID ¶
func PDFDestinationFromID(id objc.ID) PDFDestination
PDFDestinationFromID constructs a PDFDestination from an objc.ID.
A PDFDestination object describes a point on a PDF page.
func (PDFDestination) Action ¶
func (p PDFDestination) Action() IPDFAction
An object that represents an action for a PDF element, such as a link annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/action
func (PDFDestination) Autorelease ¶
func (p PDFDestination) Autorelease() PDFDestination
Autorelease adds the receiver to the current autorelease pool.
func (PDFDestination) Compare ¶
func (p PDFDestination) Compare(destination IPDFDestination) foundation.NSComparisonResult
Returns a comparison result that indicates the location of the destination in the document, relative to the current position.
destination: The destination in the document to be located.
Return Value ¶
A comparison result, indicating the position of the passed-in destination relative to the current position.
Discussion ¶
If `destination` is between the receiver’s position and the end of the document, `compare` returns [NSOrderedAscending]; if it is between the receiver’s position and the beginning of the document, `compare` returns [NSOrderedDescending]. Otherwise, if `destination` matches the receiver’s position, `compare` returns [NSOrderedSame].
This method ignores the horizontal component of the destination point (the x value). If the destination’s vertical component (or y value) is PDFDestination, `compare` treats the destination as if its y value is the top point on the destination page.
An exception is raised if `destination` does not have a page associated with it or if its page is associated with a document other than the receiver’s document.
See: https://developer.apple.com/documentation/PDFKit/PDFDestination/compare(_:)
func (PDFDestination) CurrentDestination ¶
func (p PDFDestination) CurrentDestination() IPDFDestination
Returns a
See: https://developer.apple.com/documentation/pdfkit/pdfview/currentdestination
func (PDFDestination) Init ¶
func (p PDFDestination) Init() PDFDestination
Init initializes the instance.
func (PDFDestination) InitWithPageAtPoint ¶
func (p PDFDestination) InitWithPageAtPoint(page IPDFPage, point corefoundation.CGPoint) PDFDestination
Initializes the destination.
page: The page of the destination.
point: The point of the destination, in page space.
Return Value ¶
An initialized PDFDestination instance, or [NULL] if the object could not be initialized.
Discussion ¶
Specify `point` in page space. Typically, there’s no need to initialize destinations. Instead, you get them from PDFAnnotationLink, PDFOutline, or PDFView objects.
Page space is a 72-dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFDestination/init(page:at:)
func (PDFDestination) KPDFDestinationUnspecifiedValue ¶
func (p PDFDestination) KPDFDestinationUnspecifiedValue() float64
See: https://developer.apple.com/documentation/pdfkit/kpdfdestinationunspecifiedvalue
func (PDFDestination) ModificationDate ¶
func (p PDFDestination) ModificationDate() foundation.INSDate
Returns the modification date of the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/modificationdate
func (PDFDestination) Page ¶
func (p PDFDestination) Page() IPDFPage
Returns the page that the destination refers to.
Return Value ¶
The page referred to by the destination.
See: https://developer.apple.com/documentation/PDFKit/PDFDestination/page
func (PDFDestination) Point ¶
func (p PDFDestination) Point() corefoundation.CGPoint
Returns the point, in page space, that the destination refers to.
Return Value ¶
The point, in page space, referred to by the destination.
Discussion ¶
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFDestination/point
func (PDFDestination) SetAction ¶
func (p PDFDestination) SetAction(value IPDFAction)
func (PDFDestination) SetCurrentDestination ¶
func (p PDFDestination) SetCurrentDestination(value IPDFDestination)
func (PDFDestination) SetModificationDate ¶
func (p PDFDestination) SetModificationDate(value foundation.INSDate)
func (PDFDestination) SetType ¶
func (p PDFDestination) SetType(value string)
func (PDFDestination) SetUserName ¶
func (p PDFDestination) SetUserName(value string)
func (PDFDestination) SetZoom ¶
func (p PDFDestination) SetZoom(value float64)
func (PDFDestination) Type ¶
func (p PDFDestination) Type() string
Returns the type of the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/type
func (PDFDestination) UserName ¶
func (p PDFDestination) UserName() string
Returns the name of the user who created the annotation.
See: https://developer.apple.com/documentation/pdfkit/pdfannotation/username
func (PDFDestination) Zoom ¶
func (p PDFDestination) Zoom() float64
See: https://developer.apple.com/documentation/PDFKit/PDFDestination/zoom
type PDFDestinationClass ¶
type PDFDestinationClass struct {
// contains filtered or unexported fields
}
func GetPDFDestinationClass ¶
func GetPDFDestinationClass() PDFDestinationClass
GetPDFDestinationClass returns the class object for PDFDestination.
func (PDFDestinationClass) Alloc ¶
func (pc PDFDestinationClass) Alloc() PDFDestination
Alloc allocates memory for a new instance of the class.
func (PDFDestinationClass) Class ¶
func (pc PDFDestinationClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFDisplayBox ¶
type PDFDisplayBox int
See: https://developer.apple.com/documentation/PDFKit/PDFDisplayBox
const ( // KPDFDisplayBoxArtBox: A rectangle defining the boundaries of the page’s meaningful content including surrounding white space intended for display. KPDFDisplayBoxArtBox PDFDisplayBox = 4 // KPDFDisplayBoxBleedBox: A rectangle defining the boundaries of the clip region for the page contents in a production environment. KPDFDisplayBoxBleedBox PDFDisplayBox = 2 // KPDFDisplayBoxCropBox: A rectangle defining the boundaries of the visible region , expressed in default user-space units. KPDFDisplayBoxCropBox PDFDisplayBox = 1 // KPDFDisplayBoxMediaBox: A rectangle defining the boundaries of the physical medium for display or printing, expressed in default user-space units. KPDFDisplayBoxMediaBox PDFDisplayBox = 0 // KPDFDisplayBoxTrimBox: A rectangle defining the intended boundaries of the finished page. KPDFDisplayBoxTrimBox PDFDisplayBox = 3 )
func (PDFDisplayBox) String ¶
func (e PDFDisplayBox) String() string
type PDFDisplayDirection ¶
type PDFDisplayDirection int
See: https://developer.apple.com/documentation/PDFKit/PDFDisplayDirection
const ( KPDFDisplayDirectionHorizontal PDFDisplayDirection = 1 KPDFDisplayDirectionVertical PDFDisplayDirection = 0 )
func (PDFDisplayDirection) String ¶
func (e PDFDisplayDirection) String() string
type PDFDisplayMode ¶
type PDFDisplayMode int
See: https://developer.apple.com/documentation/PDFKit/PDFDisplayMode
const ( // KPDFDisplaySinglePage: A display mode where the document displays one page at a time horizontally and vertically. KPDFDisplaySinglePage PDFDisplayMode = 0 // KPDFDisplaySinglePageContinuous: A display mode where the document displays in continuous mode vertically, with single-page width horizontally. KPDFDisplaySinglePageContinuous PDFDisplayMode = 1 // KPDFDisplayTwoUp: A display mode where the document displays two pages side-by-side. KPDFDisplayTwoUp PDFDisplayMode = 2 // KPDFDisplayTwoUpContinuous: A display mode where the document displays in continuous mode vertically and displays two pages side-by-side horizontally. KPDFDisplayTwoUpContinuous PDFDisplayMode = 3 )
func (PDFDisplayMode) String ¶
func (e PDFDisplayMode) String() string
type PDFDocument ¶
type PDFDocument struct {
objectivec.Object
}
An object that represents PDF data or a PDF file and defines methods for writing, searching, and selecting PDF data.
Overview ¶
The other utility classes are either instantiated from methods in PDFDocument, as are PDFPage and PDFOutline; or support it, as do PDFSelection and PDFDestination.
You initialize a PDFDocument object with PDF data or with a URL to a PDF file. You can then ask for the page count, add or delete pages, perform a find, or parse selected content into an [NSString] object.
Initializing Documents ¶
- PDFDocument.InitWithURL: Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid, this method returns [NULL]).
- PDFDocument.InitWithData: Initializes a PDFDocument object with the passed-in data.
Setting the Delegate ¶
- PDFDocument.Delegate: The object acting as the delegate for the PDFDocument object.
- PDFDocument.SetDelegate
Instance Properties ¶
Instance Methods ¶
See: https://developer.apple.com/documentation/PDFKit/PDFDocument
func NewPDFDocument ¶
func NewPDFDocument() PDFDocument
NewPDFDocument creates a new PDFDocument instance.
func NewPDFDocumentWithData ¶
func NewPDFDocumentWithData(data foundation.INSData) PDFDocument
Initializes a PDFDocument object with the passed-in data.
Return Value ¶
A PDFDocument instance initialized with the passed-in PDF data, or [NULL] if the object could not be initialized.
Discussion ¶
The data must be PDF data encapsulated in an [NSData] object; otherwise this method returns [NULL].
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/init(data:)
func NewPDFDocumentWithURL ¶
func NewPDFDocumentWithURL(url foundation.INSURL) PDFDocument
Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid, this method returns [NULL]).
Return Value ¶
A PDFDocument instance initialized with the data at the passed-in URL or [NULL] if the object could not be initialized or if the URL is invalid.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/init(url:)
func PDFDocumentFromID ¶
func PDFDocumentFromID(id objc.ID) PDFDocument
PDFDocumentFromID constructs a PDFDocument from an objc.ID.
An object that represents PDF data or a PDF file and defines methods for writing, searching, and selecting PDF data.
func (PDFDocument) AccessPermissions ¶
func (p PDFDocument) AccessPermissions() PDFAccessPermissions
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/accessPermissions
func (PDFDocument) AllowsCommenting ¶
func (p PDFDocument) AllowsCommenting() bool
A Boolean value indicating whether you can create or modify document annotations, including form field entries.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/allowsCommenting
func (PDFDocument) AllowsContentAccessibility ¶
func (p PDFDocument) AllowsContentAccessibility() bool
A Boolean value indicating whether you can extract content from the document, but only for the purpose of accessibility.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/allowsContentAccessibility
func (PDFDocument) AllowsCopying ¶
func (p PDFDocument) AllowsCopying() bool
A Boolean value indicating whether the document allows copying of content to the Pasteboard.
Discussion ¶
The ability to copy content from a PDF document is an attribute unrelated to whether the document is locked or unlocked. It depends on the PDF permissions set by the document’s author.
This method only determines the desired permissions setting in the PDF document; it is up to the application to enforce (or ignore) the permissions.
This method always returns true if the document is not encrypted. Note that in many cases an encrypted document may still be readable by all users due to the standard empty string password. For more details about user and owner passwords, see the Adobe PDF specification.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/allowsCopying
func (PDFDocument) AllowsDocumentAssembly ¶
func (p PDFDocument) AllowsDocumentAssembly() bool
A Boolean value indicating whether you can manage a document by inserting, deleting, and rotating pages.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/allowsDocumentAssembly
func (PDFDocument) AllowsDocumentChanges ¶
func (p PDFDocument) AllowsDocumentChanges() bool
A Boolean value indicating whether you can modify the document contents except for document attributes.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/allowsDocumentChanges
func (PDFDocument) AllowsFormFieldEntry ¶
func (p PDFDocument) AllowsFormFieldEntry() bool
A Boolean value indicating whether you can modify form field entries even if you can’t edit document annotations.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/allowsFormFieldEntry
func (PDFDocument) AllowsPrinting ¶
func (p PDFDocument) AllowsPrinting() bool
A Boolean value indicating whether the document allows printing.
Discussion ¶
The ability to print a PDF document is an attribute unrelated to whether the document is locked or unlocked. It depends on the PDF permissions set by the document’s author.
This method only determines the desired permissions setting in the PDF document; it is up to the application to enforce (or ignore) the permissions.
This method always returns true if the document is not encrypted. Note that in many cases an encrypted document may still be readable by all users due to the standard empty string password. For more details about user and owner passwords, see the Adobe PDF specification.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/allowsPrinting
func (PDFDocument) Autorelease ¶
func (p PDFDocument) Autorelease() PDFDocument
Autorelease adds the receiver to the current autorelease pool.
func (PDFDocument) BeginFindStringWithOptions ¶
func (p PDFDocument) BeginFindStringWithOptions(string_ string, options foundation.NSStringCompareOptions)
Asynchronously finds all instances of the specified string in the document.
Discussion ¶
This method returns immediately. It causes notifications to be issued when searching begins and ends, on each search hit, and when the search proceeds to a new page. For options, refer to Searching, Comparing, and Sorting Strings.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/beginFindString(_:withOptions:)
func (PDFDocument) BeginFindStringsWithOptions ¶
func (p PDFDocument) BeginFindStringsWithOptions(strings []string, options foundation.NSStringCompareOptions)
Asynchronously finds all instances of the specified array of strings in the document.
Discussion ¶
This method returns immediately. It causes notifications to be issued when searching begins and ends, on each search hit, and when the search proceeds to a new page. For options, refer to Searching, Comparing, and Sorting Strings.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/beginFindStrings(_:withOptions:)
func (PDFDocument) CancelFindString ¶
func (p PDFDocument) CancelFindString()
Cancels a search initiated with [BeginFindStringWithOptions].
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/cancelFindString()
func (PDFDocument) DataRepresentation ¶
func (p PDFDocument) DataRepresentation() foundation.INSData
Returns a representation of the document as an [NSData] object.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/dataRepresentation()
func (PDFDocument) DataRepresentationWithOptions ¶
func (p PDFDocument) DataRepresentationWithOptions(options foundation.INSDictionary) foundation.INSData
Returns a representation of the document as an [NSData] object with additional options applied, such as filters.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/dataRepresentation(options:)
func (PDFDocument) Delegate ¶
func (p PDFDocument) Delegate() PDFDocumentDelegate
The object acting as the delegate for the PDFDocument object.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/delegate
func (PDFDocument) DocumentAttributes ¶
func (p PDFDocument) DocumentAttributes() foundation.INSDictionary
A dictionary of document metadata.
Return Value ¶
The dictionary of document metadata. The dictionary may be empty, or only some of the keys may have associated values.
Discussion ¶
Metadata is optional for PDF documents.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/documentAttributes
func (PDFDocument) DocumentRef ¶
func (p PDFDocument) DocumentRef() coregraphics.CGPDFDocumentRef
The [CGPDFDocument] associated with the PDFDocument object.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/documentRef
func (PDFDocument) DocumentURL ¶
func (p PDFDocument) DocumentURL() foundation.INSURL
The URL for the document.
Return Value ¶
The URL for the document; may return [NULL] if the document was created from an [NSData] object.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/documentURL
func (PDFDocument) ExchangePageAtIndexWithPageAtIndex ¶
func (p PDFDocument) ExchangePageAtIndexWithPageAtIndex(indexA uint, indexB uint)
Swaps one page with another.
Discussion ¶
This method raises an exception if either `index` value is out of bounds.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/exchangePage(at:withPageAt:)
func (PDFDocument) FindStringFromSelectionWithOptions ¶
func (p PDFDocument) FindStringFromSelectionWithOptions(string_ string, selection IPDFSelection, options foundation.NSStringCompareOptions) IPDFSelection
Synchronously finds the next occurance of a string after the specified selection (or before the selection if you specified [NSBackwardsSearch] as a search option.
Discussion ¶
Matches are returned as a PDFSelection object. If the search reaches the end (or beginning) of the document without any hits, this method returns [NULL].
If you pass [NULL] for the selection, this method begins searching from the beginning of the document (or the end, if you specified [NSBackwardsSearch]).
You can use this method to implement “Find Again” behavior. For options, refer to Searching, Comparing, and Sorting Strings.
func (PDFDocument) FindStringWithOptions ¶
func (p PDFDocument) FindStringWithOptions(string_ string, options foundation.NSStringCompareOptions) []PDFSelection
Synchronously finds all instances of the specified string in the document.
Discussion ¶
Each hit gets added to an [NSArray] object as a PDFSelection object. If there are no hits, this method returns an empty array.
Use this method when the complete search process will be brief and when you don’t need the flexibility or control offered by [BeginFindStringWithOptions]. For options, refer to Searching, Comparing, and Sorting Strings.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/findString(_:withOptions:)
func (PDFDocument) IndexForPage ¶
func (p PDFDocument) IndexForPage(page IPDFPage) uint
Gets the index number for the specified page.
Discussion ¶
Indexes are zero-based. This method raises an exception and returns [NSNotFound] if `page` is not found.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/index(for:)
func (PDFDocument) InitWithData ¶
func (p PDFDocument) InitWithData(data foundation.INSData) PDFDocument
Initializes a PDFDocument object with the passed-in data.
Return Value ¶
A PDFDocument instance initialized with the passed-in PDF data, or [NULL] if the object could not be initialized.
Discussion ¶
The data must be PDF data encapsulated in an [NSData] object; otherwise this method returns [NULL].
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/init(data:)
func (PDFDocument) InitWithURL ¶
func (p PDFDocument) InitWithURL(url foundation.INSURL) PDFDocument
Initializes a PDFDocument object with the contents at the specified URL (if the URL is invalid, this method returns [NULL]).
Return Value ¶
A PDFDocument instance initialized with the data at the passed-in URL or [NULL] if the object could not be initialized or if the URL is invalid.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/init(url:)
func (PDFDocument) InsertPageAtIndex ¶
func (p PDFDocument) InsertPageAtIndex(page IPDFPage, index uint)
Inserts a page at the specified index point.
Discussion ¶
This method raises an exception if `index` is out of bounds.
Be aware that a PDF viewing application might use the size of the first page in the document as representative of all page sizes when reporting the size of a document. If you need to get the actual size of an individual page, you can use [BoundsForBox] (note that the size is returned in points, which are typically converted to inches or centimeters by PDF viewing applications).
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/insert(_:at:)
func (PDFDocument) IsEncrypted ¶
func (p PDFDocument) IsEncrypted() bool
A Boolean value specifying whether the document is encrypted.
Return Value ¶
true if the document is encrypted, whether it is locked or unlocked; false otherwise.
Discussion ¶
If encrypted, reading the document requires a password.
Encrypted documents whose password is the empty string are unlocked automatically upon opening, because PDF Kit tries the empty string as a password if none is supplied. Use the [UnlockWithPassword] method to unlock a document using a password.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/isEncrypted
func (PDFDocument) IsFinding ¶
func (p PDFDocument) IsFinding() bool
Returns a Boolean value indicating whether an asynchronous find operation is in progress.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/isFinding
func (PDFDocument) IsLocked ¶
func (p PDFDocument) IsLocked() bool
A Boolean value indicating whether the document is locked.
Return Value ¶
true if the document is locked; false otherwise.
Discussion ¶
Only encrypted documents can be locked. Encrypted documents whose password is the empty string are unlocked automatically upon opening, because PDF Kit tries the empty string as a password if none is supplied. Use the [UnlockWithPassword] method to unlock a document using a password.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/isLocked
func (PDFDocument) MajorVersion ¶
func (p PDFDocument) MajorVersion() int
The major version of the document.
Return Value ¶
The major version of the document.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/majorVersion
func (PDFDocument) MinorVersion ¶
func (p PDFDocument) MinorVersion() int
The minor version of the document.
Return Value ¶
The minor version of the document.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/minorVersion
func (PDFDocument) OutlineItemForSelection ¶
func (p PDFDocument) OutlineItemForSelection(selection IPDFSelection) IPDFOutline
Returns the most likely parent PDF outline object for the selection.
selection: The area of the document currently selected by the user. A selection can span multiple outline items, but only the point representing the first character is considered.
Return Value ¶
The PDF outline object that is the most likely parent of the specified selection. Note that only the point representing the first character of the selection is considered in this method.
Discussion ¶
Typically, outlines represent structural items such as chapters. You can use this method to identify the chapter that a selection falls within.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/outlineItem(for:)
func (PDFDocument) OutlineRoot ¶
func (p PDFDocument) OutlineRoot() IPDFOutline
The document’s root outline to a PDF outline object.
Discussion ¶
When a PDF document is saved, the outline tree structure is written out to the destination PDF file.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/outlineRoot
func (PDFDocument) PageAtIndex ¶
func (p PDFDocument) PageAtIndex(index uint) IPDFPage
Returns the page at the specified index number.
Discussion ¶
Indexes are zero based. This method raises an exception if `index` is out of bounds.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/page(at:)
func (PDFDocument) PageClass ¶
func (p PDFDocument) PageClass() objc.Class
The class that is allocated and initialized when page objects are created for the document.
Discussion ¶
If you want to supply a custom page class, subclass PDFDocument and implement this method to return your custom class. Note that your custom class must be a subclass of PDFPage; otherwise, the behavior is undefined.
The default implementation of `pageClass` returns `[PDFPage class]`.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/pageClass
func (PDFDocument) PageCount ¶
func (p PDFDocument) PageCount() uint
The number of pages in the document.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/pageCount
func (PDFDocument) PermissionsStatus ¶
func (p PDFDocument) PermissionsStatus() PDFDocumentPermissions
The permissions status of the PDF document.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/permissionsStatus
func (PDFDocument) PrintOperationForPrintInfoScalingModeAutoRotate ¶
func (p PDFDocument) PrintOperationForPrintInfoScalingModeAutoRotate(printInfo appkit.NSPrintInfo, scaleMode PDFPrintScalingMode, doRotate bool) appkit.NSPrintOperation
Returns a print operation suitable for printing the PDF document.
func (PDFDocument) RemovePageAtIndex ¶
func (p PDFDocument) RemovePageAtIndex(index uint)
Removes the page at the specified index point.
Discussion ¶
This method raises an exception if `index` is out of bounds.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/removePage(at:)
func (PDFDocument) SelectionForEntireDocument ¶
func (p PDFDocument) SelectionForEntireDocument() IPDFSelection
Returns a selection representing the textual content of the entire document.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/selectionForEntireDocument
func (PDFDocument) SelectionFromPageAtCharacterIndexToPageAtCharacterIndex ¶
func (p PDFDocument) SelectionFromPageAtCharacterIndexToPageAtCharacterIndex(startPage IPDFPage, startCharacter uint, endPage IPDFPage, endCharacter uint) IPDFSelection
Returns the specified selection based on starting and ending character indexes.
Discussion ¶
The selection begins at `startChar` on `startPage` and ends at `endChar` on `endPage`. The starting and ending index values must be in the range of the number of characters (as returned by [NumberOfCharacters]) within the respective PDFPage objects.
func (PDFDocument) SelectionFromPageAtPointToPageAtPoint ¶
func (p PDFDocument) SelectionFromPageAtPointToPageAtPoint(startPage IPDFPage, startPoint corefoundation.CGPoint, endPage IPDFPage, endPoint corefoundation.CGPoint) IPDFSelection
Returns the specified selection based on starting and ending points.
Discussion ¶
The selection begins at `startPt` on `startPage` and ends at `endPt` on `endPage`. The starting and ending points should be specified in page space, relative to their respective pages.
The starting and ending points can be on the same page. In this case, invoking this method is equivalent to sending the “ message to a PDFPage object.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/selection(from:at:to:at:)
func (PDFDocument) SelectionFromPageAtPointToPageAtPointWithGranularity ¶
func (p PDFDocument) SelectionFromPageAtPointToPageAtPointWithGranularity(startPage IPDFPage, startPoint corefoundation.CGPoint, endPage IPDFPage, endPoint corefoundation.CGPoint, granularity PDFSelectionGranularity) IPDFSelection
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/selection(from:at:to:at:with:)
func (PDFDocument) SetDelegate ¶
func (p PDFDocument) SetDelegate(value PDFDocumentDelegate)
func (PDFDocument) SetDocumentAttributes ¶
func (p PDFDocument) SetDocumentAttributes(value foundation.INSDictionary)
func (PDFDocument) SetOutlineRoot ¶
func (p PDFDocument) SetOutlineRoot(value IPDFOutline)
func (PDFDocument) String ¶
func (p PDFDocument) String() string
A string representing the textual content for the entire document.
Return Value ¶
A string that represents the textual content of the entire document.
Discussion ¶
Pages are delimited with linefeed characters.
This is a convenience method, equivalent to creating a selection object for the entire document and then invoking the PDFSelection class’s [String] method.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/string
func (PDFDocument) UnlockWithPassword ¶
func (p PDFDocument) UnlockWithPassword(password string) bool
Attempts to unlock an encrypted document.
password: The password to unlock an encrypted document (you cannot lock an unlocked PDF document by using an incorrect password).
Return Value ¶
true if the specified password unlocks the document, false otherwise.
Discussion ¶
If the password is correct, this method returns true, and a PDFDocumentDidUnlockNotification notification is sent. Once unlocked, you cannot use this function to relock the document.
If you attempt to unlock an already unlocked document, one of the following occurs:
- If the document is unlocked with full owner permissions, `unlockWithPassword` does nothing and returns true. The password string is ignored. - If the document is unlocked with only user permissions, `unlockWithPassword` attempts to obtain full owner permissions with the password string. If the string fails, the document maintains its user permissions. In either case, this method returns true.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/unlock(withPassword:)
func (PDFDocument) WriteToFile ¶
func (p PDFDocument) WriteToFile(path string) bool
Writes the document to a file at the specified path.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/write(toFile:)
func (PDFDocument) WriteToFileWithOptions ¶
func (p PDFDocument) WriteToFileWithOptions(path string, options foundation.INSDictionary) bool
Writes the document to a file at the specified path with the specified options.
Discussion ¶
The most commonly-used options are `kCGPDFContextOwnerPassword`, `kCGPDFContextUserPassword`, `kCGPDFContextAllowsCopying` and `kCGPDFContextAllowsPrinting`. For more details about these options, see Auxiliary Dictionary Keys.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/write(toFile:withOptions:)
func (PDFDocument) WriteToURL ¶
func (p PDFDocument) WriteToURL(url foundation.INSURL) bool
Writes the document to a location specified by the passed-in URL.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/write(to:)
func (PDFDocument) WriteToURLWithOptions ¶
func (p PDFDocument) WriteToURLWithOptions(url foundation.INSURL, options foundation.INSDictionary) bool
Writes the document to the specified URL with the specified options.
See: https://developer.apple.com/documentation/PDFKit/PDFDocument/write(to:withOptions:)
type PDFDocumentAttribute ¶
type PDFDocumentAttribute = string
PDFDocumentAttribute is a structure that specifies document attributes.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute
var ( // PDFDocumentAuthorAttribute is an optional text string containing the name of the author of the document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/authorAttribute PDFDocumentAuthorAttribute PDFDocumentAttribute // PDFDocumentCreationDateAttribute is an optional text string containing the document’s creation date. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/creationDateAttribute PDFDocumentCreationDateAttribute PDFDocumentAttribute // PDFDocumentCreatorAttribute is an optional text string containing the name of the application that created the document content. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/creatorAttribute PDFDocumentCreatorAttribute PDFDocumentAttribute // PDFDocumentKeywordsAttribute is an optional array of text strings containing keywords for the document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/keywordsAttribute PDFDocumentKeywordsAttribute PDFDocumentAttribute // PDFDocumentModificationDateAttribute is an optional text string containing the document’s last-modified date. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/modificationDateAttribute PDFDocumentModificationDateAttribute PDFDocumentAttribute // PDFDocumentProducerAttribute is an optional text string containing the name of the application that produced the PDF data for the document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/producerAttribute PDFDocumentProducerAttribute PDFDocumentAttribute // PDFDocumentSubjectAttribute is an optional text string containing a description of the subject of the document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/subjectAttribute PDFDocumentSubjectAttribute PDFDocumentAttribute // PDFDocumentTitleAttribute is an optional text string containing the title of the document. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentAttribute/titleAttribute PDFDocumentTitleAttribute PDFDocumentAttribute )
type PDFDocumentClass ¶
type PDFDocumentClass struct {
// contains filtered or unexported fields
}
func GetPDFDocumentClass ¶
func GetPDFDocumentClass() PDFDocumentClass
GetPDFDocumentClass returns the class object for PDFDocument.
func (PDFDocumentClass) Alloc ¶
func (pc PDFDocumentClass) Alloc() PDFDocument
Alloc allocates memory for a new instance of the class.
func (PDFDocumentClass) Class ¶
func (pc PDFDocumentClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFDocumentDelegate ¶
type PDFDocumentDelegate interface {
objectivec.IObject
}
The delegate for the PDFDocument object.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate
type PDFDocumentDelegateConfig ¶
type PDFDocumentDelegateConfig struct {
// Managing Document Security
// DocumentDidUnlock — Called when the [PDFDocumentDidUnlockNotification] notification is posted.
DocumentDidUnlock func(notification foundation.NSNotification)
// Getting Document Search Notifications
// DidMatchString — Called for every match found during a find operation.
DidMatchString func(instance PDFSelection)
// DocumentDidBeginDocumentFind — Called when the [PDFDocumentDidBeginFindNotification] notification is posted.
DocumentDidBeginDocumentFind func(notification foundation.NSNotification)
// DocumentDidBeginPageFind — Called when the [PDFDocumentDidBeginPageFindNotification] notification is posted.
DocumentDidBeginPageFind func(notification foundation.NSNotification)
// DocumentDidEndDocumentFind — Called when the [PDFDocumentDidEndFindNotification] notification is posted.
DocumentDidEndDocumentFind func(notification foundation.NSNotification)
// DocumentDidEndPageFind — Called when the [PDFDocumentDidEndPageFindNotification] notification is posted.
DocumentDidEndPageFind func(notification foundation.NSNotification)
// DocumentDidFindMatch — Called when the [PDFDocumentDidFindMatchNotification] notification is posted.
DocumentDidFindMatch func(notification foundation.NSNotification)
// Wrapping Document Elements
// ClassForPage — Returns a [PDFPage] subclass for a page object.
ClassForPage func() objc.Class
}
PDFDocumentDelegateConfig holds optional typed callbacks for PDFDocumentDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type PDFDocumentDelegateObject ¶
type PDFDocumentDelegateObject struct {
objectivec.Object
}
PDFDocumentDelegateObject wraps an existing Objective-C object that conforms to the PDFDocumentDelegate protocol.
func NewPDFDocumentDelegate ¶
func NewPDFDocumentDelegate(config PDFDocumentDelegateConfig) PDFDocumentDelegateObject
NewPDFDocumentDelegate creates an Objective-C object implementing the PDFDocumentDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned PDFDocumentDelegateObject satisfies the PDFDocumentDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func PDFDocumentDelegateObjectFromID ¶
func PDFDocumentDelegateObjectFromID(id objc.ID) PDFDocumentDelegateObject
PDFDocumentDelegateObjectFromID constructs a PDFDocumentDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (PDFDocumentDelegateObject) BaseObject ¶
func (o PDFDocumentDelegateObject) BaseObject() objectivec.Object
func (PDFDocumentDelegateObject) ClassForAnnotationType ¶
func (o PDFDocumentDelegateObject) ClassForAnnotationType(annotationType string) objc.Class
Returns a PDFAnnotation subclass for an annotation type.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/class(forAnnotationType:)
func (PDFDocumentDelegateObject) ClassForPage ¶
func (o PDFDocumentDelegateObject) ClassForPage() objc.Class
Returns a PDFPage subclass for a page object.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/classForPage()
func (PDFDocumentDelegateObject) DidMatchString ¶
func (o PDFDocumentDelegateObject) DidMatchString(instance IPDFSelection)
Called for every match found during a find operation.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/didMatchString(_:)
func (PDFDocumentDelegateObject) DocumentDidBeginDocumentFind ¶
func (o PDFDocumentDelegateObject) DocumentDidBeginDocumentFind(notification foundation.NSNotification)
Called when the PDFDocumentDidBeginFindNotification notification is posted.
func (PDFDocumentDelegateObject) DocumentDidBeginPageFind ¶
func (o PDFDocumentDelegateObject) DocumentDidBeginPageFind(notification foundation.NSNotification)
Called when the PDFDocumentDidBeginPageFindNotification notification is posted.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/documentDidBeginPageFind(_:)
func (PDFDocumentDelegateObject) DocumentDidEndDocumentFind ¶
func (o PDFDocumentDelegateObject) DocumentDidEndDocumentFind(notification foundation.NSNotification)
Called when the PDFDocumentDidEndFindNotification notification is posted.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/documentDidEndDocumentFind(_:)
func (PDFDocumentDelegateObject) DocumentDidEndPageFind ¶
func (o PDFDocumentDelegateObject) DocumentDidEndPageFind(notification foundation.NSNotification)
Called when the PDFDocumentDidEndPageFindNotification notification is posted.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/documentDidEndPageFind(_:)
func (PDFDocumentDelegateObject) DocumentDidFindMatch ¶
func (o PDFDocumentDelegateObject) DocumentDidFindMatch(notification foundation.NSNotification)
Called when the PDFDocumentDidFindMatchNotification notification is posted.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/documentDidFindMatch(_:)
func (PDFDocumentDelegateObject) DocumentDidUnlock ¶
func (o PDFDocumentDelegateObject) DocumentDidUnlock(notification foundation.NSNotification)
Called when the PDFDocumentDidUnlockNotification notification is posted.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentDelegate/documentDidUnlock(_:)
type PDFDocumentPermissions ¶
type PDFDocumentPermissions int
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentPermissions
const ( // KPDFDocumentPermissionsNone: The status that indicates no document permissions. KPDFDocumentPermissionsNone PDFDocumentPermissions = 0 // KPDFDocumentPermissionsOwner: The status that indicates owner document permissions. KPDFDocumentPermissionsOwner PDFDocumentPermissions = 2 // KPDFDocumentPermissionsUser: The status that indicates user document permissions. KPDFDocumentPermissionsUser PDFDocumentPermissions = 1 )
func (PDFDocumentPermissions) String ¶
func (e PDFDocumentPermissions) String() string
type PDFDocumentWriteOption ¶
type PDFDocumentWriteOption = string
PDFDocumentWriteOption is a structure that specifies file writing options for a document.
See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption
var ( // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption/accessPermissionsOption PDFDocumentAccessPermissionsOption PDFDocumentWriteOption // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption/burnInAnnotationsOption PDFDocumentBurnInAnnotationsOption PDFDocumentWriteOption // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption/optimizeImagesForScreenOption PDFDocumentOptimizeImagesForScreenOption PDFDocumentWriteOption // PDFDocumentOwnerPasswordOption is an [NSString] object for the owner’s password which is required for encryption. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption/ownerPasswordOption PDFDocumentOwnerPasswordOption PDFDocumentWriteOption // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption/saveImagesAsJPEGOption PDFDocumentSaveImagesAsJPEGOption PDFDocumentWriteOption // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption/saveTextFromOCROption PDFDocumentSaveTextFromOCROption PDFDocumentWriteOption // PDFDocumentUserPasswordOption is an [NSString] object for the user’s password which is optional for encryption. // // See: https://developer.apple.com/documentation/PDFKit/PDFDocumentWriteOption/userPasswordOption PDFDocumentUserPasswordOption PDFDocumentWriteOption )
type PDFInterpolationQuality ¶
type PDFInterpolationQuality int
See: https://developer.apple.com/documentation/PDFKit/PDFInterpolationQuality
const ( // KPDFInterpolationQualityHigh: The case specifying high interpolation quality. KPDFInterpolationQualityHigh PDFInterpolationQuality = 2 // KPDFInterpolationQualityLow: The case specifying low interpolation quality. KPDFInterpolationQualityLow PDFInterpolationQuality = 1 // KPDFInterpolationQualityNone: The case where no interpolation quality is specified. KPDFInterpolationQualityNone PDFInterpolationQuality = 0 )
func (PDFInterpolationQuality) String ¶
func (e PDFInterpolationQuality) String() string
type PDFLineStyle ¶
type PDFLineStyle int
See: https://developer.apple.com/documentation/PDFKit/PDFLineStyle
const ( // KPDFLineStyleCircle: A circular line ending filled with the annotation’s interior color, if any. KPDFLineStyleCircle PDFLineStyle = 2 // KPDFLineStyleClosedArrow: A closed arrowhead line ending, consisting of a triangle with the acute vertex at the line end and filled with the annotation’s interior color, if any. KPDFLineStyleClosedArrow PDFLineStyle = 5 // KPDFLineStyleDiamond: A diamond-shaped line ending filled with the annotation’s interior color, if any. KPDFLineStyleDiamond PDFLineStyle = 3 // KPDFLineStyleNone: No line ending. KPDFLineStyleNone PDFLineStyle = 0 // KPDFLineStyleOpenArrow: An open arrowhead line ending, composed from two short lines meeting in an acute angle at the line end. KPDFLineStyleOpenArrow PDFLineStyle = 4 // KPDFLineStyleSquare: A square line ending filled with the annotation’s interior color, if any. KPDFLineStyleSquare PDFLineStyle = 1 )
func (PDFLineStyle) String ¶
func (e PDFLineStyle) String() string
type PDFMarkupType ¶
type PDFMarkupType int
See: https://developer.apple.com/documentation/PDFKit/PDFMarkupType
const ( // KPDFMarkupTypeHighlight: Highlight style for the markup. KPDFMarkupTypeHighlight PDFMarkupType = 0 // KPDFMarkupTypeRedact: The redaction style for markup. KPDFMarkupTypeRedact PDFMarkupType = 3 // KPDFMarkupTypeStrikeOut: Strikethrough style for the markup. KPDFMarkupTypeStrikeOut PDFMarkupType = 1 // KPDFMarkupTypeUnderline: Underline style for the markup. KPDFMarkupTypeUnderline PDFMarkupType = 2 )
func (PDFMarkupType) String ¶
func (e PDFMarkupType) String() string
type PDFOutline ¶
type PDFOutline struct {
objectivec.Object
}
A PDFOutline object is an element in a tree-structured hierarchy that can represent the structure of a PDF document.
Overview ¶
An outline is an optional component of a PDF document, useful for viewing the structure of the document and for navigating within it.
Outlines are created by the document’s author. If you represent a PDF document outline using outline objects, the root of the hierarchy is obtained from the PDF document itself. This root outline is not visible and serves merely as a container for the visible outlines.
Getting Information About an Outline ¶
- PDFOutline.Document: Returns the document with which the outline is associated.
- PDFOutline.NumberOfChildren: Returns the number of child outline objects in the outline.
- PDFOutline.Parent: Returns the parent outline object of the outline (returns [NULL] if called on the root outline object).
- PDFOutline.ChildAtIndex: Returns the child outline object at the specified index.
- PDFOutline.Index: Returns the index of the outline.
Managing Outline Labels ¶
- PDFOutline.Label: Returns the label for the outline.
- PDFOutline.SetLabel
Managing Actions and Destinations ¶
- PDFOutline.Destination: Returns the destination associated with the outline.
- PDFOutline.SetDestination
- PDFOutline.Action: Returns the action performed when users click the outline.
- PDFOutline.SetAction
Changing an Outline Hierarchy ¶
- PDFOutline.InsertChildAtIndex: Inserts the specified outline object at the specified index.
- PDFOutline.RemoveFromParent: Removes the outline object from its parent (does nothing if outline object is the root outline object).
Managing the Disclosure of an Outline Object ¶
- PDFOutline.IsOpen: Returns a Boolean value that indicates whether the outline object is initially disclosed.
- PDFOutline.SetIsOpen
See: https://developer.apple.com/documentation/PDFKit/PDFOutline
func NewPDFOutline ¶
func NewPDFOutline() PDFOutline
NewPDFOutline creates a new PDFOutline instance.
func PDFOutlineFromID ¶
func PDFOutlineFromID(id objc.ID) PDFOutline
PDFOutlineFromID constructs a PDFOutline from an objc.ID.
A PDFOutline object is an element in a tree-structured hierarchy that can represent the structure of a PDF document.
func (PDFOutline) Action ¶
func (p PDFOutline) Action() IPDFAction
Returns the action performed when users click the outline.
Discussion ¶
The root outline serves only as a container for the outlines it owns; it does not have an action. Note that a PDFOutline object can have either an action or a destination, not both.
If the PDFOutline object has a destination, instead of an action, `action` returns a PDFActionGoTo object (this is equivalent to calling [Destination] on the PDFOutline object). For other action types, `action` returns the appropriate PDF Kit action type object, such as PDFActionURL.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/action
func (PDFOutline) Autorelease ¶
func (p PDFOutline) Autorelease() PDFOutline
Autorelease adds the receiver to the current autorelease pool.
func (PDFOutline) ChildAtIndex ¶
func (p PDFOutline) ChildAtIndex(index uint) IPDFOutline
Returns the child outline object at the specified index.
Discussion ¶
The index is zero-based. This method throws an exception if `index` is out of range.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/child(at:)
func (PDFOutline) Destination ¶
func (p PDFOutline) Destination() IPDFDestination
Returns the destination associated with the outline.
Discussion ¶
The root outline serves only as a container for the outlines it owns; it does not have a destination. Note that a PDFOutline object can have either a destination or an action, not both.
This method may return [NULL] if the outline has an associated action instead of a destination. Note that if the associated action is a PDFActionGoTo, this method returns the destination from the PDFActionGoTo object. However, it is better to use the [Action] method for this purpose.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/destination
func (PDFOutline) Document ¶
func (p PDFOutline) Document() IPDFDocument
Returns the document with which the outline is associated.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/document
func (PDFOutline) Index ¶
func (p PDFOutline) Index() uint
Returns the index of the outline.
Discussion ¶
The index of the outline object is relative to its siblings and from the perspective of the parent of the outline object. The root outline object, and any outline object without a parent, has an index value of `0`.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/index
func (PDFOutline) InsertChildAtIndex ¶
func (p PDFOutline) InsertChildAtIndex(child IPDFOutline, index uint)
Inserts the specified outline object at the specified index.
Discussion ¶
To build a PDF outline hierarchy, use this method to add child outline objects. Before you call this method on a PDFOutline object that already has a parent, you should retain the object and call [RemoveFromParent] on it first.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/insertChild(_:at:)
func (PDFOutline) IsOpen ¶
func (p PDFOutline) IsOpen() bool
Returns a Boolean value that indicates whether the outline object is initially disclosed.
Discussion ¶
Calling `isOpen` on an outline object that has no children always returns false. Calling `isOpen` on the root outline object always returns true.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/isOpen
func (PDFOutline) Label ¶
func (p PDFOutline) Label() string
Returns the label for the outline.
Discussion ¶
The root outline serves only as a container for the outlines it owns; it does not have a label.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/label
func (PDFOutline) NumberOfChildren ¶
func (p PDFOutline) NumberOfChildren() uint
Returns the number of child outline objects in the outline.
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/numberOfChildren
func (PDFOutline) Parent ¶
func (p PDFOutline) Parent() IPDFOutline
Returns the parent outline object of the outline (returns [NULL] if called on the root outline object).
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/parent
func (PDFOutline) RemoveFromParent ¶
func (p PDFOutline) RemoveFromParent()
Removes the outline object from its parent (does nothing if outline object is the root outline object).
See: https://developer.apple.com/documentation/PDFKit/PDFOutline/removeFromParent()
func (PDFOutline) SetAction ¶
func (p PDFOutline) SetAction(value IPDFAction)
func (PDFOutline) SetDestination ¶
func (p PDFOutline) SetDestination(value IPDFDestination)
func (PDFOutline) SetIsOpen ¶
func (p PDFOutline) SetIsOpen(value bool)
func (PDFOutline) SetLabel ¶
func (p PDFOutline) SetLabel(value string)
type PDFOutlineClass ¶
type PDFOutlineClass struct {
// contains filtered or unexported fields
}
func GetPDFOutlineClass ¶
func GetPDFOutlineClass() PDFOutlineClass
GetPDFOutlineClass returns the class object for PDFOutline.
func (PDFOutlineClass) Alloc ¶
func (pc PDFOutlineClass) Alloc() PDFOutline
Alloc allocates memory for a new instance of the class.
func (PDFOutlineClass) Class ¶
func (pc PDFOutlineClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFPage ¶
type PDFPage struct {
objectivec.Object
}
PDFPage, a subclass of [NSObject], defines methods used to render PDF pages and work with annotations, text, and selections.
Overview ¶
PDFPage objects are flexible and powerful. With them you can render PDF content onscreen or to a printer, add annotations, count characters, define selections, and get the textual content of a page as an [NSString] object.
Your application instantiates a PDFPage object by asking for one from a PDFDocument object.
For simple display and navigation of PDF documents within your application, you don’t need to use PDFPage. You need only use PDFView.
Initializing a Page ¶
- PDFPage.InitWithImage: Creates a new PDFPage object and initializes it with the specified [NSImage] object.
Getting Information About a Page ¶
- PDFPage.Document: Returns the PDFDocument object with which the page is associated.
- PDFPage.Label: Returns the label for the page.
- PDFPage.BoundsForBox: Returns the bounds for the specified PDF display box.
- PDFPage.SetBoundsForBox: Sets the bounds for the specified box.
- PDFPage.Rotation: Sets the rotation angle for the page in degrees.
- PDFPage.SetRotation
Working with Annotations ¶
- PDFPage.Annotations: Returns an array containing the page’s annotations.
- PDFPage.DisplaysAnnotations: Returns a Boolean value indicating whether annotations are displayed for the page.
- PDFPage.SetDisplaysAnnotations
- PDFPage.AddAnnotation: Adds the specified annotation object to the page.
- PDFPage.RemoveAnnotation: Removes the specified annotation from the page.
- PDFPage.AnnotationAtPoint: Returns the annotation, if there is one, at the specified point.
Working with Textual Content ¶
- PDFPage.NumberOfCharacters: Returns the number of characters on the page, including whitespace characters.
- PDFPage.String: Returns an [NSString] object representing the text on the page.
- PDFPage.AttributedString: Returns an [NSAttributedString] object representing the text on the page.
- PDFPage.CharacterBoundsAtIndex: Returns the bounds, in page space, of the character at the specified index.
- PDFPage.CharacterIndexAtPoint: Returns the character index value for the specified point in page space.
Working with Selections ¶
- PDFPage.SelectionForRect: Returns the text enclosed within the specified rectangle, expressed in page (user) coordinates.
- PDFPage.SelectionForWordAtPoint: Returns the whole word that includes the specified point.
- PDFPage.SelectionForLineAtPoint: Returns the whole line of text that includes the specified point.
- PDFPage.SelectionFromPointToPoint: Returns the text between the two specified points in page space.
- PDFPage.SelectionForRange: Returns the text contained within the specified range.
Initializers ¶
Instance Properties ¶
- PDFPage.DataRepresentation: Returns the PDF data (that is, a PDF document) representing this page. This method does not preserve external page links.
- PDFPage.PageRef
Instance Methods ¶
- PDFPage.DrawWithBoxToContext
- PDFPage.ThumbnailOfSizeForBox
- PDFPage.TransformContextForBox
- PDFPage.TransformForBox
See: https://developer.apple.com/documentation/PDFKit/PDFPage
func NewPDFPageWithImage ¶
func NewPDFPageWithImage(image objectivec.IObject) PDFPage
Creates a new PDFPage object and initializes it with the specified [NSImage] object.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/init(image:)
func NewPDFPageWithImageOptions ¶
func NewPDFPageWithImageOptions(image objectivec.IObject, options foundation.INSDictionary) PDFPage
See: https://developer.apple.com/documentation/PDFKit/PDFPage/init(image:options:)
func PDFPageFromID ¶
PDFPageFromID constructs a PDFPage from an objc.ID.
PDFPage, a subclass of [NSObject], defines methods used to render PDF pages and work with annotations, text, and selections.
func (PDFPage) AddAnnotation ¶
func (p PDFPage) AddAnnotation(annotation IPDFAnnotation)
Adds the specified annotation object to the page.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/addAnnotation(_:)
func (PDFPage) AnnotationAtPoint ¶
func (p PDFPage) AnnotationAtPoint(point corefoundation.CGPoint) IPDFAnnotation
Returns the annotation, if there is one, at the specified point.
Discussion ¶
Use this method for hit-testing based on the current cursor position. If more than one annotation shares the specified point, the frontmost (or topmost) one is returned (the annotations are searched in reverse order of their appearance in the PDF data file). Returns [NULL] if there is no annotation at `point`.
Specify the point in page space. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/annotation(at:)
func (PDFPage) Annotations ¶
func (p PDFPage) Annotations() []PDFAnnotation
Returns an array containing the page’s annotations.
Discussion ¶
The elements of the array will most likely be typed to subclasses of the PDFAnnotation class.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/annotations
func (PDFPage) AttributedString ¶
func (p PDFPage) AttributedString() foundation.NSAttributedString
Returns an [NSAttributedString] object representing the text on the page.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/attributedString
func (PDFPage) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (PDFPage) BoundsForBox ¶
func (p PDFPage) BoundsForBox(box PDFDisplayBox) corefoundation.CGRect
Returns the bounds for the specified PDF display box.
Discussion ¶
The PDFDisplayBox enumeration defines the various box types.
Note that only the media box is required for a PDF. If you request the bounds for the crop box, but the PDF does not include a crop box, the bounds for the media box are returned instead. If you request the bounds for other box types, and the PDF does not includes these types, the bounds for the crop box are returned instead.
The coordinates for the box are in page space, so you might need to transform the points if the page has a rotation on it. Also, note that the bounds `boundsForBox` returns are intersected with the page’s media box.
`boundsForBox` throws a range exception if `box` is not in range.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/bounds(for:)
func (PDFPage) CharacterBoundsAtIndex ¶
func (p PDFPage) CharacterBoundsAtIndex(index int) corefoundation.CGRect
Returns the bounds, in page space, of the character at the specified index.
Discussion ¶
In the unlikely event that there is more than one character at the specified index point, only the bounds of the first character is returned.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. Note that the bounds returned are not guaranteed to have integer coordinates.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/characterBounds(at:)
func (PDFPage) CharacterIndexAtPoint ¶
func (p PDFPage) CharacterIndexAtPoint(point corefoundation.CGPoint) int
Returns the character index value for the specified point in page space.
Discussion ¶
If there is no character at the specified point, the method returns `-1`.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/characterIndex(at:)
func (PDFPage) DataRepresentation ¶
func (p PDFPage) DataRepresentation() foundation.INSData
Returns the PDF data (that is, a PDF document) representing this page. This method does not preserve external page links.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/dataRepresentation
func (PDFPage) DisplaysAnnotations ¶
Returns a Boolean value indicating whether annotations are displayed for the page.
Discussion ¶
If true, the page will draw annotations when a drawing method is called.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/displaysAnnotations
func (PDFPage) Document ¶
func (p PDFPage) Document() IPDFDocument
Returns the PDFDocument object with which the page is associated.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/document
func (PDFPage) DrawWithBoxToContext ¶
func (p PDFPage) DrawWithBoxToContext(box PDFDisplayBox, context coregraphics.CGContextRef)
See: https://developer.apple.com/documentation/PDFKit/PDFPage/draw(with:to:)
func (PDFPage) InitWithImage ¶
func (p PDFPage) InitWithImage(image objectivec.IObject) PDFPage
Creates a new PDFPage object and initializes it with the specified [NSImage] object.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/init(image:)
func (PDFPage) InitWithImageOptions ¶
func (p PDFPage) InitWithImageOptions(image objectivec.IObject, options foundation.INSDictionary) PDFPage
See: https://developer.apple.com/documentation/PDFKit/PDFPage/init(image:options:)
func (PDFPage) Label ¶
Returns the label for the page.
Discussion ¶
Typically, the label is “1” for the first page, “2” for the second page, and so on, but nonnumerical labels are also possible (such as “xxi”, “4-1” and so on).
See: https://developer.apple.com/documentation/PDFKit/PDFPage/label
func (PDFPage) NumberOfCharacters ¶
Returns the number of characters on the page, including whitespace characters.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/numberOfCharacters
func (PDFPage) PageRef ¶
func (p PDFPage) PageRef() coregraphics.CGPDFPageRef
See: https://developer.apple.com/documentation/PDFKit/PDFPage/pageRef
func (PDFPage) RemoveAnnotation ¶
func (p PDFPage) RemoveAnnotation(annotation IPDFAnnotation)
Removes the specified annotation from the page.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/removeAnnotation(_:)
func (PDFPage) Rotation ¶
Sets the rotation angle for the page in degrees.
Discussion ¶
The rotation must be a positive or negative multiple of 90 (negative angles are converted to their positive equivalents; for example, -90 is changed to 270); otherwise this method throws an exception.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/rotation
func (PDFPage) SelectionForLineAtPoint ¶
func (p PDFPage) SelectionForLineAtPoint(point corefoundation.CGPoint) IPDFSelection
Returns the whole line of text that includes the specified point.
Discussion ¶
Returns [NULL] if no line of text contains `point`.
Use this method to respond to a triple-click.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/selectionForLine(at:)
func (PDFPage) SelectionForRange ¶
func (p PDFPage) SelectionForRange(range_ foundation.NSRange) IPDFSelection
Returns the text contained within the specified range.
Discussion ¶
This method raises an exception if the range length is `0` or if either end of the range is outside the range of characters on the page.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/selection(for:)-20y9d
func (PDFPage) SelectionForRect ¶
func (p PDFPage) SelectionForRect(rect corefoundation.CGRect) IPDFSelection
Returns the text enclosed within the specified rectangle, expressed in page (user) coordinates.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/selection(for:)-2ckpi
func (PDFPage) SelectionForWordAtPoint ¶
func (p PDFPage) SelectionForWordAtPoint(point corefoundation.CGPoint) IPDFSelection
Returns the whole word that includes the specified point.
Discussion ¶
Returns [NULL] if no word contains `point`.
Use this method to respond to a double-click.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/selectionForWord(at:)
func (PDFPage) SelectionFromPointToPoint ¶
func (p PDFPage) SelectionFromPointToPoint(startPoint corefoundation.CGPoint, endPoint corefoundation.CGPoint) IPDFSelection
Returns the text between the two specified points in page space.
Discussion ¶
Either point may be the one closer to the start of the page. In determining the selection, the points are sorted first top to bottom and then left to right.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
To visualize the selection, picture the rectangle defined by `startPoint` and `endPoint`. The selection begins at the first character fully within the defined rectangle and closest to its upper-left corner. The selection ends at the last character fully within the defined rectangle and closest to its lower-right corner.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/selection(from:to:)
func (PDFPage) SetBoundsForBox ¶
func (p PDFPage) SetBoundsForBox(bounds corefoundation.CGRect, box PDFDisplayBox)
Sets the bounds for the specified box.
Discussion ¶
If the box does not exist, this method creates it for you.
To remove a box, pass [NSZeroRect] for the bounds (note that you cannot remove the media box). If the box bounds are not in range, this method throws a range exception.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/setBounds(_:for:)
func (PDFPage) SetDisplaysAnnotations ¶
func (PDFPage) SetRotation ¶
func (PDFPage) String ¶
Returns an [NSString] object representing the text on the page.
See: https://developer.apple.com/documentation/PDFKit/PDFPage/string
func (PDFPage) ThumbnailOfSizeForBox ¶
func (p PDFPage) ThumbnailOfSizeForBox(size corefoundation.CGSize, box PDFDisplayBox) objc.ID
See: https://developer.apple.com/documentation/PDFKit/PDFPage/thumbnail(of:for:)
func (PDFPage) TransformContextForBox ¶
func (p PDFPage) TransformContextForBox(context coregraphics.CGContextRef, box PDFDisplayBox)
See: https://developer.apple.com/documentation/PDFKit/PDFPage/transform(_:for:)
func (PDFPage) TransformForBox ¶
func (p PDFPage) TransformForBox(box PDFDisplayBox) corefoundation.CGAffineTransform
See: https://developer.apple.com/documentation/PDFKit/PDFPage/transform(for:)
type PDFPageClass ¶
type PDFPageClass struct {
// contains filtered or unexported fields
}
func GetPDFPageClass ¶
func GetPDFPageClass() PDFPageClass
GetPDFPageClass returns the class object for PDFPage.
func (PDFPageClass) Alloc ¶
func (pc PDFPageClass) Alloc() PDFPage
Alloc allocates memory for a new instance of the class.
func (PDFPageClass) Class ¶
func (pc PDFPageClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFPageImageInitializationOption ¶
type PDFPageImageInitializationOption = string
See: https://developer.apple.com/documentation/PDFKit/PDFPage/ImageInitializationOption
type PDFPageOverlayViewProvider ¶
type PDFPageOverlayViewProvider interface {
objectivec.IObject
// PdfViewOverlayViewForPage protocol.
//
// See: https://developer.apple.com/documentation/PDFKit/PDFPageOverlayViewProvider/pdfView(_:overlayViewFor:)
PdfViewOverlayViewForPage(view IPDFView, page IPDFPage) objc.ID
}
PDFPageOverlayViewProvider protocol.
See: https://developer.apple.com/documentation/PDFKit/PDFPageOverlayViewProvider
type PDFPageOverlayViewProviderObject ¶
type PDFPageOverlayViewProviderObject struct {
objectivec.Object
}
PDFPageOverlayViewProviderObject wraps an existing Objective-C object that conforms to the PDFPageOverlayViewProvider protocol.
func PDFPageOverlayViewProviderObjectFromID ¶
func PDFPageOverlayViewProviderObjectFromID(id objc.ID) PDFPageOverlayViewProviderObject
PDFPageOverlayViewProviderObjectFromID constructs a PDFPageOverlayViewProviderObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (PDFPageOverlayViewProviderObject) BaseObject ¶
func (o PDFPageOverlayViewProviderObject) BaseObject() objectivec.Object
func (PDFPageOverlayViewProviderObject) PdfViewOverlayViewForPage ¶
func (o PDFPageOverlayViewProviderObject) PdfViewOverlayViewForPage(view IPDFView, page IPDFPage) objc.ID
func (PDFPageOverlayViewProviderObject) PdfViewWillDisplayOverlayViewForPage ¶
func (o PDFPageOverlayViewProviderObject) PdfViewWillDisplayOverlayViewForPage(pdfView IPDFView, overlayView objectivec.IObject, page IPDFPage)
func (PDFPageOverlayViewProviderObject) PdfViewWillEndDisplayingOverlayViewForPage ¶
func (o PDFPageOverlayViewProviderObject) PdfViewWillEndDisplayingOverlayViewForPage(pdfView IPDFView, overlayView objectivec.IObject, page IPDFPage)
type PDFPrintScalingMode ¶
type PDFPrintScalingMode int
See: https://developer.apple.com/documentation/PDFKit/PDFPrintScalingMode
const ( // KPDFPrintPageScaleDownToFit: Scale large pages down to fit the paper size (smaller pages do not get scaled up). KPDFPrintPageScaleDownToFit PDFPrintScalingMode = 2 // KPDFPrintPageScaleNone: Do not apply scaling to the page when printing. KPDFPrintPageScaleNone PDFPrintScalingMode = 0 // KPDFPrintPageScaleToFit: Scale each page up or down to best fit the paper size. KPDFPrintPageScaleToFit PDFPrintScalingMode = 1 )
func (PDFPrintScalingMode) String ¶
func (e PDFPrintScalingMode) String() string
type PDFSelection ¶
type PDFSelection struct {
objectivec.Object
}
A PDFSelection object identifies a contiguous or noncontiguous selection of text in a PDF document.
Initializing a Selection ¶
- PDFSelection.InitWithDocument: Returns an empty PDFSelection object.
Getting Information About a Selection ¶
- PDFSelection.Pages: Returns the array of pages contained in the selection.
- PDFSelection.String: Returns an [NSString] object representing the text contained in the selection (may contain linefeed characters).
- PDFSelection.AttributedString: Returns an [NSAttributedString] object representing the text contained in the selection (may contain linefeed characters).
- PDFSelection.BoundsForPage: Returns the bounds of the selection on the specified page.
- PDFSelection.SelectionsByLine: Returns an array of selections, one for each line of text covered by the receiver.
- PDFSelection.Color: Sets the color used for the drawing of a selection in both active and inactive states.
- PDFSelection.SetColor
Modifying a Selection ¶
- PDFSelection.AddSelection: Adds the specified selection to the receiving selection.
- PDFSelection.AddSelections: Adds the specified array of selections to the receiving selection.
- PDFSelection.ExtendSelectionAtEnd: Extends the selection from its end toward the end of the document.
- PDFSelection.ExtendSelectionAtStart: Extends the selection from its start toward the beginning of the document.
Managing Selection Drawing ¶
- PDFSelection.DrawForPageActive: Calls [draw(for:with:active:)](<doc://com.apple.pdfkit/documentation/PDFKit/PDFSelection/draw(for:with:active:)>) with a default value for box parameter.
- PDFSelection.DrawForPageWithBoxActive: Draws the selection relative to the origin of the specified box in page space.
Instance Methods ¶
- PDFSelection.ExtendSelectionForLineBoundaries
- PDFSelection.NumberOfTextRangesOnPage
- PDFSelection.RangeAtIndexOnPage
See: https://developer.apple.com/documentation/PDFKit/PDFSelection
func NewPDFSelection ¶
func NewPDFSelection() PDFSelection
NewPDFSelection creates a new PDFSelection instance.
func NewPDFSelectionWithDocument ¶
func NewPDFSelectionWithDocument(document IPDFDocument) PDFSelection
Returns an empty PDFSelection object.
Discussion ¶
Typically, you don’t need to create a PDFSelection object, but you can use an empty PDFSelection object as a container into which you can place selections, using PDFSelection and addSelections.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/init(document:)
func PDFSelectionFromID ¶
func PDFSelectionFromID(id objc.ID) PDFSelection
PDFSelectionFromID constructs a PDFSelection from an objc.ID.
A PDFSelection object identifies a contiguous or noncontiguous selection of text in a PDF document.
func (PDFSelection) AddSelection ¶
func (p PDFSelection) AddSelection(selection IPDFSelection)
Adds the specified selection to the receiving selection.
Discussion ¶
Selections do not have to be contiguous. If the selection to be added overlaps with the receiving selection, the overlap is removed in a process called normalization.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/add(_:)-8c2r
func (PDFSelection) AddSelections ¶
func (p PDFSelection) AddSelections(selections []PDFSelection)
Adds the specified array of selections to the receiving selection.
Discussion ¶
This method provides better performance than multiple calls to `addSelection` if you need to add several selections to an existing selection. This is because the normalization of the selection (the removal of any overlaps between selections) occurs only once, after all selections have been added.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/add(_:)-3fyld
func (PDFSelection) AttributedString ¶
func (p PDFSelection) AttributedString() foundation.NSAttributedString
Returns an [NSAttributedString] object representing the text contained in the selection (may contain linefeed characters).
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/attributedString
func (PDFSelection) Autorelease ¶
func (p PDFSelection) Autorelease() PDFSelection
Autorelease adds the receiver to the current autorelease pool.
func (PDFSelection) BoundsForPage ¶
func (p PDFSelection) BoundsForPage(page IPDFPage) corefoundation.CGRect
Returns the bounds of the selection on the specified page.
Discussion ¶
The selection rectangle is given in page space.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/bounds(for:)
func (PDFSelection) Color ¶
func (p PDFSelection) Color() objc.ID
Sets the color used for the drawing of a selection in both active and inactive states.
Discussion ¶
When no color has been specified for the PDFSelection objects in a document, the selections are drawn using `[NSColor selectedTextBackgroundColor]` for the active state and `[NSColor secondarySelectedControlColor]` for the inactive state. Use the `setColor` method to supply a color you want to be used for the drawing of both active and inactive selections.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/color
func (PDFSelection) DrawForPageActive ¶
func (p PDFSelection) DrawForPageActive(page IPDFPage, active bool)
Calls [DrawForPageWithBoxActive] with a default value for box parameter.
Discussion ¶
The default value is `kPDFDisplayBoxCropBox`. If active is true, drawing uses `selectedTextBackgroundColor`. If false, it uses `secondarySelectedControlColor`.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/draw(for:active:)
func (PDFSelection) DrawForPageWithBoxActive ¶
func (p PDFSelection) DrawForPageWithBoxActive(page IPDFPage, box PDFDisplayBox, active bool)
Draws the selection relative to the origin of the specified box in page space.
Discussion ¶
The selection is drawn using the current highlight color. If active is true, drawing uses `selectedTextBackgroundColor`. If false, it uses `secondarySelectedControlColor`. Refer to the PDFPage class for the list of available box types.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/draw(for:with:active:)
func (PDFSelection) ExtendSelectionAtEnd ¶
func (p PDFSelection) ExtendSelectionAtEnd(succeed int)
Extends the selection from its end toward the end of the document.
Discussion ¶
The selection may be extended by any amount, up to and including the end of the document.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/extend(atEnd:)
func (PDFSelection) ExtendSelectionAtStart ¶
func (p PDFSelection) ExtendSelectionAtStart(precede int)
Extends the selection from its start toward the beginning of the document.
Discussion ¶
The selection may be extended by any amount, up to and including the beginning of the document.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/extend(atStart:)
func (PDFSelection) ExtendSelectionForLineBoundaries ¶
func (p PDFSelection) ExtendSelectionForLineBoundaries()
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/extendForLineBoundaries()
func (PDFSelection) InitWithDocument ¶
func (p PDFSelection) InitWithDocument(document IPDFDocument) PDFSelection
Returns an empty PDFSelection object.
Discussion ¶
Typically, you don’t need to create a PDFSelection object, but you can use an empty PDFSelection object as a container into which you can place selections, using PDFSelection and addSelections.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/init(document:)
func (PDFSelection) NumberOfTextRangesOnPage ¶
func (p PDFSelection) NumberOfTextRangesOnPage(page IPDFPage) uint
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/numberOfTextRanges(on:)
func (PDFSelection) Pages ¶
func (p PDFSelection) Pages() []PDFPage
Returns the array of pages contained in the selection.
Discussion ¶
Pages are sorted by index number.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/pages
func (PDFSelection) RangeAtIndexOnPage ¶
func (p PDFSelection) RangeAtIndexOnPage(index uint, page IPDFPage) foundation.NSRange
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/range(at:on:)
func (PDFSelection) SelectionsByLine ¶
func (p PDFSelection) SelectionsByLine() []PDFSelection
Returns an array of selections, one for each line of text covered by the receiver.
Discussion ¶
If you call this method on a PDFSelection object that represents a paragraph, for example, `selectionsByLine` returns an array that contains one PDFSelection object for each line of text in the paragraph.
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/selectionsByLine()
func (PDFSelection) SetColor ¶
func (p PDFSelection) SetColor(value objc.ID)
func (PDFSelection) String ¶
func (p PDFSelection) String() string
Returns an [NSString] object representing the text contained in the selection (may contain linefeed characters).
See: https://developer.apple.com/documentation/PDFKit/PDFSelection/string
type PDFSelectionClass ¶
type PDFSelectionClass struct {
// contains filtered or unexported fields
}
func GetPDFSelectionClass ¶
func GetPDFSelectionClass() PDFSelectionClass
GetPDFSelectionClass returns the class object for PDFSelection.
func (PDFSelectionClass) Alloc ¶
func (pc PDFSelectionClass) Alloc() PDFSelection
Alloc allocates memory for a new instance of the class.
func (PDFSelectionClass) Class ¶
func (pc PDFSelectionClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFSelectionGranularity ¶
type PDFSelectionGranularity uint
See: https://developer.apple.com/documentation/PDFKit/PDFSelectionGranularity
const ( PDFSelectionGranularityCharacter PDFSelectionGranularity = 0 PDFSelectionGranularityLine PDFSelectionGranularity = 2 PDFSelectionGranularityWord PDFSelectionGranularity = 1 )
func (PDFSelectionGranularity) String ¶
func (e PDFSelectionGranularity) String() string
type PDFTextAnnotationIconType ¶
type PDFTextAnnotationIconType int
See: https://developer.apple.com/documentation/PDFKit/PDFTextAnnotationIconType
const ( // KPDFTextAnnotationIconComment: Comment annotation icon. KPDFTextAnnotationIconComment PDFTextAnnotationIconType = 0 // KPDFTextAnnotationIconHelp: Help annotation icon. KPDFTextAnnotationIconHelp PDFTextAnnotationIconType = 3 // KPDFTextAnnotationIconInsert: Insert annotation icon. KPDFTextAnnotationIconInsert PDFTextAnnotationIconType = 6 // KPDFTextAnnotationIconKey: Key annotation icon. KPDFTextAnnotationIconKey PDFTextAnnotationIconType = 1 // KPDFTextAnnotationIconNewParagraph: New Paragraph annotation icon. KPDFTextAnnotationIconNewParagraph PDFTextAnnotationIconType = 4 // KPDFTextAnnotationIconNote: Note annotation icon. KPDFTextAnnotationIconNote PDFTextAnnotationIconType = 2 // KPDFTextAnnotationIconParagraph: Paragraph annotation icon. KPDFTextAnnotationIconParagraph PDFTextAnnotationIconType = 5 )
func (PDFTextAnnotationIconType) String ¶
func (e PDFTextAnnotationIconType) String() string
type PDFThumbnailLayoutMode ¶
type PDFThumbnailLayoutMode int
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailLayoutMode
const ( PDFThumbnailLayoutModeHorizontal PDFThumbnailLayoutMode = 0 PDFThumbnailLayoutModeVertical PDFThumbnailLayoutMode = 0 )
func (PDFThumbnailLayoutMode) String ¶
func (e PDFThumbnailLayoutMode) String() string
type PDFThumbnailView ¶
An object that contains a set of thumbnails, each of which represents a page in a PDF document.
Accessing the Associated PDF View ¶
- PDFThumbnailView.PDFView: Returns the PDFView object associated with the thumbnail view.
- PDFThumbnailView.SetPDFView
Managing the Size of a Thumbnail View ¶
- PDFThumbnailView.ThumbnailSize: Returns the maximum width and height of the thumbnails in the thumbnail view.
- PDFThumbnailView.SetThumbnailSize
Working with Thumbnail View Display Characteristics ¶
- PDFThumbnailView.MaximumNumberOfColumns: Returns the maximum number of columns of thumbnails the thumbnail view can display.
- PDFThumbnailView.SetMaximumNumberOfColumns
- PDFThumbnailView.LabelFont: Returns the font used to label the thumbnails.
- PDFThumbnailView.SetLabelFont
- PDFThumbnailView.BackgroundColor: Returns the color used in the background of the thumbnail view.
- PDFThumbnailView.SetBackgroundColor
Managing the Behavior of a Thumbnail View ¶
- PDFThumbnailView.AllowsDragging: Returns a Boolean value indicating whether users can drag thumbnails (that is, re-order pages in the document) within the thumbnail view.
- PDFThumbnailView.SetAllowsDragging
- PDFThumbnailView.AllowsMultipleSelection: Returns a Boolean value indicating whether users can select multiple thumbnails in the thumbnail view at one time.
- PDFThumbnailView.SetAllowsMultipleSelection
- PDFThumbnailView.SelectedPages: Returns an array of PDF pages that correspond to the selected thumbnails in the thumbnail view.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView
func NewPDFThumbnailView ¶
func NewPDFThumbnailView() PDFThumbnailView
NewPDFThumbnailView creates a new PDFThumbnailView instance.
func PDFThumbnailViewFromID ¶
func PDFThumbnailViewFromID(id objc.ID) PDFThumbnailView
PDFThumbnailViewFromID constructs a PDFThumbnailView from an objc.ID.
An object that contains a set of thumbnails, each of which represents a page in a PDF document.
func (PDFThumbnailView) AllowsDragging ¶
func (p PDFThumbnailView) AllowsDragging() bool
Returns a Boolean value indicating whether users can drag thumbnails (that is, re-order pages in the document) within the thumbnail view.
Return Value ¶
true if users can re-order pages by dragging thumbnails, false otherwise.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/allowsDragging
func (PDFThumbnailView) AllowsMultipleSelection ¶
func (p PDFThumbnailView) AllowsMultipleSelection() bool
Returns a Boolean value indicating whether users can select multiple thumbnails in the thumbnail view at one time.
Return Value ¶
true if users can select multiple thumbnails simultaneously, false otherwise.
Discussion ¶
By default, PDFThumbnailView allows only a single thumbnail to be selected at one time. When this is the case, you can get the PDF page that corresponds to the selected thumbnail using the PDFView method [CurrentPage].
When multiple selections are enabled, however, you must use [SelectedPages] to get the pages that correspond to the set of selected thumbnails.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/allowsMultipleSelection
func (PDFThumbnailView) Autorelease ¶
func (p PDFThumbnailView) Autorelease() PDFThumbnailView
Autorelease adds the receiver to the current autorelease pool.
func (PDFThumbnailView) BackgroundColor ¶
func (p PDFThumbnailView) BackgroundColor() objc.ID
Returns the color used in the background of the thumbnail view.
Return Value ¶
The color of the background in the thumbnail view.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/backgroundColor
func (PDFThumbnailView) Init ¶
func (p PDFThumbnailView) Init() PDFThumbnailView
Init initializes the instance.
func (PDFThumbnailView) LabelFont ¶
func (p PDFThumbnailView) LabelFont() appkit.NSFont
Returns the font used to label the thumbnails.
Return Value ¶
The font used in the thumbnail labels.
Discussion ¶
Typically, the label of a thumbnail is the page number of the page it represents.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/labelFont
func (PDFThumbnailView) MaximumNumberOfColumns ¶
func (p PDFThumbnailView) MaximumNumberOfColumns() uint
Returns the maximum number of columns of thumbnails the thumbnail view can display.
Return Value ¶
The maximum number of columns of thumbnails the thumbnail view can display. If `0`, the thumbnail displays as many columns of thumbnails as fit in its size.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/maximumNumberOfColumns
func (PDFThumbnailView) PDFView ¶
func (p PDFThumbnailView) PDFView() IPDFView
Returns the PDFView object associated with the thumbnail view.
Return Value ¶
The PDF view object associated with the thumbnail view.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/pdfView
func (PDFThumbnailView) SelectedPages ¶
func (p PDFThumbnailView) SelectedPages() []PDFPage
Returns an array of PDF pages that correspond to the selected thumbnails in the thumbnail view.
Return Value ¶
An array of PDF pages that correspond to the thumbnails selected in the thumbnail view.
Discussion ¶
If the thumbnail view allows multiple selections (if [AllowsMultipleSelection] returns true), you can use this method to get the PDF pages that correspond to the selected thumbnails.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/selectedPages
func (PDFThumbnailView) SetAllowsDragging ¶
func (p PDFThumbnailView) SetAllowsDragging(value bool)
func (PDFThumbnailView) SetAllowsMultipleSelection ¶
func (p PDFThumbnailView) SetAllowsMultipleSelection(value bool)
func (PDFThumbnailView) SetBackgroundColor ¶
func (p PDFThumbnailView) SetBackgroundColor(value objc.ID)
func (PDFThumbnailView) SetLabelFont ¶
func (p PDFThumbnailView) SetLabelFont(value appkit.NSFont)
func (PDFThumbnailView) SetMaximumNumberOfColumns ¶
func (p PDFThumbnailView) SetMaximumNumberOfColumns(value uint)
func (PDFThumbnailView) SetPDFView ¶
func (p PDFThumbnailView) SetPDFView(value IPDFView)
func (PDFThumbnailView) SetThumbnailSize ¶
func (p PDFThumbnailView) SetThumbnailSize(value corefoundation.CGSize)
func (PDFThumbnailView) ThumbnailSize ¶
func (p PDFThumbnailView) ThumbnailSize() corefoundation.CGSize
Returns the maximum width and height of the thumbnails in the thumbnail view.
Return Value ¶
The maximum width and height of the thumbnails in the thumbnail view.
See: https://developer.apple.com/documentation/PDFKit/PDFThumbnailView/thumbnailSize
type PDFThumbnailViewClass ¶
type PDFThumbnailViewClass struct {
// contains filtered or unexported fields
}
func GetPDFThumbnailViewClass ¶
func GetPDFThumbnailViewClass() PDFThumbnailViewClass
GetPDFThumbnailViewClass returns the class object for PDFThumbnailView.
func (PDFThumbnailViewClass) Alloc ¶
func (pc PDFThumbnailViewClass) Alloc() PDFThumbnailView
Alloc allocates memory for a new instance of the class.
func (PDFThumbnailViewClass) Class ¶
func (pc PDFThumbnailViewClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFView ¶
An object that encapsulates the functionality of PDF Kit into a single widget that you can add to your application using Interface Builder.
Overview ¶
PDFView may be the only class you need to deal with for adding PDF functionality to your application. It lets you display PDF data and allows users to select content, navigate through a document, set zoom level, and copy textual content to the Pasteboard. PDFView also keeps track of page history.
You can subclass PDFView to create a custom PDF viewer.
You can also create a custom PDF viewer by using the PDF Kit utility classes directly and not using PDFView at all.
Associating a Document with a View ¶
- PDFView.Document: Returns the document associated with a PDFView object.
- PDFView.SetDocument
Navigating Within a Document ¶
- PDFView.CurrentPage: Returns the current page.
- PDFView.CurrentDestination: Returns a PDFDestination object representing the current page and the current point in the view specified in page space.
- PDFView.VisiblePages: Returns an array of PDFPage objects that represent the currently visible pages.
Setting the Delegate ¶
- PDFView.Delegate: Returns the view’s delegate.
- PDFView.SetDelegate
Instance Properties ¶
- PDFView.InMarkupMode
- PDFView.SetInMarkupMode
- PDFView.PageOverlayViewProvider
- PDFView.SetPageOverlayViewProvider
- PDFView.PageShadowsEnabled
- PDFView.SetPageShadowsEnabled
See: https://developer.apple.com/documentation/PDFKit/PDFView
func PDFViewFromID ¶
PDFViewFromID constructs a PDFView from an objc.ID.
An object that encapsulates the functionality of PDF Kit into a single widget that you can add to your application using Interface Builder.
func (PDFView) AcceptsDraggedFiles ¶
A Boolean value indicating whether you can drag a file into the view.
See: https://developer.apple.com/documentation/PDFKit/PDFView/acceptsDraggedFiles
func (PDFView) AnnotationsChangedOnPage ¶
Tells the PDF view that an annotation on the specified page has changed.
Discussion ¶
When the PDFView object receives this message, it rescans for tool tips and pop-ups and informs the [PDFThumbailView] objects so the thumbnail images can be redrawn.
See: https://developer.apple.com/documentation/PDFKit/PDFView/annotationsChanged(on:)
func (PDFView) AreaOfInterestForMouse ¶
func (p PDFView) AreaOfInterestForMouse(event objectivec.IObject) PDFAreaOfInterest
Returns the type of area the mouse cursor is over.
Discussion ¶
The PDFAreaOfInterest enumeration defines the various area types. This method is for custom subclasses of the PDFView class. Use it if you override the [NSResponder] class’s mouseMoved(with:) method or related methods.
Refer to [Constants] for the various values of the area-of-interest constants. Each of these constants contributes to the value of the PDFAreaOfInterest bit field.
See: https://developer.apple.com/documentation/PDFKit/PDFView/areaOfInterest(forMouse:)
func (PDFView) AreaOfInterestForPoint ¶
func (p PDFView) AreaOfInterestForPoint(cursorLocation corefoundation.CGPoint) PDFAreaOfInterest
Returns the type of area for a specific cursor location point.
See: https://developer.apple.com/documentation/PDFKit/PDFView/areaOfInterest(for:)
func (PDFView) AutoScales ¶
A Boolean value indicating whether autoscaling is set.
See: https://developer.apple.com/documentation/PDFKit/PDFView/autoScales
func (PDFView) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (PDFView) BackgroundColor ¶
The view’s background color.
Discussion ¶
A view’s background is the area displayed to either side of a PDF document’s pages. The background also appears between pages when page breaks are enabled. The default color is a 50% gray.
See: https://developer.apple.com/documentation/PDFKit/PDFView/backgroundColor
func (PDFView) CanGoBack ¶
Returns a Boolean value indicating whether the user can navigate to the previous page in the page history.
Discussion ¶
The page history gets built as your application calls navigation methods such as [GoToDestination] and [GoToLastPage].
See: https://developer.apple.com/documentation/PDFKit/PDFView/canGoBack
func (PDFView) CanGoForward ¶
Returns a Boolean value indicating whether the user can navigate to the next page in the page history.
Discussion ¶
The page history gets built as your application calls navigation methods such as [GoToDestination] and [GoToLastPage].
See: https://developer.apple.com/documentation/PDFKit/PDFView/canGoForward
func (PDFView) CanGoToFirstPage ¶
Returns a Boolean value indicating whether the user can navigate to the first page of the document.
Discussion ¶
The return value will be true unless the view is already displaying the first page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/canGoToFirstPage
func (PDFView) CanGoToLastPage ¶
Returns a Boolean value indicating whether the user can navigate to the last page of the document.
Discussion ¶
The return value will be true unless the view is already displaying the last page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/canGoToLastPage
func (PDFView) CanGoToNextPage ¶
Returns a Boolean value indicating whether the user can navigate to the next page of the document.
Discussion ¶
The return value will be true unless the view is displaying the last page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/canGoToNextPage
func (PDFView) CanGoToPreviousPage ¶
Returns a Boolean value indicating whether the user can navigate to the previous page of the document.
Discussion ¶
The return value will be true unless the view is displaying the first page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/canGoToPreviousPage
func (PDFView) CanZoomIn ¶
Returns a Boolean value indicating whether the user can magnify the view and zoom in.
See: https://developer.apple.com/documentation/PDFKit/PDFView/canZoomIn
func (PDFView) CanZoomOut ¶
Returns a Boolean value indicating whether the user can view an expanded area and zoom out.
See: https://developer.apple.com/documentation/PDFKit/PDFView/canZoomOut
func (PDFView) ClearSelection ¶
func (p PDFView) ClearSelection()
Clears the selection.
Discussion ¶
The view redraws as necessary but does not scroll. This call is equivalent to calling `[PDFView NULL].`
See: https://developer.apple.com/documentation/PDFKit/PDFView/clearSelection()
func (PDFView) ConvertPointFromPage ¶
func (p PDFView) ConvertPointFromPage(point corefoundation.CGPoint, page IPDFPage) corefoundation.CGPoint
Converts a point from page space to view space.
Discussion ¶
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
See: https://developer.apple.com/documentation/PDFKit/PDFView/convert(_:from:)-4evlx
func (PDFView) ConvertPointToPage ¶
func (p PDFView) ConvertPointToPage(point corefoundation.CGPoint, page IPDFPage) corefoundation.CGPoint
Converts a point from view space to page space.
Discussion ¶
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
See: https://developer.apple.com/documentation/PDFKit/PDFView/convert(_:to:)-9twqk
func (PDFView) ConvertRectFromPage ¶
func (p PDFView) ConvertRectFromPage(rect corefoundation.CGRect, page IPDFPage) corefoundation.CGRect
Converts a rectangle from page space to view space.
Discussion ¶
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
See: https://developer.apple.com/documentation/PDFKit/PDFView/convert(_:from:)-9xv1z
func (PDFView) ConvertRectToPage ¶
func (p PDFView) ConvertRectToPage(rect corefoundation.CGRect, page IPDFPage) corefoundation.CGRect
Converts a rectangle from view space to page space.
Discussion ¶
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page. View space is a coordinate system with the origin at the lower-left corner of the current PDF view.
See: https://developer.apple.com/documentation/PDFKit/PDFView/convert(_:to:)-8cp0c
func (PDFView) Copy ¶
func (p PDFView) Copy(sender objectivec.IObject)
Copies the text in the selection, if any, to the Pasteboard.
See: https://developer.apple.com/documentation/PDFKit/PDFView/copy(_:)
func (PDFView) CurrentDestination ¶
func (p PDFView) CurrentDestination() IPDFDestination
Returns a PDFDestination object representing the current page and the current point in the view specified in page space.
Discussion ¶
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/currentDestination
func (PDFView) CurrentPage ¶
Returns the current page.
Discussion ¶
When there are two pages in the view in a two-up mode, “current page” is the left page. For continuous modes, returns the page crossing a horizontal line halfway between the view’s top and bottom bounds.
See: https://developer.apple.com/documentation/PDFKit/PDFView/currentPage
func (PDFView) CurrentSelection ¶
func (p PDFView) CurrentSelection() IPDFSelection
The current selection.
Discussion ¶
Returns [NULL] if no selection exists.
Note that this method returns the actual instance of the current PDFSelection object. Therefore, if you want to modify it, you should make a copy of the returned selection and modify that, instead.
See: https://developer.apple.com/documentation/PDFKit/PDFView/currentSelection
func (PDFView) Delegate ¶
func (p PDFView) Delegate() PDFViewDelegate
Returns the view’s delegate.
See: https://developer.apple.com/documentation/PDFKit/PDFView/delegate
func (PDFView) DisplayBox ¶
func (p PDFView) DisplayBox() PDFDisplayBox
The current style of display box.
Discussion ¶
The available values for display boxes are defined in the Constants section in the PDFPage class.
See: https://developer.apple.com/documentation/PDFKit/PDFView/displayBox
func (PDFView) DisplayDirection ¶
func (p PDFView) DisplayDirection() PDFDisplayDirection
The layout direction, either vertical or horizontal, for the given display mode.
See: https://developer.apple.com/documentation/PDFKit/PDFView/displayDirection
func (PDFView) DisplayMode ¶
func (p PDFView) DisplayMode() PDFDisplayMode
The current display mode.
Discussion ¶
See [Constants] for possible values.
See: https://developer.apple.com/documentation/PDFKit/PDFView/displayMode
func (PDFView) DisplaysAsBook ¶
A Boolean value indicating whether the view will display the first page as a book cover (meaningful only when the document is in two-up or two-up continuous display mode).
See: https://developer.apple.com/documentation/PDFKit/PDFView/displaysAsBook
func (PDFView) DisplaysPageBreaks ¶
A Boolean value indicating whether the view is displaying page breaks.
See: https://developer.apple.com/documentation/PDFKit/PDFView/displaysPageBreaks
func (PDFView) DisplaysRTL ¶
The presentation of pages from right-to-left.
See: https://developer.apple.com/documentation/PDFKit/PDFView/displaysRTL
func (PDFView) Document ¶
func (p PDFView) Document() IPDFDocument
Returns the document associated with a PDFView object.
See: https://developer.apple.com/documentation/PDFKit/PDFView/document
func (PDFView) DocumentView ¶
The innermost view used by PDFView or by your PDFView subclass.
Discussion ¶
The innermost view is the one displaying the visible document pages. This method is useful when converting coordinates from one view to another.
See: https://developer.apple.com/documentation/PDFKit/PDFView/documentView
func (PDFView) DrawPagePostToContext ¶
func (p PDFView) DrawPagePostToContext(page IPDFPage, context coregraphics.CGContextRef)
Perform post-page rendering for a page rendered to a context.
See: https://developer.apple.com/documentation/PDFKit/PDFView/drawPagePost(_:to:)
func (PDFView) DrawPageToContext ¶
func (p PDFView) DrawPageToContext(page IPDFPage, context coregraphics.CGContextRef)
Draw and render a visible page to a context.
See: https://developer.apple.com/documentation/PDFKit/PDFView/draw(_:to:)
func (PDFView) EnableDataDetectors ¶
A Boolean value indicating whether to turns on or off data detection, which adds annotations for detected URLs in a page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/enableDataDetectors
func (PDFView) GoBack ¶
func (p PDFView) GoBack(sender objectivec.IObject)
Navigates back one step in the page history.
Discussion ¶
The page history gets built as your application calls navigation methods such as [GoToDestination] and [GoToLastPage].
See: https://developer.apple.com/documentation/PDFKit/PDFView/goBack(_:)
func (PDFView) GoForward ¶
func (p PDFView) GoForward(sender objectivec.IObject)
Navigates forward one step in the page history.
Discussion ¶
The page history gets built as your application calls navigation methods such as [GoToDestination] and [GoToLastPage].
See: https://developer.apple.com/documentation/PDFKit/PDFView/goForward(_:)
func (PDFView) GoToDestination ¶
func (p PDFView) GoToDestination(destination IPDFDestination)
Navigates to the specified destination.
Discussion ¶
Destinations include a page and a point on the page specified in page space.
Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/go(to:)-5lh5d
func (PDFView) GoToFirstPage ¶
func (p PDFView) GoToFirstPage(sender objectivec.IObject)
Navigates to the first page of the document.
Discussion ¶
PDF Kit records the move in its page history.
See: https://developer.apple.com/documentation/PDFKit/PDFView/goToFirstPage(_:)
func (PDFView) GoToLastPage ¶
func (p PDFView) GoToLastPage(sender objectivec.IObject)
Navigates to the last page of the document.
Discussion ¶
PDF Kit records the move in its page history.
See: https://developer.apple.com/documentation/PDFKit/PDFView/goToLastPage(_:)
func (PDFView) GoToNextPage ¶
func (p PDFView) GoToNextPage(sender objectivec.IObject)
Navigates to the next page of the document.
Discussion ¶
PDF Kit records the move in its page history.
See: https://developer.apple.com/documentation/PDFKit/PDFView/goToNextPage(_:)
func (PDFView) GoToPage ¶
Scrolls to the specified page.
Discussion ¶
PDF Kit records the move in its page history.
See: https://developer.apple.com/documentation/PDFKit/PDFView/go(to:)-6x8y2
func (PDFView) GoToPreviousPage ¶
func (p PDFView) GoToPreviousPage(sender objectivec.IObject)
Navigates to the previous page of the document.
Discussion ¶
PDF Kit records the move in its page history.
See: https://developer.apple.com/documentation/PDFKit/PDFView/goToPreviousPage(_:)
func (PDFView) GoToRectOnPage ¶
func (p PDFView) GoToRectOnPage(rect corefoundation.CGRect, page IPDFPage)
Navigates to the specified rectangle on the specified page.
Discussion ¶
If the specified rectangle is already visible, this method does nothing. This allows you to scroll the PDFView object to a specific PDFAnnotation or PDFSelection object, because both of these objects have bounds methods that return an annotation or selection position in page space.
Note that `rect` is specified in page-space coordinates. Page space is a 72 dpi coordinate system with the origin at the lower-left corner of the current page.
See: https://developer.apple.com/documentation/PDFKit/PDFView/go(to:on:)
func (PDFView) GoToSelection ¶
func (p PDFView) GoToSelection(selection IPDFSelection)
Scrolls to the first character of the specified selection.
Discussion ¶
PDF Kit records the move in its page history.
See: https://developer.apple.com/documentation/PDFKit/PDFView/go(to:)-3t5go
func (PDFView) HighlightedSelections ¶
func (p PDFView) HighlightedSelections() []PDFSelection
Returns the array of selections that are highlighted using `setHighlightedSelections`.
See: https://developer.apple.com/documentation/PDFKit/PDFView/highlightedSelections
func (PDFView) InMarkupMode ¶
See: https://developer.apple.com/documentation/PDFKit/PDFView/isInMarkupMode
func (PDFView) InterpolationQuality ¶
func (p PDFView) InterpolationQuality() PDFInterpolationQuality
The interpolation quality for images drawn into the PDFView context.
See: https://developer.apple.com/documentation/PDFKit/PDFView/interpolationQuality
func (PDFView) LayoutDocumentView ¶
func (p PDFView) LayoutDocumentView()
Performs layout of the inner views.
Discussion ¶
The PDFView actually contains several subviews, such as the document view (where the PDF is actually drawn) and a “matte view” (which may appear as a gray area around the PDF content, depending on the scaling). Changes to the PDF content may require changes to these inner views, so you must call this method explicitly if you use PDF Kit utility classes to add or remove a page, rotate a page, or perform other operations affecting visible layout.
This method is called automatically from PDFView methods that affect the visible layout (such as `setDocument(_:)`, `setDisplayBox(_:)` or [ZoomIn]).
See: https://developer.apple.com/documentation/PDFKit/PDFView/layoutDocumentView()
func (PDFView) MaxScaleFactor ¶
The maximum scaling factor for the PDF document.
See: https://developer.apple.com/documentation/PDFKit/PDFView/maxScaleFactor
func (PDFView) MinScaleFactor ¶
The minimum scaling factor for the PDF document.
See: https://developer.apple.com/documentation/PDFKit/PDFView/minScaleFactor
func (PDFView) PageBreakMargins ¶
func (p PDFView) PageBreakMargins() objectivec.IObject
The spacing between pages as defined by the top, bottom, left, and right margins.
See: https://developer.apple.com/documentation/PDFKit/PDFView/pageBreakMargins
func (PDFView) PageForPointNearest ¶
func (p PDFView) PageForPointNearest(point corefoundation.CGPoint, nearest bool) IPDFPage
Returns the page containing a point specified in view coordinates.
Discussion ¶
Returns [NULL] if there’s no page at the specified point and `nearest` is set to false.
See: https://developer.apple.com/documentation/PDFKit/PDFView/page(for:nearest:)
func (PDFView) PageOverlayViewProvider ¶
func (p PDFView) PageOverlayViewProvider() PDFPageOverlayViewProvider
See: https://developer.apple.com/documentation/PDFKit/PDFView/pageOverlayViewProvider
func (PDFView) PageShadowsEnabled ¶
See: https://developer.apple.com/documentation/PDFKit/PDFView/pageShadowsEnabled
func (PDFView) PerformAction ¶
func (p PDFView) PerformAction(action IPDFAction)
Performs the specified action.
See: https://developer.apple.com/documentation/PDFKit/PDFView/perform(_:)
func (PDFView) PrintWithInfoAutoRotate ¶
func (p PDFView) PrintWithInfoAutoRotate(printInfo appkit.NSPrintInfo, doRotate bool)
Prints the document with the specified printer information.
Discussion ¶
If `autoRotate` is set to true, then ths method ignores the orientation attribute in the [NSPrintInfo] object and instead chooses the orientation that best fits the page to the paper size. This orientation occurs on a page-by-page basis.
See: https://developer.apple.com/documentation/PDFKit/PDFView/print(with:autoRotate:)
func (PDFView) PrintWithInfoAutoRotatePageScaling ¶
func (p PDFView) PrintWithInfoAutoRotatePageScaling(printInfo appkit.NSPrintInfo, doRotate bool, scale PDFPrintScalingMode)
Prints the document with the specified printer and page-scaling information.
Discussion ¶
If `pageScaling` is set to `kPDFPrintPageScaleToFit`, each page is scaled up or down to best fit the paper size. If `pageScaling` is set to `kPDFPrintPageScaleDownToFit`, only large pages are scaled down to fit; small pages are not scaled up to fit. Specifying `kPDFPrintPageScaleNone` for `pageScaling` is equivalent to calling [PrintWithInfoAutoRotate]. See PDFDocument for more information on page-scaling types.
See: https://developer.apple.com/documentation/PDFKit/PDFView/print(with:autoRotate:pageScaling:)
func (PDFView) RowSizeForPage ¶
func (p PDFView) RowSizeForPage(page IPDFPage) corefoundation.CGSize
Returns the size needed to display a row of the current document page.
Discussion ¶
The size is dependent on the current scale factor and display attributes.
See: https://developer.apple.com/documentation/PDFKit/PDFView/rowSize(for:)
func (PDFView) ScaleFactor ¶
The current scale factor for the view.
See: https://developer.apple.com/documentation/PDFKit/PDFView/scaleFactor
func (PDFView) ScaleFactorForSizeToFit ¶
The “size to fit” scale factor that `autoScales` would use for scaling the current document and layout.
See: https://developer.apple.com/documentation/PDFKit/PDFView/scaleFactorForSizeToFit
func (PDFView) ScrollSelectionToVisible ¶
func (p PDFView) ScrollSelectionToVisible(sender objectivec.IObject)
Scrolls the view until the selection is visible.
See: https://developer.apple.com/documentation/PDFKit/PDFView/scrollSelectionToVisible(_:)
func (PDFView) SetAcceptsDraggedFiles ¶
func (PDFView) SetAutoScales ¶
func (PDFView) SetBackgroundColor ¶
func (PDFView) SetCurrentSelection ¶
func (p PDFView) SetCurrentSelection(value IPDFSelection)
func (PDFView) SetCurrentSelectionAnimate ¶
func (p PDFView) SetCurrentSelectionAnimate(selection IPDFSelection, animate bool)
Sets the current selection, in an animated way, if desired.
Discussion ¶
This method behaves as `setCurrentSelection(_:)`, but with the addition of animation, if `animate` is true. The animation serves to draw the user’s attention to the new selection, which can be useful when implementing search.
See: https://developer.apple.com/documentation/PDFKit/PDFView/setCurrentSelection(_:animate:)
func (PDFView) SetCursorForAreaOfInterest ¶
func (p PDFView) SetCursorForAreaOfInterest(area PDFAreaOfInterest)
Sets the type of mouse cursor according to the type of area the mouse cursor is over.
Discussion ¶
This method is especially useful for custom subclasses of the PDFView class.
See: https://developer.apple.com/documentation/PDFKit/PDFView/setCursorFor(_:)
func (PDFView) SetDelegate ¶
func (p PDFView) SetDelegate(value PDFViewDelegate)
func (PDFView) SetDisplayBox ¶
func (p PDFView) SetDisplayBox(value PDFDisplayBox)
func (PDFView) SetDisplayDirection ¶
func (p PDFView) SetDisplayDirection(value PDFDisplayDirection)
func (PDFView) SetDisplayMode ¶
func (p PDFView) SetDisplayMode(value PDFDisplayMode)
func (PDFView) SetDisplaysAsBook ¶
func (PDFView) SetDisplaysPageBreaks ¶
func (PDFView) SetDisplaysRTL ¶
func (PDFView) SetDocument ¶
func (p PDFView) SetDocument(value IPDFDocument)
func (PDFView) SetEnableDataDetectors ¶
func (PDFView) SetHighlightedSelections ¶
func (p PDFView) SetHighlightedSelections(value []PDFSelection)
func (PDFView) SetInMarkupMode ¶
func (PDFView) SetInterpolationQuality ¶
func (p PDFView) SetInterpolationQuality(value PDFInterpolationQuality)
func (PDFView) SetMaxScaleFactor ¶
func (PDFView) SetMinScaleFactor ¶
func (PDFView) SetPageBreakMargins ¶
func (p PDFView) SetPageBreakMargins(value objectivec.IObject)
func (PDFView) SetPageOverlayViewProvider ¶
func (p PDFView) SetPageOverlayViewProvider(value PDFPageOverlayViewProvider)
func (PDFView) SetPageShadowsEnabled ¶
func (PDFView) SetScaleFactor ¶
func (PDFView) VisiblePages ¶
Returns an array of PDFPage objects that represent the currently visible pages.
See: https://developer.apple.com/documentation/PDFKit/PDFView/visiblePages
func (PDFView) ZoomIn ¶
func (p PDFView) ZoomIn(sender objectivec.IObject)
Zooms in by increasing the scaling factor.
Discussion ¶
Each invocation of `zoomIn` muliplies the scaling factor by the square root of 2.
See: https://developer.apple.com/documentation/PDFKit/PDFView/zoomIn(_:)
func (PDFView) ZoomOut ¶
func (p PDFView) ZoomOut(sender objectivec.IObject)
Zooms out by decreasing the scaling factor.
Discussion ¶
Each invocation of `zoomOut` divides the scaling factor by the square root of 2.
See: https://developer.apple.com/documentation/PDFKit/PDFView/zoomOut(_:)
type PDFViewClass ¶
type PDFViewClass struct {
// contains filtered or unexported fields
}
func GetPDFViewClass ¶
func GetPDFViewClass() PDFViewClass
GetPDFViewClass returns the class object for PDFView.
func (PDFViewClass) Alloc ¶
func (pc PDFViewClass) Alloc() PDFView
Alloc allocates memory for a new instance of the class.
func (PDFViewClass) Class ¶
func (pc PDFViewClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type PDFViewDelegate ¶
type PDFViewDelegate interface {
objectivec.IObject
}
The delegate for the PDFView object.
See: https://developer.apple.com/documentation/PDFKit/PDFViewDelegate
type PDFViewDelegateConfig ¶
type PDFViewDelegateConfig struct {
// Other Methods
// PDFViewPerformFind — Performs a find operation.
PDFViewPerformFind func(sender PDFView)
// PDFViewPerformGoToPage — Performs a go-to operation.
PDFViewPerformGoToPage func(sender PDFView)
// PDFViewPerformPrint — Prints the current document.
PDFViewPerformPrint func(sender PDFView)
// PDFViewOpenPDFForRemoteGoToAction — Opens a specified page.
PDFViewOpenPDFForRemoteGoToAction func(sender PDFView, action PDFActionRemoteGoTo)
// PDFViewWillChangeScaleFactorToScale — Overrides changes to the scale factor.
PDFViewWillChangeScaleFactorToScale func(sender PDFView, scaler float64) float64
// PDFViewWillClickOnLinkWithURL — Handle clicks on URL links in a view.
PDFViewWillClickOnLinkWithURL func(sender PDFView, url foundation.NSURL)
}
PDFViewDelegateConfig holds optional typed callbacks for PDFViewDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type PDFViewDelegateObject ¶
type PDFViewDelegateObject struct {
objectivec.Object
}
PDFViewDelegateObject wraps an existing Objective-C object that conforms to the PDFViewDelegate protocol.
func NewPDFViewDelegate ¶
func NewPDFViewDelegate(config PDFViewDelegateConfig) PDFViewDelegateObject
NewPDFViewDelegate creates an Objective-C object implementing the PDFViewDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned PDFViewDelegateObject satisfies the PDFViewDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func PDFViewDelegateObjectFromID ¶
func PDFViewDelegateObjectFromID(id objc.ID) PDFViewDelegateObject
PDFViewDelegateObjectFromID constructs a PDFViewDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (PDFViewDelegateObject) BaseObject ¶
func (o PDFViewDelegateObject) BaseObject() objectivec.Object
func (PDFViewDelegateObject) PDFViewOpenPDFForRemoteGoToAction ¶
func (o PDFViewDelegateObject) PDFViewOpenPDFForRemoteGoToAction(sender IPDFView, action IPDFActionRemoteGoTo)
Opens a specified page.
func (PDFViewDelegateObject) PDFViewParentViewController ¶
func (o PDFViewDelegateObject) PDFViewParentViewController() objc.ID
See: https://developer.apple.com/documentation/PDFKit/PDFViewDelegate/pdfViewParentViewController()
func (PDFViewDelegateObject) PDFViewPerformFind ¶
func (o PDFViewDelegateObject) PDFViewPerformFind(sender IPDFView)
Performs a find operation.
See: https://developer.apple.com/documentation/PDFKit/PDFViewDelegate/pdfViewPerformFind(_:)
func (PDFViewDelegateObject) PDFViewPerformGoToPage ¶
func (o PDFViewDelegateObject) PDFViewPerformGoToPage(sender IPDFView)
Performs a go-to operation.
See: https://developer.apple.com/documentation/PDFKit/PDFViewDelegate/pdfViewPerformGo(toPage:)
func (PDFViewDelegateObject) PDFViewPerformPrint ¶
func (o PDFViewDelegateObject) PDFViewPerformPrint(sender IPDFView)
Prints the current document.
See: https://developer.apple.com/documentation/PDFKit/PDFViewDelegate/pdfViewPerformPrint(_:)
func (PDFViewDelegateObject) PDFViewPrintJobTitle ¶
func (o PDFViewDelegateObject) PDFViewPrintJobTitle(sender IPDFView) string
Overrides the job title used when the PDFView is printed.
See: https://developer.apple.com/documentation/PDFKit/PDFViewDelegate/pdfViewPrintJobTitle(_:)
func (PDFViewDelegateObject) PDFViewWillChangeScaleFactorToScale ¶
func (o PDFViewDelegateObject) PDFViewWillChangeScaleFactorToScale(sender IPDFView, scaler float64) float64
Overrides changes to the scale factor.
func (PDFViewDelegateObject) PDFViewWillClickOnLinkWithURL ¶
func (o PDFViewDelegateObject) PDFViewWillClickOnLinkWithURL(sender IPDFView, url foundation.INSURL)
Handle clicks on URL links in a view.
See: https://developer.apple.com/documentation/PDFKit/PDFViewDelegate/pdfViewWillClick(onLink:with:)
type PDFWidgetCellState ¶
type PDFWidgetCellState int
See: https://developer.apple.com/documentation/PDFKit/PDFWidgetCellState
const ( // KPDFWidgetMixedState: The button widget is in a mixed state, neither on nor off. KPDFWidgetMixedState PDFWidgetCellState = -1 // KPDFWidgetOffState: The button widget is in an unselected state. KPDFWidgetOffState PDFWidgetCellState = 0 // KPDFWidgetOnState: The button widget is in a selected state. KPDFWidgetOnState PDFWidgetCellState = 1 )
func (PDFWidgetCellState) String ¶
func (e PDFWidgetCellState) String() string
type PDFWidgetControlType ¶
type PDFWidgetControlType int
See: https://developer.apple.com/documentation/PDFKit/PDFWidgetControlType
const ( // KPDFWidgetCheckBoxControl: Check box control. KPDFWidgetCheckBoxControl PDFWidgetControlType = 2 // KPDFWidgetPushButtonControl: Push button control. KPDFWidgetPushButtonControl PDFWidgetControlType = 0 // KPDFWidgetRadioButtonControl: Radio button control. KPDFWidgetRadioButtonControl PDFWidgetControlType = 1 // KPDFWidgetUnknownControl: Unknown control type. KPDFWidgetUnknownControl PDFWidgetControlType = -1 )
func (PDFWidgetControlType) String ¶
func (e PDFWidgetControlType) String() string
Source Files
¶
- constants.gen.go
- delegate_class_counter.gen.go
- doc.gen.go
- enums.gen.go
- functions.gen.go
- generate.go
- global_vars.gen.go
- pdf_action.gen.go
- pdf_action_go_to.gen.go
- pdf_action_named.gen.go
- pdf_action_remote_go_to.gen.go
- pdf_action_reset_form.gen.go
- pdf_action_url.gen.go
- pdf_annotation.gen.go
- pdf_appearance_characteristics.gen.go
- pdf_border.gen.go
- pdf_destination.gen.go
- pdf_document.gen.go
- pdf_document_delegate_protocol.gen.go
- pdf_outline.gen.go
- pdf_page.gen.go
- pdf_page_overlay_view_provider_protocol.gen.go
- pdf_selection.gen.go
- pdf_thumbnail_view.gen.go
- pdf_view.gen.go
- pdf_view_delegate_protocol.gen.go
- typedefs.gen.go
- types.gen.go
- undefined_types.gen.go