|
Foxit PDF SDK
|
Public Member Functions | |
| def | EnableCaption (cap) |
| Set the flag which is used to decide whether the content of current line annotation should be replicated as a caption in the appearance or not. More... | |
| def | GetCaptionOffset () |
| Get caption offset values. More... | |
| def | GetCaptionPositionType () |
| Get the position type of caption. More... | |
| def | GetEndPoint () |
| Get the end point. More... | |
| def | GetLeaderLineExtensionLength () |
| Get the length of leader line extension. More... | |
| def | GetLeaderLineLength () |
| Get the length of leader line. More... | |
| def | GetLeaderLineOffset () |
| Get the length of leader line offset. More... | |
| def | GetLineEndStyle () |
| Get line ending style of the end point. More... | |
| def | GetLineStartStyle () |
| Get line ending style of the start point. More... | |
| def | GetMeasureConversionFactor (measure_type) |
| Get the conversion factor for measuring. More... | |
| def | GetMeasureRatio () |
| Get the scale ratio string for measuring. More... | |
| def | GetMeasureRatioW () |
| Get the scale ratio Unicode string for measuring. More... | |
| def | GetMeasureUnit (measure_type) |
| Get the label for displaying the units for measuring. More... | |
| def | GetMeasureUnitW (measure_type) |
| Get the label (in Unicode string) for displaying the units for measuring. More... | |
| def | GetStartPoint () |
| Get the start point. More... | |
| def | GetStyleFillColor () |
| Get fill color for ending styles. More... | |
| def | HasCaption () |
| Check whether the content of current line annotation should be replicated as a caption in the appearance or not. More... | |
| def | SetCaptionOffset (offset) |
| Set caption offset values. More... | |
| def | SetCaptionPositionType (cap_position) |
| Set the position type of caption. More... | |
| def | SetEndPoint (point) |
| Set the end point. More... | |
| def | SetLeaderLineExtensionLength (extension_length) |
| Set the length of leader line extension. More... | |
| def | SetLeaderLineLength (length) |
| Set the length of leader line. More... | |
| def | SetLeaderLineOffset (offset) |
| Set the length of leader line offset. More... | |
| def | SetLineEndStyle (ending_style) |
| Set line ending style of the end point. More... | |
| def | SetLineStartStyle (ending_style) |
| Set line ending style of the start point. More... | |
| def | SetMeasureConversionFactor (measure_type, factor) |
| Set the conversion factor for measuring. More... | |
| def | SetMeasureRatio (ratio) |
| Set the scale ratio string for measuring. More... | |
| def | SetMeasureUnit (measure_type, unit) |
| Set the label for displaying the units for measuring. More... | |
| def | SetStartPoint (point) |
| Set the start point. More... | |
| def | SetStyleFillColor (color) |
| Set fill color for ending styles. More... | |
A line annotation displays a single straight line on the page.
Line annotation is a kind of markup annotation, so class Line is derived from class Markup , and also offers functions to get/set line annotation's properties and reset appearance stream of a line annotation.
For a line annotation, start point and end point are required. So please ensure that a line annotation has valid start point and end point before resetting its appearance stream; otherwise the line annotation cannot be reset appearance stream.
| def fsdk.Line.EnableCaption | ( | cap | ) |
Set the flag which is used to decide whether the content of current line annotation should be replicated as a caption in the appearance or not.
This property has effect on line annotation's appearance. If user wants the effect to be shown in annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after this function.
| [in] | cap | true means the content should be replicated as a caption in the appearance of current line annotation, while false means not. |
| def fsdk.Line.GetCaptionOffset | ( | ) |
Get caption offset values.
Caption offset is the offset of caption from its normal position.
Only when current line annotation have a caption, this property is meaningful and has effect on line's annotation's appearance. Function fsdk.Line.HasCaption can be used to check if current line annotation should have a caption, and function fsdk.Line.EnableCaption can be used to change the status.
| def fsdk.Line.GetCaptionPositionType | ( | ) |
Get the position type of caption.
Only when current line annotation have a caption, this property is meaningful and has effect on line's annotation's appearance. Function fsdk.Line.HasCaption can be used to check if current line annotation should have a caption, and function fsdk.Line.EnableCaption can be used to change the status.
| def fsdk.Line.GetEndPoint | ( | ) |
Get the end point.
Start point and end point are required for a line annotation. They have effect on line annotation's appearance.
| def fsdk.Line.GetLeaderLineExtensionLength | ( | ) |
Get the length of leader line extension.
Leader line extensions extend from the line proper 180 degrees from the leader lines.
For more details, please refer to "Line Annotations" in Section 8.4.5 "Annotation Types" of <PDF reference 1.7> .
| def fsdk.Line.GetLeaderLineLength | ( | ) |
Get the length of leader line.
Leader lines extend from each endpoint of a line perpendicular to the line itself. A positive value means that the leader lines appear in the direction that is clockwise when traversing the line from its start point to its end point; a negative value indicates the opposite direction. Specially, even the length of leader line is 0, the line annotation can still have leader line extension and leader line offset. For this case, the direction of leader line is same as positive length value in order that the direction or position of leader line extension and offset can still be judged.
For more details, please refer to "Line Annotations" in Section 8.4.5 "Annotation Types" of <PDF reference 1.7> .
| def fsdk.Line.GetLeaderLineOffset | ( | ) |
Get the length of leader line offset.
Leader line offset is the amount of empty space between the endpoints of the line annotation and the beginning of the leader lines.
For more details, please refer to "Line Annotations" in Section 8.4.5 "Annotation Types" of <PDF reference 1.7> .
| def fsdk.Line.GetLineEndStyle | ( | ) |
Get line ending style of the end point.
This property has effect on line annotation's appearance.
| def fsdk.Line.GetLineStartStyle | ( | ) |
Get line ending style of the start point.
This property has effect on line annotation's appearance.
| def fsdk.Line.GetMeasureConversionFactor | ( | measure_type | ) |
Get the conversion factor for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Please refer to P745 in <PDF Reference 1.7> for more details.
| [in] | measure_type | Measure type. Please refer to values starting from fsdk.MarkupE_MeasureTypeX and this would be one of these values. |
| def fsdk.Line.GetMeasureRatio | ( | ) |
Get the scale ratio string for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Scale ratio string expresses the scale ratio of the drawing in the region. Please refer to P745 in <PDF Reference 1.7> for more details.
| def fsdk.Line.GetMeasureRatioW | ( | ) |
Get the scale ratio Unicode string for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Scale ratio string expresses the scale ratio of the drawing in the region. Please refer to P745 in <PDF Reference 1.7> for more details.
| def fsdk.Line.GetMeasureUnit | ( | measure_type | ) |
Get the label for displaying the units for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Please refer to P745 in <PDF Reference 1.7> for more details.
| [in] | measure_type | Measure type. Please refer to values starting from fsdk.MarkupE_MeasureTypeX and this should be one of these values. |
| def fsdk.Line.GetMeasureUnitW | ( | measure_type | ) |
Get the label (in Unicode string) for displaying the units for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Please refer to P745 in <PDF Reference 1.7> for more details.
| [in] | measure_type | Measure type. Please refer to values starting from fsdk.MarkupE_MeasureTypeX and this should be one of these values. |
| def fsdk.Line.GetStartPoint | ( | ) |
Get the start point.
Start point and end point are required for a line annotation. They have effect on line annotation's appearance.
| def fsdk.Line.GetStyleFillColor | ( | ) |
Get fill color for ending styles.
This property has effect on line annotation's appearance. Fill color is used for some line ending styles:
"Square", "Circle", "Diamond", "ClosedArrow", "RClosedArrow".
| def fsdk.Line.HasCaption | ( | ) |
Check whether the content of current line annotation should be replicated as a caption in the appearance or not.
| def fsdk.Line.SetCaptionOffset | ( | offset | ) |
Set caption offset values.
Caption offset is the offset of caption from its normal position.
Only when current line annotation have a caption, this property is meaningful and has effect on line's annotation's appearance. Function fsdk.Line.HasCaption can be used to check if current line annotation should have a caption, and function fsdk.Line.EnableCaption can be used to change the status.
If user wants the effect to be shown in annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after this function.
| [in] | offset | New offset values . |
| def fsdk.Line.SetCaptionPositionType | ( | cap_position | ) |
Set the position type of caption.
Only when current line annotation have a caption, this property is meaningful and has effect on line's annotation's appearance. Function fsdk.Line.HasCaption can be used to check if current line annotation should have a caption, and function fsdk.Line.EnableCaption can be used to change the status.
If user wants the effect to be shown in annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after this function.
| [in] | cap_position | The position type of caption. Please refer to values starting from fsdk.LineE_CapPosInline and this should be one of these values. |
| def fsdk.Line.SetEndPoint | ( | point | ) |
Set the end point.
Start point and end point are required for a line annotation. They have effect on line annotation's appearance.
If user wants the new end point has effect on annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after setting new end point.
| [in] | point | New point that specifies the end point. |
| def fsdk.Line.SetLeaderLineExtensionLength | ( | extension_length | ) |
Set the length of leader line extension.
Leader line extensions extend from the line proper 180 degrees from the leader lines.
For more details, please refer to "Line Annotations" in Section 8.4.5 "Annotation Types" of <PDF reference 1.7> .
| [in] | extension_length | The length of leader line extension. It should be a non-negative value. 0 means no leader line extension. |
| def fsdk.Line.SetLeaderLineLength | ( | length | ) |
Set the length of leader line.
Leader lines extend from each endpoint of a line perpendicular to the line itself. A positive value means that the leader lines appear in the direction that is clockwise when traversing the line from its start point to its end point; a negative value indicates the opposite direction. Specially, even the length of leader line is 0, the line annotation can still have leader line extension and leader line offset. For this case, the direction of leader line is same as positive length value in order that the direction or position of leader line extension and offset can still be judged.
For more details, please refer to "Line Annotations" in Section 8.4.5 "Annotation Types" of <PDF reference 1.7> .
| [in] | length | The length of leader lines. See details part for more details. 0 means no leader line. |
| def fsdk.Line.SetLeaderLineOffset | ( | offset | ) |
Set the length of leader line offset.
Leader line offset is the amount of empty space between the endpoints of the line annotation and the beginning of the leader lines.
For more details, please refer to "Line Annotations" in Section 8.4.5 "Annotation Types" of <PDF reference 1.7> .
| [in] | offset | The length of leader line offset. It should be a non-negative value. 0 means no leader line extension. |
| def fsdk.Line.SetLineEndStyle | ( | ending_style | ) |
Set line ending style of the end point.
This property has effect on line annotation's appearance. If user wants the new line ending style has effect on annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after setting new line ending style.
| [in] | ending_style | The line ending style for the end point to be set. Please refer to values starting from fsdk.MarkupE_EndingStyleNone and this should be one of these values. |
| def fsdk.Line.SetLineStartStyle | ( | ending_style | ) |
Set line ending style of the start point.
This property has effect on line annotation's appearance. If user wants the new line ending style has effect on annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after setting new line ending style.
| [in] | ending_style | The line ending style for the start point to be set. Please refer to values starting from fsdk.MarkupE_EndingStyleNone and this should be one of these values. |
| def fsdk.Line.SetMeasureConversionFactor | ( | measure_type, | |
| factor | |||
| ) |
Set the conversion factor for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Please refer to P745 in <PDF Reference 1.7> for more details.
| [in] | measure_type | Measure type. Please refer to values starting from fsdk.MarkupE_MeasureTypeX and this would be one of these values. |
| [in] | factor | The conversion factor. |
| def fsdk.Line.SetMeasureRatio | ( | ratio | ) |
Set the scale ratio string for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Scale ratio string expresses the scale ratio of the drawing in the region. Please refer to P745 in <PDF Reference 1.7> for more details.
| [in] | ratio | A UTF-8 byte string expressing the scale ratio. The string should be like: "1/4 in = 1 ft", indicating that 1/4 inches in default user space is equivalent to 1 foot in real-world measurements. |
| def fsdk.Line.SetMeasureUnit | ( | measure_type, | |
| unit | |||
| ) |
Set the label for displaying the units for measuring.
A line annotation may have a measure dictionary that specifies an alternate coordinate system for a region of a page. Please refer to P745 in <PDF Reference 1.7> for more details.
| [in] | measure_type | Measure type. Please refer to values starting from fsdk.MarkupE_MeasureTypeX and this should be one of these values. |
| [in] | unit | A UTF-8 text string that specifies a label for displaying the units. |
| def fsdk.Line.SetStartPoint | ( | point | ) |
Set the start point.
Start point and end point are required for a line annotation. They have effect on line annotation's appearance.
If user wants the new start point has effect on annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after setting new start point.
| [in] | point | New point that specifies the start point. |
| def fsdk.Line.SetStyleFillColor | ( | color | ) |
Set fill color for ending styles.
This property has effect on line annotation's appearance. Fill color is used for some line ending styles:
"Square", "Circle", "Diamond", "ClosedArrow", "RClosedArrow".
If user wants the new fill color has effect on annotation's appearance, please call function fsdk.Annot.ResetAppearanceStream after setting new fill color.
| [in] | color | New fill color of ending style. Format: 0xRRGGBB. |