Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TYPO3 8 LTS support #18

Closed
maechler opened this issue Mar 17, 2017 · 16 comments
Closed

Add TYPO3 8 LTS support #18

maechler opened this issue Mar 17, 2017 · 16 comments
Assignees

Comments

@maechler
Copy link
Member

No description provided.

@maechler maechler self-assigned this Mar 17, 2017
@angeloprevitali
Copy link

Hello

we would appreciate if you adapt this great extension with the actual TYPO3 CMS verson of 8.6^.
Have you got any plans concernign timeline?

Thanks.

Regards,
Angelo

@maechler
Copy link
Member Author

Hi Angelo

We wanted to wait until TYPO3 8 LTS is released, which is scheduled for April 2017. I do not think we need to change a lot, I guess we can add support within 1-2 weeks after the release.

However we need to release a bugfix this week. I will test it also on TYPO3 8.6. If there are no major problems I guess we can already add support for that version.

Kind regards,
Markus

@angeloprevitali
Copy link

Hi Markus

great. Thank you very much for your quick answer.

Best regards,
Angelo

@maechler
Copy link
Member Author

Hi Angelo

I just released a new version with the bugfix I mentioned and a fix of a fatal error in TYPO3 8.6.
Unfortunately there is still a caching issue in TYPO3 8.6 with the MultiColumnViewHelper. It works on the first request, but as soon as the Fluid template is cached, it does not work anymore.
I am not sure yet whether that is an error in TYPO3 or our extension. That is why I have not added official support yet.
However you could use the extension already with TYPO3 8.6 (at your own risk :P) as long as you do not use the MultiColumnViewHelper.

Kind regards,
Markus

@angeloprevitali
Copy link

Hi Markus

Great. I will check this out in the next days and let you know about the results here on GitHub.

Bets regards,
Angelo

@angeloprevitali
Copy link

Hi Markus

i tried the GitHub adapted V8 Version of your extension, but i couldn't get this EXT to work on. I just get a Execption on the FE and the sourcecode of the PDF is shown. Maybe i have to set up the Viewhelpers completely new. I don't have any idea where the bug leads currently. I will try it again in a few days/week(s). Currently i got a lot of other work to do, so I don't know when i will be able to retry this on a V8LTS again.

Regards,
Angelo

@maechler
Copy link
Member Author

Hi Angelo

Thanks for your response! Interesting..I only observed a caching issue with the MultiColumnViewHelper, the rest seemed to work for me. I will add support for TYPO3 8 LTS as soon as possible when it comes out.

Kind regards,
Markus

maechler added a commit that referenced this issue Apr 20, 2017
@maechler
Copy link
Member Author

@angeloprevitali

I added support for TYPO3 8.7 LTS, however it may take some time until I release it to the TER, because I want to include some more changes.
If you need it already you can simply use the latest code from the master branch.

@angeloprevitali
Copy link

Hello Markus

i tried again your EXT: but i got only this as result of a page. Any ideas?

screenshot_1

Thanks and regards,
Angelo

@angeloprevitali
Copy link

Just another thing: If I insert on a custom template which i will assign on a specific page the content elements of the website isn't getting outputted correctly.

Example that will NOT work:

.... <pdf:text> <f:cObject typoscriptObjectPath="lib.seitentitel" /> <f:format.raw>{inhalte}</f:format.raw> </pdf:text> ...

any ideas?

Regards,
Angelo

@maechler
Copy link
Member Author

Issue 1)
Can you have a look at the response headers in the developer tools?
Especially important are Content-Type: application/pdf and Content-Disposition: inline, filename=bithost_example.pdf.
If these headers are not present it may be that they are overwritten by some other plugin.
Is that the example that is being shipped with the extension? does this happen with all the examples?
You find the examples in Resources/Public/Examples.

screen shot 2017-04-27 at 08 57 35

Issue 2)
What exactly does not work? Outputting <f:cObject typoscriptObjectPath="lib.seitentitel" /> ?

@angeloprevitali
Copy link

Issue 1)
I will create a brandnew ext template and will re-try the creation of a PDF. Seems that the encoding is wrong, YES. But I don't know yet exactly, how you will render a whole content of a website as a PDF.. I will try again :)

Issue 2)
Outputting <f:cObject typoscriptObjectPath="lib.seitentitel" /> this generates HTML code and NOT only the content. Also here I will try again now :)

Thanks for your fast answer.

I will let you know.

Regards,
Angelo

@maechler
Copy link
Member Author

Issue 2)

If you are generating HTML content, then you should feed it to the HtmlViewHelper:

<pdf:html>
    <f:cObject typoscriptObjectPath="lib.seitentitel" />
</pdf:html>

The TextViewHelper can not deal with HTML content. The HtmlViewHelper could also be the solution to issue 1.

@angeloprevitali
Copy link

YES. It works now :)

The problem was, that IF you got already a template which loads the default configuration in the header that new header informations like application/pdf wasn't loaded (as you described it). Now for rendering a a existing content with

<pdf:html> {inhalte} </pdf:html>

of a page I added the following:

pdf = PAGE
pdf {
typeNum = 999

    config {
    disableAllHeaderCode = 1
    additionalHeaders = Content-type:application/pdf
    xhtml_cleaning = 0
    admPanel = 0
    }

}

That makes the difference!

Like this you can render a type=999 (just as test) as a PDF without touching all other configs in TS setup.

Thx to you for that hint.

Regards,
Angelo

@angeloprevitali
Copy link

Hello again!

Now that everything is working - do you have any experiences about creating PDF generated TYPO3 content pages with the following languages:

Used Font: OpenSans (Google font)

  • Turkish
  • Soomali
  • Tigrynia

As I saw the generated PDF with Content with Tigrynia creates only ???????? in PDF.

Here an example from ColPos = 0

ብዛዕባ ጾታዊ ርክብን ጥዕናን ዝምልከት ኣርእስቲ ዘለዎ፣ እዋናዊ ዝኾነን ብሰብ ሙያ ዝተደገፈን ሓበሬታታት ብብዙሕ ቋንቋታት ብዛዕባ ኣካላት መፍረ፣ ምክልኻል ጥንሲ፣ ምውራድ ጥንሲ ወይ ድማ ብጾታዊ ርክብ ዝመሓላለፍ ሕማማት። ብኣካል ምኽሪ እንተድለየ ምስ ሓኻይምኩም ወይ ሓኻይምክን ክትማየጣ/ጡ ትክእላ/ሉ ኢኽን/ኹም፣ ከምኡውን ምስ ቤት ጽሕፈት ምኽሪ ጾታዊ ርክብን ጥዕናን ተራኸቡ።

Thanks for your feedback.

Regards,
Angelo

@maechler
Copy link
Member Author

I am afraid, I have no experiences using these languages. Under the hood pdfviewhelpers uses TCPDF, maybe it helps to include TCPDF in your Google search for that issue. Here is a raw example of TCPDF using Persian and Arabic language: https://tcpdf.org/examples/example_018/

Does it work with the default font?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants