Class FreeTextCreate
Inheritance
System.Object
Windows.UI.Xaml.DependencyObject
Windows.UI.Xaml.UIElement
Windows.UI.Xaml.FrameworkElement
Windows.UI.Xaml.Controls.Panel
Windows.UI.Xaml.Controls.Canvas
FreeTextCreate
Implements
Windows.UI.Composition.IAnimationObject
Windows.UI.Composition.IVisualElement
Assembly: pdftron.PDF.Tools.dll
Syntax
public class FreeTextCreate : Tool, IDependencyObject, IDependencyObject2, IUIElement, IUIElement2, IUIElement3, IUIElement4, IUIElement5, IUIElement7, IUIElement8, IUIElement9, IUIElement10, IUIElementOverrides, IUIElementOverrides7, IUIElementOverrides8, IUIElementOverrides9, IAnimationObject, IVisualElement, IFrameworkElement, IFrameworkElement2, IFrameworkElement3, IFrameworkElement4, IFrameworkElement6, IFrameworkElement7, IFrameworkElementProtected7, IFrameworkElementOverrides, IFrameworkElementOverrides2, IPanel, IPanel2, ICanvas
Constructors
FreeTextCreate(PDFViewCtrl, ToolManager)
Declaration
public FreeTextCreate(PDFViewCtrl ctrl, ToolManager tMan)
Parameters
Type |
Name |
Description |
PDFViewCtrl |
ctrl |
|
ToolManager |
tMan |
|
Fields
BBOX_HORIZONTAL_OFFSET
Declaration
protected const double BBOX_HORIZONTAL_OFFSET = null
Field Value
Type |
Description |
System.Double |
|
BBOX_VERTICAL_OFFSET
Declaration
protected const double BBOX_VERTICAL_OFFSET = null
Field Value
Type |
Description |
System.Double |
|
FONT_SIZE_VERTICAL_LOOKUP_TABLE
Declaration
protected static readonly List<Tuple<double, double>> FONT_SIZE_VERTICAL_LOOKUP_TABLE
Field Value
Type |
Description |
List<Tuple<System.Double, System.Double>> |
|
mCreationMode
Declaration
protected int mCreationMode
Field Value
Type |
Description |
System.Int32 |
|
mDownPageNumber
Declaration
protected int mDownPageNumber
Field Value
Type |
Description |
System.Int32 |
|
mFixedSize
Declaration
protected bool mFixedSize
Field Value
Type |
Description |
System.Boolean |
|
mFontBundle
Declaration
protected UtilityFunctions.FontBundle mFontBundle
Field Value
mFontSize
Declaration
protected double mFontSize
Field Value
Type |
Description |
System.Double |
|
mIsKeyboardOpen
Declaration
protected bool mIsKeyboardOpen
Field Value
Type |
Description |
System.Boolean |
|
mMouseWheelHandler
Declaration
protected PointerEventHandler mMouseWheelHandler
Field Value
Type |
Description |
Windows.UI.Xaml.Input.PointerEventHandler |
|
mOpacity
Declaration
protected double mOpacity
Field Value
Type |
Description |
System.Double |
|
mPageCropOnClient
Declaration
protected Rect mPageCropOnClient
Field Value
Type |
Description |
pdftron.PDF.Rect |
|
mPointerID
Declaration
Field Value
Type |
Description |
System.Int32 |
|
mSaveWhenClosing
Declaration
protected bool mSaveWhenClosing
Field Value
Type |
Description |
System.Boolean |
|
mTextBoundaryRectangle
Declaration
protected Rectangle mTextBoundaryRectangle
Field Value
Type |
Description |
Windows.UI.Xaml.Shapes.Rectangle |
|
mTextBox
Declaration
protected RichEditBox mTextBox
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.RichEditBox |
|
mTextBoxHeight
Declaration
protected double mTextBoxHeight
Field Value
Type |
Description |
System.Double |
|
mTextBoxWidth
Declaration
protected double mTextBoxWidth
Field Value
Type |
Description |
System.Double |
|
mTextBrush
Declaration
protected SolidColorBrush mTextBrush
Field Value
Type |
Description |
Windows.UI.Xaml.Media.SolidColorBrush |
|
mTextHasBeenSaved
Declaration
protected bool mTextHasBeenSaved
Field Value
Type |
Description |
System.Boolean |
|
Declaration
protected Popup mTextPopup
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.Primitives.Popup |
|
mTextRect
Declaration
Field Value
Type |
Description |
pdftron.PDF.Rect |
|
mTranslateOffset
Declaration
protected double mTranslateOffset
Field Value
Type |
Description |
System.Double |
|
mViewerCanvas
Declaration
protected Canvas mViewerCanvas
Field Value
Type |
Description |
Windows.UI.Xaml.Controls.Canvas |
|
mZoomFactor
Declaration
protected double mZoomFactor
Field Value
Type |
Description |
System.Double |
|
TEXT_BOX_HORIZONTAL_BASE_OFFSET
Declaration
protected const double TEXT_BOX_HORIZONTAL_BASE_OFFSET = null
Field Value
Type |
Description |
System.Double |
|
TEXT_BOX_VERTICAL_BASE_OFFSET
Declaration
protected const double TEXT_BOX_VERTICAL_BASE_OFFSET = null
Field Value
Type |
Description |
System.Double |
|
Properties
FontBundle
Declaration
public UtilityFunctions.FontBundle FontBundle { get; set; }
Property Value
Methods
Calculates the bounding box of a FreeText annotation and returns a PDFRect.
Declaration
public static Rect CalculateFreeTextBoundingBox(PDFViewCtrl pdfViewCtrl, UtilityFunctions.FontBundle fontBundle, Annots.FreeText textAnnotation, int pageNumber, double xPosition = null, double yPosition = null, PageRotate rotation = null, bool isFixedSize = false, Rect fixedSizeRect = null)
Parameters
Type |
Name |
Description |
PDFViewCtrl |
pdfViewCtrl |
PDFViewCtrl object that contains the current document. PDFViewCtrl is a utility class that can be used for interactive rendering of PDF documents.
|
UtilityFunctions.FontBundle |
fontBundle |
FontBundle object that contains the font information.
|
Annots.FreeText |
textAnnotation |
FreeText object for which bounding box needs to be calculated. Please make sure you had called RefreshAppearance() on this object after creation and before it is passed to this method.
|
System.Int32 |
pageNumber |
Page number where the FreeText annotation was added.
|
System.Double |
xPosition |
Origin X value of the FreeText annotation.
|
System.Double |
yPosition |
Origin Y value of the FreeText annotation.
|
PageRotate |
rotation |
Page rotation value.
|
System.Boolean |
isFixedSize |
True if the FreeText annotation has fixed size.
|
pdftron.PDF.Rect |
fixedSizeRect |
PDFRect that specifies the size if the FreeText annotation has fixed size.
|
Returns
Type |
Description |
pdftron.PDF.Rect |
PDFRect that contains FreeText Annotation Bounding Box
|
CustomKeyboardHandler(Object, InputPaneVisibilityEventArgs)
This function will translate the entire view control if necessary in order to make sure the text box is visible.
Declaration
protected void CustomKeyboardHandler(object sender, InputPaneVisibilityEventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
Windows.UI.ViewManagement.InputPaneVisibilityEventArgs |
e |
|
GetElementRect(FrameworkElement)
Returns a rectangle with the coordinates of the framework element in screenspace
Declaration
protected Rect GetElementRect(FrameworkElement element)
Parameters
Type |
Name |
Description |
Windows.UI.Xaml.FrameworkElement |
element |
|
Returns
Type |
Description |
Windows.Foundation.Rect |
|
InputPaneHiding(InputPane, InputPaneVisibilityEventArgs)
This function translates the view control back down to it's original position
Declaration
protected void InputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs e)
Parameters
Type |
Name |
Description |
Windows.UI.ViewManagement.InputPane |
sender |
|
Windows.UI.ViewManagement.InputPaneVisibilityEventArgs |
e |
|
SetTargetPoint(Point, Boolean)
Declaration
public void SetTargetPoint(Point point, bool HasBorder = true)
Parameters
Type |
Name |
Description |
Windows.Foundation.Point |
point |
|
System.Boolean |
HasBorder |
|
SetUpTextBox(Boolean)
Declaration
protected void SetUpTextBox(bool hasBorder = true)
Parameters
Type |
Name |
Description |
System.Boolean |
hasBorder |
|
SetUpTextBoxForPhone()
Declaration
protected void SetUpTextBoxForPhone()
SetUpTextBoxForWindows(Boolean)
Positions the text box according to where the user tapped
If the user clicks and drags, the text box is of fixed size.
If the user taps, it will grow to the bounds of the page or the screen
Declaration
protected void SetUpTextBoxForWindows(bool hasBorder = true)
Parameters
Type |
Name |
Description |
System.Boolean |
hasBorder |
|
UpdateDoc(String)
Update the document with the new text
Declaration
protected void UpdateDoc(string text = null)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Implements
Windows.UI.Composition.IAnimationObject
Windows.UI.Composition.IVisualElement
Extension Methods