The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
617 Ready
473 Need Help
🏆 Leaderboard
Stale v1.1.4

REST PDF Invoice for Magento 2

ytec/rest-pdf-invoice

Adds REST API endpoints to retrieve order and invoice PDFs, including GET /rest/V1/orders/:id/pdf-invoice and PDF rendering of the invoice endpoint when requested with an Accept: application/pdf header.

1,435
Downloads
Below average
1
GitHub Stars
Below average
1y ago
Last Release
0
Open Issues
Build Issues
2/3 checks passed

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
10 warnings
L1 PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.1.4 on Magento 2.4.9
Jun 1, 2026

Looking for Contributors

Dependency injection compilation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

REST PDF Invoice for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

Ytec Rest Pdf Invoice for Magento 2

Introduction

Introducing Ytec Rest Pdf Invoice for Magento 2: a streamlined module that simplifies retrieving PDF invoices via REST API endpoints, doing exacly what it says. 😎

Features

  • GET /rest/V1/orders/:orderId/pdf-invoice Endpoint: Retrieve a PDF invoice for a specific order.
  • Modified GET /rest/V1/invoices/:invoiceId Endpoint: Now renders a PDF invoice when requested with an 'Accept: application/pdf' header.

Prerequisites

  • PHP 7.4 or higher
  • Magento 2.4.x

Installation

  1. Run composer require ytec/rest-pdf-invoice in your Magento root directory.
  2. Execute bin/magento setup:upgrade.
  3. Clear the cache by running bin/magento cache:clean and bin/magento cache:flush.

How to Use

Retrieving a PDF Invoice for an Order

Send a GET request to /rest/V1/orders/:orderId/pdf-invoice with appropriate authorization. Replace :orderId with the actual order ID (entity_id or increment_id are supported).

Retrieving a PDF Invoice for an Invoice

Send a GET request to /rest/V1/invoices/:invoiceId with the header Accept: application/pdf and appropriate authorization. Replace :invoiceId with the actual invoice ID.

Dependencies

This module depends on the following Magento 2 modules:

  • Magento_Sales
  • Magento_Framework

License

This module is open-source but all credits belong to Ytec, a company of Matheus da Costa Marqui. For the full license, please refer to the LICENSE.md file.

Support and Contribution

For bugs, issues or feature requests, please open an issue on the repository or send an email to matheus.701@live.com for more personalized assistance.


Copyright (c) 2023 Ytec, a company of Matheus da Costa Marqui (matheus.701@live.com)

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.