nucleos / NucleosDompdfBundle

📜 This bundle provides a wrapper for using dompdf inside symfony.
https://nucleos.rocks
MIT License
39 stars 12 forks source link

Landscape mode #542

Closed kl3sk closed 8 months ago

kl3sk commented 8 months ago

Is this a DomPDF bug of this plugin ? No land scape is possible.

Alternative question, is this bundle maintained ?

Thanks.

Environment

WSL

Packages

$ composer show --latest
azuyalabs/yasumi                    2.6.0              2.6.0              The easy PHP Library for calculating holidays.
beberlei/doctrineextensions         v1.3.0             v1.3.0             A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL, Oracle, PostgreSQL and SQLite.
codex-team/editor.js                dev-master 9446738 dev-master 9446738 PHP backend implementation for the Editor.js
deployer/deployer                   v7.3.3             v7.3.3             Deployment Tool
doctrine/annotations                2.0.1              2.0.1              Docblock Annotations Parser
doctrine/doctrine-bundle            2.11.1             2.11.1             Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle   3.5.1              3.5.1              Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle 3.3.0              3.3.0              Symfony DoctrineMigrationsBundle
doctrine/orm                        2.17.1             2.17.1             Object-Relational-Mapper for PHP
dukecity/command-scheduler-bundle   v5.0.7             v5.0.7             This Symfony bundle will allow you to schedule all your commands just like UNIX crontab
fresh/doctrine-enum-bundle          v9.2.0             v10.0.0            Provides support of ENUM type for Doctrine2 in Symfony applications.
friendsofsymfony/jsrouting-bundle   3.4.0              3.4.1              A pretty nice way to expose your Symfony routing to client applications.
hidehalo/nanoid-php                 1.1.13             1.1.13             A copy of nanoid in PHP
knplabs/knp-menu-bundle             v3.3.0             v3.3.0             This bundle provides an integration of the KnpMenu library
knplabs/knp-paginator-bundle        v6.3.0             v6.3.0             Paginator bundle for Symfony to automate pagination and simplify sorting and other features
knplabs/knp-time-bundle             v2.2.0             v2.2.0             Making your dates and durations look sensible and descriptive
lcobucci/jwt                        5.2.0              5.2.0              A simple library to work with JSON Web Token and JSON Web Signature
league/commonmark                   2.4.1              0.5.1              Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)
liip/functional-test-bundle         4.10.0             4.10.0             This bundles provides additional functional test-cases for Symfony applications
liip/imagine-bundle                 2.12.1             2.6.1              This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.
liip/test-fixtures-bundle           2.7.0              2.7.0              This bundles enables efficient loading of Doctrine fixtures in functional test-cases for Symfony applications
mossadal/math-parser                v1.3.16            v1.3.16            PHP parser for mathematical expressions, including elementary functions, variables and implicit multiplication. Also supports symbo...
nucleos/dompdf-bundle               4.0.0              4.0.0              This bundle provides a wrapper for using dompdf inside symfony.
phpoffice/phpspreadsheet            1.29.0             [none matched]     PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
phpunit/phpunit                     9.6.15             5.2.7              The PHP Unit Testing framework.
stof/doctrine-extensions-bundle     v1.10.1            v1.10.1            Integration of the gedmo/doctrine-extensions with Symfony
symfony/asset                       v6.4.0             v7.0.0             Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files
symfony/browser-kit                 v6.4.0             v7.0.0             Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically
symfony/console                     v6.4.1             v7.0.1             Eases the creation of beautiful and testable command line interfaces
symfony/css-selector                v6.4.0             v7.0.0             Converts CSS selectors to XPath expressions
symfony/debug-bundle                v6.4.0             v7.0.0             Provides a tight integration of the Symfony VarDumper component and the ServerLogCommand from MonologBridge into the Symfony full-s...
symfony/doctrine-messenger          v6.4.1             v7.0.1             Symfony Doctrine Messenger Bridge
symfony/dotenv                      v6.4.0             v7.0.0             Registers environment variables from a .env file
symfony/flex                        v2.4.2             v2.4.2             Composer plugin for Symfony
symfony/form                        v6.4.1             v7.0.1             Allows to easily create, process and reuse HTML forms
symfony/framework-bundle            v6.4.1             v7.0.1             Provides a tight integration between Symfony components and the Symfony full-stack framework
symfony/html-sanitizer              v6.4.0             v7.0.0             Provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a document's DOM.
symfony/http-client                 v6.4.0             v7.0.0             Provides powerful methods to fetch HTTP resources synchronously or asynchronously
symfony/intl                        v6.4.0             v7.0.0             Provides access to the localization data of the ICU library
symfony/mailer                      v6.4.0             v7.0.0             Helps sending emails
symfony/maker-bundle                v1.52.0            v1.52.0            Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplat...
symfony/mercure-bundle              v0.3.8             v0.3.8             Symfony MercureBundle
symfony/messenger                   v6.4.0             v7.0.1             Helps applications send and receive messages to/from other applications or via message queues
symfony/monolog-bundle              v3.10.0            v3.10.0            Symfony MonologBundle
symfony/notifier                    v6.4.0             v7.0.0             Sends notifications via one or more channels (email, SMS, ...)
symfony/password-hasher             v6.2.0             v7.0.0             Provides password hashing utilities
symfony/phpunit-bridge              v6.4.1             v7.0.1             Provides utilities for PHPUnit, especially user deprecation notices management
symfony/proxy-manager-bridge        v6.4.0             v6.4.0             Provides integration for ProxyManager with various Symfony components
symfony/requirements-checker        v2.0.1             v2.0.1             Check Symfony requirements and give recommendations
symfony/runtime                     v6.4.0             v7.0.0             Enables decoupling PHP applications from global state
symfony/security-bundle             v6.4.0             v7.0.0             Provides a tight integration of the Security component into the Symfony full-stack framework
symfony/sendinblue-mailer           v6.4.0             v6.4.0             Symfony Sendinblue Mailer Bridge
symfony/stopwatch                   v6.4.0             v7.0.0             Provides a way to profile code
symfony/templating                  v6.4.0             v6.4.0             Provides all the tools needed to build any kind of template system
symfony/translation                 v6.4.0             v7.0.0             Provides tools to internationalize your application
symfony/twig-bundle                 v6.4.0             v7.0.0             Provides a tight integration of Twig into the Symfony full-stack framework
symfony/uid                         v6.4.0             v7.0.0             Provides an object-oriented API to generate and represent UIDs
symfony/ux-autocomplete             v2.13.3            v2.13.3            JavaScript Autocomplete functionality for Symfony
symfony/ux-chartjs                  v2.13.2            v2.13.2            Chart.js integration for Symfony
symfony/ux-live-component           v2.13.3            v2.13.3            Live components for Symfony
symfony/ux-svelte                   v2.13.2            v2.13.2            Integration of Svelte in Symfony
symfony/ux-toggle-password          v2.13.2            v2.13.2            Toggle visibility of password inputs for Symfony Forms
symfony/ux-twig-component           v2.13.3            v2.13.3            Twig components for Symfony
symfony/ux-typed                    v2.13.2            v2.13.2            Typed integration for Symfony
symfony/validator                   v6.4.0             v7.0.0             Provides tools to validate values
symfony/var-dumper                  v6.4.0             v7.0.0             Provides mechanisms for walking through any arbitrary PHP variable
symfony/web-link                    v6.4.0             v7.0.0             Manages links between resources
symfony/web-profiler-bundle         v6.4.0             v7.0.0             Provides a development tool that gives detailed information about the execution of any request
symfony/webpack-encore-bundle       v2.1.1             v2.1.1             Integration with your Symfony app & Webpack Encore!
symfony/workflow                    v6.4.1             v7.0.1             Provides tools for managing a workflow or finite state machine
symfony/yaml                        v6.4.0             v7.0.0             Loads and dumps YAML files
symfonycasts/dynamic-forms          v0.1.1             v0.1.1             Add dynamic/dependent fields to Symfony forms
symfonycasts/reset-password-bundle  v1.19.0            v1.20.0            Symfony bundle that adds password reset functionality.
symfonycasts/verify-email-bundle    v1.15.0            v1.16.0            Simple, stylish Email Verification for Symfony
tattali/mobile-detect-bundle        v2.2.7             v2.2.7             Symfony 3.4-6.x bundle to detect mobile devices, manage mobile view and redirect to the mobile and tablet version.
twig/cssinliner-extra               v3.8.0             v3.8.0             A Twig extension to allow inlining CSS
twig/extra-bundle                   v3.8.0             v3.8.0             A Symfony bundle for extra Twig extensions
twig/inky-extra                     v3.8.0             v3.8.0             A Twig extension for the inky email templating engine
twig/intl-extra                     v3.8.0             v3.8.0             A Twig extension for Intl
twig/markdown-extra                 v3.8.0             v3.8.0             A Twig extension for Markdown
twig/twig                           v3.8.0             v3.8.0             Twig, the flexible, fast, and secure template language for PHP
vich/uploader-bundle                2.2.0              2.3.0              Ease file uploads attached to entities

Transitive dependencies not required in composer.json:
behat/transliterator                v1.5.0             v1.5.0             String transliterator
carbonphp/carbon-doctrine-types     2.1.0              3.1.0              Types to use Carbon in Doctrine
dflydev/dot-access-data             v3.0.2             v3.0.2             Given a deep data structure, access data by dot notation.
doctrine/cache                      2.2.0              2.2.0              PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mon...
doctrine/collections                2.1.4              2.1.4              PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.
doctrine/common                     3.4.3              3.4.3              PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as bett...
doctrine/data-fixtures              1.7.0              1.7.0              Data Fixtures for all Doctrine Object Managers
doctrine/dbal                       3.7.2              3.7.2              Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
doctrine/deprecations               1.1.2              1.1.2              A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively f...
doctrine/event-manager              2.0.0              2.0.0              The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.
doctrine/inflector                  2.0.8              2.0.8              PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural ...
doctrine/instantiator               2.0.0              2.0.0              A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                      2.1.0              3.0.0              PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
doctrine/migrations                 3.7.2              3.7.2              PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your ...
doctrine/persistence                3.2.0              3.2.0              The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.
doctrine/sql-formatter              1.1.3              1.1.3              a PHP SQL highlighting library
dompdf/dompdf                       v2.0.3             v0.6.2             DOMPDF is a CSS 2.1 compliant HTML to PDF converter
dragonmantank/cron-expression       v3.3.3             v3.3.3             CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due
egulias/email-validator             4.0.2              4.0.2              A library for validating emails against several RFCs
ezyang/htmlpurifier                 v4.17.0            v4.17.0            Standards compliant HTML filter written in PHP
friendsofphp/proxy-manager-lts      v1.0.16            v1.0.16            Adding support for a wider range of PHP versions to ocramius/proxy-manager
gedmo/doctrine-extensions           v3.14.0            v3.14.0            Doctrine behavioral extensions
imagine/imagine                     1.3.5              1.3.5              Image processing for PHP 5.3
jms/metadata                        2.8.0              2.8.0              Class/method/property metadata management in PHP
knplabs/knp-components              v4.3.0             v4.3.0             Knplabs component library
knplabs/knp-menu                    v3.4.0             v3.4.0             An object oriented menu library
laminas/laminas-code                4.13.0             4.13.0             Extensions to the PHP Reflection API, static code scanning, and code generation
league/config                       v1.2.0             v1.2.0             Define configuration arrays with strict schemas and access values with dot notation
league/uri                          7.4.0              7.4.0              URI manipulation library
league/uri-interfaces               7.4.0              7.4.0              Common interfaces and classes for URI representation and interaction
lorenzo/pinky                       1.1.0              1.1.0              A Foundation for Emails (Inky) template transpiler
lorisleiva/cron-translator          v0.4.4             v0.4.4             Makes CRON expressions human-readable
maennchen/zipstream-php             3.1.0              2.3.0              ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.
markbaker/complex                   3.0.2              3.0.2              PHP Class for working with complex numbers
markbaker/matrix                    3.0.1              3.0.1              PHP Class for working with matrices
masterminds/html5                   2.8.1              2.8.1              An HTML5 parser and serializer.
mobiledetect/mobiledetectlib        2.8.45             4.8.04             Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP he...
monolog/monolog                     3.5.0              3.5.0              Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy                   1.11.1             1.11.1             Create deep copies (clones) of your objects
nesbot/carbon                       2.72.1             2.72.1             An API extension for DateTime that supports 281 different languages.
nette/schema                        v1.2.5             v1.2.5             📐 Nette Schema: validating data structures against a given Schema.
nette/utils                         v4.0.3             v4.0.3             🛠  Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, ...
nikic/php-parser                    v4.18.0            v4.18.0            A PHP parser written in PHP
paragonie/random_compat             v9.99.100          v9.99.100          PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phar-io/manifest                    2.0.3              2.0.3              Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version                     3.2.1              3.2.1              Library for handling version information and constraints
phenx/php-font-lib                  0.5.4              0.5.2              A library to read, parse, export and make subsets of different types of font files.
phenx/php-svg-lib                   0.5.1              0.3.4              A library to read, parse and export to PDF SVG files.
phpunit/php-code-coverage           9.2.29             10.1.10            Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator           3.0.6              4.1.0              FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker                 3.1.1              4.0.0              Invoke callables with a timeout
phpunit/php-text-template           2.0.4              3.0.1              Simple template engine.
phpunit/php-timer                   5.0.3              6.0.0              Utility class for timing
psr/cache                           3.0.0              3.0.0              Common interface for caching libraries
psr/clock                           1.0.0              1.0.0              Common interface for reading the clock.
psr/container                       2.0.2              2.0.2              Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher                1.0.0              1.0.0              Standard interfaces for event handling.
psr/http-client                     1.0.3              1.0.3              Common interface for HTTP clients
psr/http-factory                    1.0.2              1.0.2              Common interfaces for PSR-7 HTTP message factories
psr/http-message                    2.0                2.0                Common interface for HTTP messages
psr/link                            2.0.1              2.0.1              Common interfaces for HTTP links
psr/log                             3.0.0              3.0.0              Common interface for logging libraries
psr/simple-cache                    3.0.0              3.0.0              Common interfaces for simple caching
sabberworm/php-css-parser           8.4.0              8.4.0              Parser for CSS Files written in PHP
sebastian/cli-parser                1.0.1              2.0.0              Library for parsing CLI options
sebastian/code-unit                 1.0.8              2.0.0              Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup  2.0.3              3.0.0              Looks up which function or method a line of code belongs to
sebastian/comparator                4.0.8              4.0.8              Provides the functionality to compare PHP values for equality
sebastian/complexity                2.0.2              3.1.0              Library for calculating the complexity of PHP code units
sebastian/diff                      4.0.5              5.0.3              Diff implementation
sebastian/environment               5.1.5              6.0.1              Provides functionality to handle HHVM/PHP environments
sebastian/exporter                  4.0.5              4.0.5              Provides the functionality to export PHP variables for visualization
sebastian/global-state              5.0.6              6.0.1              Snapshotting of global state
sebastian/lines-of-code             1.0.3              2.0.1              Library for counting the lines of code in PHP source code
sebastian/object-enumerator         4.0.4              5.0.0              Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector          2.0.4              3.0.0              Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context         4.0.5              5.0.0              Provides functionality to recursively process PHP variables
sebastian/resource-operations       3.0.3              3.0.3              Provides a list of PHP built-in functions that operate on resources
sebastian/type                      3.2.1              4.0.0              Collection of value objects that represent the types of the PHP type system
sebastian/version                   3.0.2              4.0.1              Library that helps with managing the version number of Git-hosted PHP projects
symfony/cache                       v6.4.0             v7.0.0             Provides extended PSR-6, PSR-16 (and tags) implementations
symfony/cache-contracts             v3.4.0             v3.4.0             Generic abstractions related to caching
symfony/clock                       v6.4.0             v7.0.0             Decouples applications from the system clock
symfony/config                      v6.4.0             v7.0.0             Helps you find, load, combine, autofill and validate configuration values of any kind
symfony/dependency-injection        v6.4.1             v7.0.1             Allows you to standardize and centralize the way objects are constructed in your application
symfony/deprecation-contracts       v3.4.0             v3.4.0             A generic function and convention to trigger deprecation notices
symfony/doctrine-bridge             v6.4.0             v7.0.0             Provides integration for Doctrine with various Symfony components
symfony/dom-crawler                 v6.4.0             v7.0.0             Eases DOM navigation for HTML and XML documents
symfony/error-handler               v6.4.0             v7.0.0             Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher            v6.4.0             v7.0.0             Provides tools that allow your application components to communicate with each other by dispatching events and listening to them
symfony/event-dispatcher-contracts  v3.4.0             v3.4.0             Generic abstractions related to dispatching event
symfony/expression-language         v6.4.0             v7.0.0             Provides an engine that can compile and evaluate expressions
symfony/filesystem                  v6.4.0             v7.0.0             Provides basic utilities for the filesystem
symfony/finder                      v6.4.0             v7.0.0             Finds files and directories via an intuitive fluent interface
symfony/http-client-contracts       v3.4.0             v3.4.0             Generic abstractions related to HTTP clients
symfony/http-foundation             v6.4.0             v7.0.0             Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                 v6.4.1             v7.0.1             Provides a structured process for converting a Request into a Response
symfony/lock                        v6.4.0             v7.0.0             Creates and manages locks, a mechanism to provide exclusive access to a shared resource
symfony/mercure                     v0.6.4             v0.6.4             Symfony Mercure Component
symfony/mime                        v6.4.0             v7.0.0             Allows manipulating MIME messages
symfony/monolog-bridge              v6.4.0             v7.0.0             Provides integration for Monolog with various Symfony components
symfony/options-resolver            v6.4.0             v7.0.0             Provides an improved replacement for the array_replace PHP function
symfony/polyfill-intl-grapheme      v1.28.0            v1.28.0            Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-icu           v1.28.0            v1.28.0            Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn           v1.28.0            v1.28.0            Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer    v1.28.0            v1.28.0            Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring           v1.28.0            v1.28.0            Symfony polyfill for the Mbstring extension
symfony/polyfill-php83              v1.28.0            v1.28.0            Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions
symfony/polyfill-uuid               v1.28.0            v1.28.0            Symfony polyfill for uuid functions
symfony/process                     v6.4.0             v7.0.0             Executes commands in sub-processes
symfony/property-access             v6.4.0             v7.0.0             Provides functions to read and write from/to an object or array using a simple string notation
symfony/property-info               v6.4.0             v7.0.0             Extracts information about PHP class' properties using metadata of popular sources
symfony/routing                     v6.4.1             v7.0.1             Maps an HTTP request to a set of configuration variables
symfony/security-core               v6.4.0             v7.0.1             Symfony Security Component - Core Library
symfony/security-csrf               v6.4.0             v7.0.1             Symfony Security Component - CSRF Library
symfony/security-http               v6.4.0             v7.0.1             Symfony Security Component - HTTP Integration
symfony/serializer                  v6.4.1             v7.0.1             Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and...
symfony/service-contracts           v3.4.0             v3.4.0             Generic abstractions related to writing services
symfony/stimulus-bundle             v2.13.3            v2.13.3            Integration with your Symfony app & Stimulus!
symfony/string                      v6.4.0             v7.0.0             Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way
symfony/translation-contracts       v3.4.0             v3.4.0             Generic abstractions related to translation
symfony/twig-bridge                 v6.4.0             v7.0.0             Provides integration for Twig with various Symfony components
symfony/var-exporter                v6.4.1             v7.0.1             Allows exporting any serializable PHP data structure to plain PHP code
theseer/tokenizer                   1.2.2              1.2.2              A small library for converting tokenized PHP source code into XML and potentially other formats
tijsverkoyen/css-to-inline-styles   v2.2.7             v2.2.7             CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very us...
webmozart/assert                    1.11.0             1.11.0             Assertions to validate method input/output with nice error messages.
willdurand/jsonp-callback-validator v2.0.0             v2.0.0             JSONP callback validator.

PHP version

$ php -v
PHP 8.2.12 (cli) (built: Oct 27 2023 13:00:10) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.12, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.12, Copyright (c), by Zend Technologies
    with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans

Subject

Steps to reproduce

$response = $this->wrapper->getStreamResponse($html, 'note de frais.pdf', [
    'setPaper'   => ['A4', 'landscape'],
    'compress'   => 1,
    'Attachment' => 0,
]);

Expected results

PDF in landscape

Actual results

No landscape

kl3sk commented 8 months ago

After some digging it look like this configuration works:

$response = $this->wrapper->getStreamResponse($html, 'note de frais.pdf', [
    'defaultPaperSize'        => 'A4',
    'defaultPaperOrientation' => 'landscape',
]);