Akeneo Product PDF Generator: This module allows the store owner to generate PDF for any product and product model by using the custom PDF template.
The admin can create multiple custom pdf templates and can select any template as per the requirement for the PDF.
PDF can also be generated in bulk by using the Product PDF Export Job and Quick Export method. The admin can even download the pdf from the product page directly.
Basic Requirement
- This module works with Akeneo 3.0.x, 3.1.x,4.0.x,5.0.x,6.0.x and 7.0.x. Download Akeneo from here
- This module is compatible with the Akeneo community and Enterprise(Flexibility) edition.
- If you want to use this extension on Akeneo EE Serenity mode, please contact us.
- For the Akeneo installation, your Akeneo server should meet these system requirements.
Features
- Export product pdf using simple export job
- The admin has the advantage to create multiple templates as needed.
- Also, the admin can select from the given list of orientations, i.e. Portrait or Landscape.
- This module allows the admin to choose the pdf type for each product per pdf or product in a single pdf
- Export product pdf using quick export
- Download the product pdf from the product page
- This module is now compatible with Akenoe latest version 7.0.x
Installation
Two different types of module installation processes are available for the module.
- Composer Installation
- Manual Installation
Installation using Composer Installation
Before beginning the composer installation
1: Get the ACCESS KEYS [Create a support ticket]
2: In Akeneo composer.json, add our repository as well as the installation script.
For Akeneo 6 and 7
{ "scripts": { "post-update-cmd": [ "vendor/webkul/productpdfgeneratorbundle/src/Webkul/ProductPDFGeneratorBundle/install/config.sh COMPOSER=true NO_DOCKER=true" ], "post-install-cmd": [ "vendor/webkul/productpdfgeneratorbundle/src/Webkul/ProductPDFGeneratorBundle/install/config.sh COMPOSER=true NO_DOCKER=true" ], "post-create-project-cmd": [ "vendor/webkul/productpdfgeneratorbundle/src/Webkul/ProductPDFGeneratorBundle/install/config.sh COMPOSER=true NO_DOCKER=true" ] }, "repositories": [{ "type": "composer", "url": "https://akeneorepo.webkul.com/" }] }
For Akeneo <=5.x
{ "scripts": { "post-update-cmd": [ "vendor/webkul/productpdfgeneratorbundle/composer_install.sh" ], "post-install-cmd": [ "vendor/webkul/productpdfgeneratorbundle/composer_install.sh" ], "post-create-project-cmd": [ "vendor/webkul/productpdfgeneratorbundle/composer_install.sh" ] }, "repositories": [{ "type": "composer", "url": "https://akeneorepo.webkul.com/" }] }
3: Use composer to install the extension.
composer require webkul/productpdfgeneratorbundle
4: Complete the authentication form.
5: Send a Message of Success
6: Delete your browser’s cache.
Manual Installation For Akeneo 6 and 7
Note:
CLI User must be the same as the FPM user, a good practice is to use the FPM user for installation. Also, ownership/permissions for the Akeneo directory must be assigned to the FPM user. otherwise, you will face permission issues during installation.
- Unzip the respective extension zip and then merge “src” folder into the akeneo project
Update dompdf/dompdf Version Only For Akeneo 6
Before installing the connector, update the version of dompdf/dompdf at two places in the composer.lock file
Step-1: Go to the composer.lock file.
Step-2: Search "dompdf/dompdf"
and update it with "dompdf/dompdf": "2.0.0",
Step-3: Also, Search "name": "dompdf/dompdf"
and update its version to "version": "v2.0.0",
Step-4: Run the below command over the NO-DOCKER Instance from the PIM directory
./src/Webkul/ProductPDFGeneratorBundle/install/config.sh COMPOSER=false NO_DOCKER=true
Step-5: Run the below command over the docker Instance from the PIM directory
./src/Webkul/ProductPDFGeneratorBundle/install/config.sh COMPOSER=false NO_DOCKER=false
Manual Installation For Version 4.0.x to 5.0.x
Please follow these steps for installing Akeneo Product PDF Generator module in your Akeneo PIM platform.
1 – Unzip the respective extension zip then merge the “src” folder into the akeneo project root directory.
2 – Goto config/Bundles.php then add line:
Webkul\ProductPDFGeneratorBundle\ProductPDFGeneratorBundle::class => ['all' => true],
in return array.
3 – Copy the “config” folder into akeneo project root directory for routing.
To run the Quick export in Akeneo 5.0.x, you need to run the below command.
Install composer dependency
php -d memory_limit=4G /usr/local/bin/composer --prefer-dist --no-scripts require navneetbhardwaj/akeneo-quickexport-configurator;
After that, register bundle in config/bundles.php
Webkul\QuickExportConfiguratorBundle\QuickExportConfiguratorBundle::class => ['all' => true],
Define routing to create a file in the config/routes/wk_quick_export.yml
wk_quick_expoort: resource: "@QuickExportConfiguratorBundle/Resources/config/routing.yml" prefix: /
4 – Run this command after ssh to your akeneo server by the terminal
php bin/console ca:cl --env=prod && php bin/console pdfgenerator:setup:install
5. If you are using php-fpm. Then you need to restart the php-fpm services and apache web server.
For Akeneo 5
sudo service php-fpm7.4 restart
For Akeneo 4
sudo service php-fpm7.3 restart
Docker Installation Command :
For Akeneo 5
alias docker_php='docker-compose run -u www-data --rm php php'; alias docker_yarn='docker-compose run -u node --rm node yarn'; docker_php bin/console cache:clear --env=prod; docker_php bin/console pim:installer:assets --symlink --clean --env=prod; docker_php bin/console d:s:u --force; docker_yarn run webpack; docker_yarn run update-extensions; docker_yarn run less;
For Akeneo 4
alias docker_php='docker-compose run -u www-data --rm php php'; alias docker_yarn='docker-compose run -u node --rm node yarn'; docker_php bin/console cache:clear --env=prod; docker_php bin/console pim:installer:assets --symlink --clean --env=prod; docker_php bin/console d:s:u --force; docker_yarn run webpack; docker_yarn run less;
Manual Installation For Version 3. x
Please follow these steps for installing the Akeneo Product PDF Generator module in your Akeneo PIM platform.
1 – Unzip the respective extension zip then merge the “src” folder into akeneo project root directory.
2 – Goto app/AppKernel.php then add line
new Webkul\ProductPDFGeneratorBundle\ProductPDFGeneratorBundle(),
3 – Goto app/config/routing.yml then add these lines at top of file.
wk_pdf_generator: resource: "@ProductPDFGeneratorBundle/Resources/config/routing.yml" prefix: /
4 – Run this command after ssh to your akeneo server by the terminal
php bin/console ca:cl --env=prod && php bin/console pdfgenerator:setup:install
5. If you are using php-fpm. Then you need to restart the php-fpm services and apache web server.
sudo service php-fpm7.2 restart
Common Issues After Installation
It might happen that even after proper installation, upon opening your Akeneo admin dashboard, you see a loading screen. In that case, do check for the following solution:
- Webpack Installation: If you get the below error
It means that web pack is not installed in your system. Run the following command.
npm install --save-prod webpack npm install
- Module routing.yml is not configured properly. Re-check the routing.yml file as mentioned in the 3rd step of Module Installation
- Clear your browser cache.
Uninstall Module: For Akeneo 6 and 7
- From the PIM directory, run the command below over the NO-DOCKER Instance.
./src/Webkul/ProductPDFGeneratorBundle/uninstall/uninstall.sh COMPOSER=false NO_DOCKER=true
- Then run the command below over the PIM directory’s DOCKER instance.
./src/Webkul/ProductPDFGeneratorBundle/uninstall/uninstall.sh COMPOSER=false NO_DOCKER=false
The workflow of PDF Generator
After successful installation of the module, you will see the Product PDF Generator icon on the left side of the dashboard as shown below:
Tapping on the Product PDF Generator tab will show two settings:
- Custom Pdf Template
- Default Setting
Custom PDF Template
By clicking on Custom PDF Template you can create multiple PDF templates. To create new pdf templates click on Create Template.
After that, a new page will open in which you need to add the Template Name and Pdf Logo.
After that click on to Save button. Then add details in the pdf layout.
- Grid System – In this, you can select the grid in a pdf container.
Drag the grid in the container to add the grid in the container according to your need. Then you can remove the grid if that grid is not required.
- Elements – In this you can add the elements in the grid-like name, description, etc. Drag the elements in the grid.
After that, the pdf layout will be seen as shown below image.
Then click on to Save button.
Default Setting
Goto default setting tab, in that, fill the details of Default attribute mapping name and description of the pdf.
After that fill the details of quick export default setting.
- Default Pdf Template – In this you can select the default pdf template in which you want the pdf.
- Default Pdf Orientation– You need to select the layout like landscape mode, portrait mode, etc.
- Header Text – Add a description for the pdf header.
- Footer Text – Add a description for the pdf footer.
Note: Character limits are only up to 200 in header and footer fields.
Export PDF
After that to export the pdf, first of all, you need to create the Export Profile. Therefore, navigate to Exports -> Create Export Profile as per the below image.
This will redirect you to the Export Profile page. Therefore, you will enter a unique code, and label, then select a job profile.
After that click to Save button.
Global Settings
To export pdf you need to add details in export profile.
- ZIP name format – In this you need to write where the zip file will be generated in the system,
- Pdf file name format – In this, you need to write the format of the pdf file name
- Template Layout – Select the layout in which you want to generate your pdf file.
- Page Orientation – There are two orientation landscape and portrait mode select the orientation required in your pdf.
- Pdf Type – Select the pdf type for each product per pdf (if you want each product in individual pdf) or product in single pdf (if you want all product in single pdf).
- Header Text – Add the header name
- Footer Text – Add the footer name
Note: Character limits are only up to 200 in header and footer fields.
After that go to the Content section and select Locale and Attribute for the exported products.
Filter Products to Export
You can decide which products you want to export and filter them using various options. To export a specific product you can enter its SKU in Identifier.
Then click on to Save button.
Export Now
After creating the export profile, click on the Export button as per the below image.
After running the job you can check the execution detail and download generated files.
Generated PDF will look as shown in the below image.
Simple product:
Product Model:
Quick Export Job
Akeneo Product PDF Generator has an amazing feature, where you can quickly create or export product(s) without going through all the job creation process. The Quick Export feature allows you to quickly export a product pdf. To do that, go to the Products page then a select product from the list then click Quick Export.
To do quick export, simply select product(s), go to the Quick Export option, and choose PDF Quick Export (All Attributes) and other options.
You can check the progress of the job, by going to Activity>Process Tracker. Also, once the quick export job is complete, then you can see the notification message on top.
Support
Thank you for reading this documentation. So, that was much about the User Guide of Akeneo Product PDF Generator for any queries or doubts reach out to us at [email protected]. You can also raise a ticket at our HelpDesk System.
Please explore our Akeneo Development Services and Quality Akeneo Extensions.
Current Product Version - Akeneo 3 to 5 || 2.0.0, Akeneo 6 || 3.0.1 and Akeneo 7 || 4.0.0
Supported Framework Version - 3.x.x, 4.x.x, 5.x.x. 6.x.x & 7.x.x
Be the first to comment.