addKid($page); $catalog = new DocumentCatalog($pages); $information = new DocumentInformation(new Title(new TextString('Tracés, couleurs et transformations'))); $file = new FileStructure( new FileHeader('1.7'), new FileBody($catalog), new IndirectReference($catalog), new DictionaryType(new Entry(new NameType('Info'), new IndirectReference($information))), ); $path = $argv[1] ?? __DIR__ . '/graphics.pdf'; $file->writeTo($path); echo $path . PHP_EOL;