Coder Social home page Coder Social logo

TYPO3 9 support about pdfviewhelpers HOT 12 CLOSED

bithost-gmbh avatar bithost-gmbh commented on May 29, 2024
TYPO3 9 support

from pdfviewhelpers.

Comments (12)

luberti avatar luberti commented on May 29, 2024 1

Ok the first one that do the test will acknowledge the other.

Cheers

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

Hi @luberti

We will definitely add support for TYPO3 9. At the earliest some time in September and at the latest a few weeks after TYPO3 9 LTS has been released. If you feel like already testing pdfviewhelpers on TYPO3 9 and reporting issues or even contributing some code, that would be appreciated!

Kind regards
Markus

from pdfviewhelpers.

luberti avatar luberti commented on May 29, 2024

Thank you for your answer. If we shoudl find issues we will certanly report them and if we can fix them by ourselves we will submit a pull request.
Cheers

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

@luberti Perfect, thanks!

from pdfviewhelpers.

luberti avatar luberti commented on May 29, 2024

Hi, we discovered an issues in your ext with regard to TYPO3 9.
Since you are using TCPDF PHP library for rendering, which does not support namespaces, you are forced to use require_once to import it and you have placed it inside DocumentViewHelper.php.
Unfortunately it got called to late for the buildClassSchema method inside TYPO3 9 build in ReflectionService class. As a consequence buildClassSchema throws an exception complaining it cannot find TCPDF. We have worked around it putting the require_once at the beginning of the DocumentViewHelper class. Is this acceptable from your point of view, so that we can make a pull request you can accept? Or you can make this change directly.

BTW I guess you are aware there is a new project maintained by the same author of TCPDF but is declared as "not ready" yet. So we guess we have to stick with the current TCPDF even though it contains some code deprecated in PHP 7.2

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

@luberti Thank you very much for this analysis!

As we will drop support for TYPO3 6 I think it should be possible to add the autoload.classmap configuration to our composer.json file. The same configuration we already used for autoload-dev (which then could be removed):

"classmap": ["Resources/Private/PHP/tcpdf/", "Resources/Private/PHP/fpdi/"]

I think this should work for TYPO3 >= 7 LTS, even in non composer mode. If you feel like testing this and creating a pull request, that would be appreciated!
If this remains the only compatibility error, I think we could add support for TYPO3 9 very soon! =)

Yes, this project has been around since more than 2 years, but unfortunately there seems to be little progress..
I also think we should stick to the current TCPDF, but I hope that either the older version starts to get updates again or the newer version would become production ready.

from pdfviewhelpers.

luberti avatar luberti commented on May 29, 2024

I will tall with my colleagues and let you know: unfortunately I'm going on holiday for a couple of weeks so this thing could be put on hold for a while , I will let you know as soon as I'm back.

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

@luberti No worries, I think I will soon find the time to test this.

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

@luberti I tested adding the classmap configuration to composer.json, it seems to properly register the classes with the autoloader for TYPO3 >= 7 LTS. This also seems to fix all the compatibility problems with TYPO3 9! I think I will soon create a new release supporting TYPO3 9.
Thanks for your analysis on that issue!

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

@luberti I created a new release v1.6.0 supporting TYPO3 9, it will soon be available in TER. Thanks again for your help on that!

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

@luberti We are currently working on v2.0 of pdfviewhelpers, you might consider to already use the current code from the develop branch. It is pretty stable, there are only a few features missing at this point. It will probably be released in September. The new version contains a lot of new features, cleanup, performance improvement and also some bugfixes.
One of the key features is that it is now possible to define header and footer directly in the fluid template, see the example in the README file here:
https://github.com/bithost-gmbh/pdfviewhelpers/blob/ef08bef962fad5c342aac4b1107e430ba48a9612/README.md

from pdfviewhelpers.

maechler avatar maechler commented on May 29, 2024

@luberti

Fortunately the developer of TCPDF still tries to make the library compatible with the newest PHP versions:

https://github.com/tecnickcom/TCPDF/blob/1861e33fe05f653b67d070f7c106463e7a5c26ed/CHANGELOG.TXT#L4-L5

We will update TCPDF before the next release of pdfviewhelpers.

from pdfviewhelpers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.