# Elementname: `InsertPages`

## Description

Insert previously saved pages or reserve space for pages to be generted in the future.

There are two modes: the first mode is to first save some pages with SavePages and then insert the pages here. The second mode reserves some pages in the PDF (has to be known in advace) that are created in the future (“future mode”) with SavePages.

Allowed attributes: name, pages

Child elements: (none)

Parent elements: AtPageCreation, AtPageShipout, Case, Contents, ForAll, Loop, Otherwise, Record, SavePages, Until, While

### Attributes

name (text)

  The name of the saved pages.

pages (number, optional, since version 3.7.12)

  Number of pages to be inserted in “future mode”.

### Remarks

Useful if you require a certain amount of pages and you need to try out how many pages you get by typesetting onto virtual pages.

Also useful to create a table of contents after you have collected all the information and make it appear at the beginning of the document.

## Example

    <Record element="data">
      <SavePages name="foo">
        <Loop select="100">
          <PlaceObject>
            <Textblock>
              <Paragraph><Value>Hello world</Value></Paragraph>
            </Textblock>
          </PlaceObject>
        </Loop>
      </SavePages>
      <Message select="sd:count-saved-pages('foo')"></Message>
      <InsertPages name="foo"/>
    </Record>

## See also

SavePages

# Commands

- A
- Action
- AddSearchpath
- AtPageCreation
- AtPageShipout
- AttachFile
- Attribute
- B
- Barcode
- Bold
- BoldItalic
- Bookmark
- Box
- Br
- Case
- Circle
- Color
- Column
- Columns
- Compatibility
- Contents
- Copy-of
- DefineColor
- DefineColorprofile
- DefineFontalias
- DefineFontfamily
- DefineTextformat
- Element
- Fallback
- Fontface
- ForAll
- Frame
- Grid
- Group
- Groupcontents
- HSpace
- Hyphenation
- I
- Image
- Include
- Initial
- InsertPages
- Italic
- Layout
- Li
- LoadDataset
- LoadFontfile
- Loop
- Makeindex
- Margin
- Mark
- Message
- NewPage
- NextFrame
- NextRow
- NoBreak
- Ol
- Options
- Otherwise
- Output
- Overlay
- PDFOptions
- Pageformat
- Pagetype
- Paragraph
- PlaceObject
- Position
- PositioningArea
- PositioningFrame
- ProcessNode
- Record
- Regular
- Rule
- SaveDataset
- SavePages
- SetGrid
- SetVariable
- SortSequence
- Span
- Stylesheet
- Sub
- Sup
- Switch
- Table
- TableNewPage
- Tablefoot
- Tablehead
- Tablerule
- Td
- Text
- Textblock
- Tr
- Trace
- Transformation
- U
- URL
- Ul
- Until
- VSpace
- Value
- While

Version: 3.8.0 | Start page | Command reference | Other language: German