Skip to content

Commit ca4b315

Browse files
Artyom YanchevskyiText-CI
authored andcommitted
Add some javadocs to PdfDocument & PdfAnnotationBorder
DEVSIX-4979 Autoported commit. Original commit hash: [09da76536]
1 parent 7458ad2 commit ca4b315

File tree

3 files changed

+73
-1
lines changed

3 files changed

+73
-1
lines changed

itext/itext.kernel/itext/kernel/pdf/PdfAnnotationBorder.cs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,59 @@ source product.
4242
4343
*/
4444
namespace iText.Kernel.Pdf {
45+
/// <summary>Specifying the characteristics of the annotation’s border.</summary>
46+
/// <remarks>
47+
/// Specifying the characteristics of the annotation’s border.
48+
/// See ISO 32000-1 12.5.2, Table 164 - Entries common to all annotation dictionaries, Key - border.
49+
/// <para />
50+
/// Note (PDF 1.2): The dictionaries for some annotation types can include the BS (border style) entry.
51+
/// That entry specifies a border style dictionary that has more settings than this class.
52+
/// If an annotation has BS entry, then
53+
/// <see cref="PdfAnnotationBorder"/>
54+
/// is ignored.
55+
/// </remarks>
4556
public class PdfAnnotationBorder : PdfObjectWrapper<PdfArray> {
57+
/// <summary>
58+
/// Creates a
59+
/// <see cref="PdfAnnotationBorder"/>
60+
/// with three numbers defining the horizontal
61+
/// corner radius, vertical corner radius, and border width, all in default user
62+
/// space units.
63+
/// </summary>
64+
/// <remarks>
65+
/// Creates a
66+
/// <see cref="PdfAnnotationBorder"/>
67+
/// with three numbers defining the horizontal
68+
/// corner radius, vertical corner radius, and border width, all in default user
69+
/// space units. If the corner radii are 0, the border has square (not rounded)
70+
/// corners; if the border width is 0, no border is drawn.
71+
/// </remarks>
72+
/// <param name="hRadius">horizontal corner radius</param>
73+
/// <param name="vRadius">vertical corner radius</param>
74+
/// <param name="width">width of the border</param>
4675
public PdfAnnotationBorder(float hRadius, float vRadius, float width)
4776
: this(hRadius, vRadius, width, null) {
4877
}
4978

79+
/// <summary>
80+
/// Creates a
81+
/// <see cref="PdfAnnotationBorder"/>
82+
/// with three numbers defining the horizontal
83+
/// corner radius, vertical corner radius, and border width, all in default user
84+
/// space units and a dash pattern for the border lines.
85+
/// </summary>
86+
/// <remarks>
87+
/// Creates a
88+
/// <see cref="PdfAnnotationBorder"/>
89+
/// with three numbers defining the horizontal
90+
/// corner radius, vertical corner radius, and border width, all in default user
91+
/// space units and a dash pattern for the border lines. If the corner radii are 0,
92+
/// the border has square (not rounded) corners; if the border width is 0, no border is drawn.
93+
/// </remarks>
94+
/// <param name="hRadius">horizontal corner radius</param>
95+
/// <param name="vRadius">vertical corner radius</param>
96+
/// <param name="width">width of the border</param>
97+
/// <param name="dash">the dash pattern</param>
5098
public PdfAnnotationBorder(float hRadius, float vRadius, float width, PdfDashPattern dash)
5199
: base(new PdfArray(new float[] { hRadius, vRadius, width })) {
52100
if (dash != null) {

itext/itext.kernel/itext/kernel/pdf/PdfDocument.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,15 @@ protected internal virtual void SetXmpMetadata(byte[] xmpMetadata) {
266266
this.xmpMetadata = xmpMetadata;
267267
}
268268

269+
/// <summary>Sets the XMP Metadata.</summary>
270+
/// <param name="xmpMeta">the xmpMetadata to set</param>
271+
/// <param name="serializeOptions">serialization options</param>
269272
public virtual void SetXmpMetadata(XMPMeta xmpMeta, SerializeOptions serializeOptions) {
270273
SetXmpMetadata(XMPMetaFactory.SerializeToBuffer(xmpMeta, serializeOptions));
271274
}
272275

276+
/// <summary>Sets the XMP Metadata.</summary>
277+
/// <param name="xmpMeta">the xmpMetadata to set</param>
273278
public virtual void SetXmpMetadata(XMPMeta xmpMeta) {
274279
SerializeOptions serializeOptions = new SerializeOptions();
275280
serializeOptions.SetPadding(2000);
@@ -1844,6 +1849,14 @@ public virtual FingerPrint GetFingerPrint() {
18441849
return fingerPrint;
18451850
}
18461851

1852+
/// <summary>
1853+
/// Find
1854+
/// <see cref="iText.Kernel.Font.PdfFont"/>
1855+
/// from loaded fonts with corresponding fontProgram and encoding or CMAP.
1856+
/// </summary>
1857+
/// <param name="fontProgram">a font name or path to a font program</param>
1858+
/// <param name="encoding">an encoding or CMAP</param>
1859+
/// <returns>the font instance, or null if font wasn't found</returns>
18471860
public virtual PdfFont FindFont(String fontProgram, String encoding) {
18481861
foreach (PdfFont font in documentFonts.Values) {
18491862
if (!font.IsFlushed() && font.IsBuiltWith(fontProgram, encoding)) {
@@ -2153,6 +2166,7 @@ protected internal virtual ICollection<PdfFont> GetDocumentFonts() {
21532166
return documentFonts.Values;
21542167
}
21552168

2169+
/// <summary>Flushes all newly added or loaded fonts.</summary>
21562170
protected internal virtual void FlushFonts() {
21572171
if (properties.appendMode) {
21582172
foreach (PdfFont font in GetDocumentFonts()) {
@@ -2264,6 +2278,16 @@ private void UpdateProducerInInfoDictionary() {
22642278
info.GetPdfObject().Put(PdfName.Producer, new PdfString(producer));
22652279
}
22662280

2281+
/// <summary>
2282+
/// Initializes the new instance of document's structure tree root
2283+
/// <see cref="iText.Kernel.Pdf.Tagging.PdfStructTreeRoot"/>.
2284+
/// </summary>
2285+
/// <remarks>
2286+
/// Initializes the new instance of document's structure tree root
2287+
/// <see cref="iText.Kernel.Pdf.Tagging.PdfStructTreeRoot"/>.
2288+
/// See ISO 32000-1, section 14.7.2 Structure Hierarchy.
2289+
/// </remarks>
2290+
/// <param name="str">dictionary to create structure tree root</param>
22672291
protected internal virtual void TryInitTagStructure(PdfDictionary str) {
22682292
try {
22692293
structTreeRoot = new PdfStructTreeRoot(str, this);

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c99fd3cbd9992f3e9b5bff7676387bc6c677c64c
1+
09da765369970f1e8c0f8e5f79f23887eeb459b9

0 commit comments

Comments
 (0)