diff --git a/docs/accessibility.html b/docs/accessibility.html index b7a4c2a..30b1766 100644 --- a/docs/accessibility.html +++ b/docs/accessibility.html @@ -1,4 +1,4 @@ -Accessibility

Accessibility

+Accessibility

Accessibility

Accessible PDFs are usable by visually impaired users who rely on screen readers/text-to-speech engines/vocalisation.

@@ -310,7 +310,7 @@ is not possible for some reason
  • P - paragraph
  • "Illustration" elements (should have alt and/or actualtext set):

    -
    • Figure - figure
    • Formula - formula
    • Form - form widget
  • \ No newline at end of file diff --git a/docs/text.html b/docs/text.html index 3f02dfe..b0eb746 100644 --- a/docs/text.html +++ b/docs/text.html @@ -1,4 +1,4 @@ -Text in PDFKit

    Text in PDFKit

    +Text in PDFKit

    Text in PDFKit

    The basics

    @@ -82,7 +82,7 @@ doc.rect(doc.x, 0, 410, doc.y).stroke();
    documents, which can be passed to the text method. They are enumerated below.

    -
    • lineBreak - set to false to disable line wrapping all together
    • width - the width that text should be wrapped to (by default, the page width minus the left and right margin)
    • height - the maximum height that text should be clipped to
    • ellipsis - the character to display at the end of the text when it is too long. Set to true to use the default character.
    • columns - the number of columns to flow the text into
    • columnGap - the amount of space between each column (1/4 inch by default)
    • indent - the amount in PDF points (72 per inch) to indent each paragraph of text
    • indentAllLines - wheter to indent all lines of a paragraph (false by default - indents only the first line)
    • paragraphGap - the amount of space between each paragraph of text
    • lineGap - the amount of space between each line of text
    • wordSpacing - the amount of space between each word in the text
    • characterSpacing - the amount of space between each character in the text
    • horizontalScaling - ability to scale text horizontally (100 percent by default)
    • fill - whether to fill the text (true by default)
    • stroke - whether to stroke the text
    • link - a URL to link this text to (shortcut to create an annotation)
    • goTo - go to anchor (shortcut to create an annotation)
    • destination - create anchor to this text
    • underline - whether to underline the text
    • strike - whether to strike out the text
    • oblique - whether to slant the text (angle in degrees or true)
    • baseline - the vertical alignment of the text with respect to its insertion point (values as canvas textBaseline)
    • continued - whether the text segment will be followed immediately by another segment. Useful for changing styling in the middle of a paragraph.
    • features - an array of OpenType feature tags to apply. If not provided, a set of defaults is used.
    +
    • lineBreak - set to false to disable line wrapping all together
    • width - the width that text should be wrapped to (by default, the page width minus the left and right margin)
    • height - the maximum height that text should be clipped to
    • rotation - the rotation of the text in degrees (by default 0)
    • ellipsis - the character to display at the end of the text when it is too long. Set to true to use the default character.
    • columns - the number of columns to flow the text into
    • columnGap - the amount of space between each column (1/4 inch by default)
    • indent - the amount in PDF points (72 per inch) to indent each paragraph of text
    • indentAllLines - wheter to indent all lines of a paragraph (false by default - indents only the first line)
    • paragraphGap - the amount of space between each paragraph of text
    • lineGap - the amount of space between each line of text
    • wordSpacing - the amount of space between each word in the text
    • characterSpacing - the amount of space between each character in the text
    • horizontalScaling - ability to scale text horizontally (100 percent by default)
    • fill - whether to fill the text (true by default)
    • stroke - whether to stroke the text
    • link - a URL to link this text to (shortcut to create an annotation)
    • goTo - go to anchor (shortcut to create an annotation)
    • destination - create anchor to this text
    • underline - whether to underline the text
    • strike - whether to strike out the text
    • oblique - whether to slant the text (angle in degrees or true)
    • baseline - the vertical alignment of the text with respect to its insertion point (values as canvas textBaseline)
    • continued - whether the text segment will be followed immediately by another segment. Useful for changing styling in the middle of a paragraph.
    • features - an array of OpenType feature tags to apply. Can also be provided as an object with features as keys and boolean values. If not provided, a set of defaults is used. To deactivate default font features, you have to explicitly set them to false ({ liga: false }). When providing an empty array the default font features will still be used.

    Additionally, the fill and stroke color and opacity methods described in the vector graphics section are applied to text content as well.

    @@ -108,10 +108,14 @@ doc.text(lorem, {

    Text measurements

    If you're working with documents that require precise layout, you may need to know the -size of a piece of text. PDFKit has two methods to achieve this: widthOfString(text, options) -and heightOfString(text, options). Both methods use the same options described in the +size of a piece of text. PDFKit has three methods to achieve this: widthOfString(text, options) +, heightOfString(text, options) and boundsOfString(text, options)/boundsOfString(text, x, y, options). All methods use the same options described in the Text styling section, and take into account the eventual line wrapping.

    +

    However boundsOfString factors in text rotations and multi-line wrapped text, +effectively producing the bounding box of the text, {x: number, y: number, width: number, height: number}. +If x and y are not defined they will default to use this.x and this.y.

    +

    Lists

    The list method creates a bulleted list. It accepts as arguments an array of strings, diff --git a/docs/vector.html b/docs/vector.html index 62d0475..0736263 100644 --- a/docs/vector.html +++ b/docs/vector.html @@ -1,4 +1,4 @@ -Vector Graphics in PDFKit

    Vector Graphics in PDFKit

    +Vector Graphics in PDFKit

    Vector Graphics in PDFKit

    An introduction to vector graphics

    diff --git a/docs/you_made_it.html b/docs/you_made_it.html index 96a8114..3b677e1 100644 --- a/docs/you_made_it.html +++ b/docs/you_made_it.html @@ -1,4 +1,4 @@ -You made it!

    You made it!

    +You made it!

    You made it!

    That's all there is to creating PDF documents in PDFKit. It's really quite simple to create beautiful multi-page printable documents using Node.js!

    @@ -12,7 +12,7 @@ a parser for Markdown and a syntax highlighter.

    If you have any questions about what you've learned in this guide, please don't hesitate to ask the author or post an issue -on Github. Enjoy!