Skip to content

Creating Pages

gal kahana edited this page Jun 10, 2014 · 1 revision

The PDF Rendering Object defines pages by providing an array of them, like this:

    {
        "pages": [
            {
                "width": 595,
                "height": 842
            },
            {
                "width": 612,
                "height": 792
            }
        ]
    }

The object defines two pages. One has a size of an A4 - with 595X842 points. The second page is letter size with 612X792 points. Now would be a good point to note that all measures are defined in points, that is 1/72 of an inch.

(go ahead, open another tab or browser window and go to http://pdfrendering.herokuapp.com/. paste the code there in the text area and press create!).

You can create as many pages as you want. Their content is defined by an Array of boxes. To learn more about what you can put in boxes, go to:
Images
Text
Shapes
Boxes
Streams