Comments (2)
Hi maechler,
I found my problem.
Some parts of the content elements had <div>
container in it and so the <f:format.htmlentitiesDecode value="{element}" />
part made some problems at the pdf-creation.
This content comes from a form where people can entry information about courses etc. And someone had copied elements from a hompeage and with that, the <div>
elements...
I will now write a code, that will cut off this <div>
elements and save the light html code in the database.
Thank you for your help it seems that it is now working :)
from pdfviewhelpers.
Hi Behau
I just copied part of your template and that worked just fine, also with the ViewHelper f.format.htmlentitiesDecode
.
Code
{namespace pdf=Bithost\Pdfviewhelpers\ViewHelpers}
<pdf:document outputDestination="I" title="Report">
<pdf:page autoPageBreak="1">
<pdf:html>
<style>
table {
color: #003300;
font-size: 8pt;
border: 1px solid black;
}
th {
font-weight: bold;
font-size: 8px;
text-align: left;
border-bottom: #eee 1px solid;
background-color: #eee;
}
td {
border: none;
}
</style>
<f:for each="{0: 'test', 1: 'Müller & Breuer'}" as="element">
<table class="second" cellpadding="2" cellspacing="5">
<tr>
<td>{element}</td>
</tr>
<tr>
<th><f:format.htmlentitiesDecode value="{element}" /></th>
</tr>
</table>
</f:for>
</pdf:html>
</pdf:page>
</pdf:document>
I think the problem you are describing could be because of a caching issue. When the frontend cache is empty the pdf gets first generated without any problems. However it will not be saved to the frontend cache but an empty entry will be. The second and third time you call the page with caching enabled, you get a blank page.
From pdfviewhelpers version 1.1.0 onward the frontend caching is disabled by default.
What version are you using?
Try clearing the frontend cache and see if the pdf gets generated correctly.
If that is not the problem, please try to give more details on what exactly happens and when. Is there a message in the PHP error logs? What header are you referring to?
You could even send me your extension and I could try it out myself.
from pdfviewhelpers.
Related Issues (20)
- Undefined array key warning on PHP 8.0
- Tables unexpected gap HOT 2
- System requirements? HOT 2
- PDF/UA Support HOT 5
- How to get content into pdf? HOT 2
- <style> tag not possible in <pdf:html> HOT 3
- Image viewhelper do not accept FileReference HOT 1
- Autocomplete for Viewhelpers? HOT 6
- Problems with character conversion for languages e.g Polish, Hungarian etc. HOT 10
- PHP 8 errors in AbstractTextViewHelper when text is empty and trim or removeDoubleWhitespace is set to 1 HOT 1
- PHP 8 error in ColumnViewHelper if width isn't set HOT 2
- Shouldn't/couldn't an image (in general and) in the header be embedded in a PDF as a reference - to save memory? HOT 2
- Error in ImageViewHelper with php8.1 HOT 2
- ViewHelper to attach another PDF HOT 1
- TYPO3 12, non-composer: Fpdi not found HOT 2
- Compatibility issues with News Extension version 11.1.1 HOT 3
- Undefined array key error in ImageViewHelper HOT 1
- Support TYPO3 v12.4 LTS HOT 2
- processingInstructions, no File in fileadmin/_processed_ generated HOT 7
- Use in controller HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdfviewhelpers.