Problem/Motivation

Creating this issue to make this module Drupal 10 compatible.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

AbhinavK created an issue. See original summary.

abhinavk’s picture

Status: Active » Needs review
StatusFileSize
new9.84 KB

I have created this patch to make this module Drupal 10 compatible.
Please review this patch.

rahul17’s picture

Status: Needs review » Reviewed & tested by the community

Applied and tested patch #2 in Drupal 9.5.7 and 10.0.8. Patch applied cleanly and makes this module D10 compatible. Functionality is working fine.

Moving this to RTBC.

bakulahluwalia made their first commit to this issue’s fork.

viniciusosouza’s picture

In order this patch works we have to update the mpdf/mpdf library to ^8.0.0 to work with php ^8.0.
When we try to run composer require it breaks because the library is set to ^7.0.0 that requires php ^7.0.0.

b_sharpe’s picture

StatusFileSize
new9.84 KB

Patch for 2.x-dev which allows ^8.0.4

b_sharpe’s picture

Status: Reviewed & tested by the community » Needs work

See note in #3331918: PDF using mPDF D10 compatibility? about how to make D10 compatible along with mpdf dependency

pameeela made their first commit to this issue’s fork.

Kuriakose Kurian’s picture

StatusFileSize
new156.38 KB
new8.98 KB

I encountered issues with Drupal Version 9.5.11. The module version that I was able to patch is as follows:

name: PDF using mPDF
type: module
description: 'HTML to PDF conversion using mPDF Library'
core: 8.x 
core_version_requirement: ^8 || ^9
package: 'PDF Conversion'
configure: pdf_using_mpdf.admin_form

Details on the errors I had to address, please refer to this screenshot: Link to Screenshot

I successfully resolved the issues with the following patch: Patch Link.

keshavv’s picture

Status: Needs work » Reviewed & tested by the community
proweb.ua’s picture

Call to deprecated function render(): in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Render\RendererInterface::render() instead.

/src/Controller/GeneratePdf.php

- $renderedNode = render($view)->__toString();
+ $renderedNode = \Drupal::service('renderer')->render($view)->__toString();

jan kellermann made their first commit to this issue’s fork.

jan kellermann’s picture

Version: 8.x-2.2 » 3.x-dev
Assigned: Unassigned » jan kellermann
Status: Reviewed & tested by the community » Needs work

I just opened a branch from 3.x and a MR and used the patch from this issue. There are some more problems to solve, so I change the state to work and assign to me.

I will add compatibility to 11.x also.

For existing system the patch is fine, but we will release to 3.x fpr D10/D11.

jan kellermann’s picture

Priority: Normal » Major
jan kellermann’s picture

Status: Needs work » Needs review

The MR passed the pipeline.

The MR delivers compatibility with D10 and D11.

I rewrote the part of delivering the PDF and am using Drupal's Response objects now. How about the caching?

Please have a quick review of eveything fits for your needs.

In the next step we will release a RC so that testing becomes easier and more people can participate.

jan kellermann’s picture

Assigned: jan kellermann » Unassigned
jan kellermann’s picture

Title: Drupal 10 compatibility fixes » Drupal 10 /11 compatibility fixes

Added title for D11

eyedrops’s picture

Status: Needs review » Reviewed & tested by the community

looks good!

installed 3.x-D10 and it worked without problems. was able to generate pdf of the node as admin.

jan kellermann’s picture

Status: Reviewed & tested by the community » Fixed

Thank you all for reporting, contributing and testing!

I merged this code and the code from #3475769 and #3520301 in this merge.

Please use the new alpha version of 3.x branch and give feedback.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.