Comments (6)
Same problem with an old version from 2021: Adobe Acrobat Pro (Mac) 2021.001.20155.
So the produced PDF is the problem.
from mpdf.
The code example is not exactly reproducible, is it?
from mpdf.
I will try to supply a minimum working example soon.
(As this is not trivial, it might take some time.)
from mpdf.
Steps to reproduce:
- Create file
pdfa_bug.php
:
<?php
require('vendor/autoload.php');
$mpdf = new Mpdf\Mpdf();
$mpdf->PDFA = true;
$mpdf->Rect(x: 10, y: 10, w: 10, h: 10, style: 'F');
$mpdf->Output('pdfa_bug.pdf', Mpdf\Output\Destination::FILE);
- Run
composer require mpdf/mpdf
. - Run
php pdfa_bug.php
. - Open the newly created PDF file
pdfa_bug.pdf
in Acrobat and verify PDF/A conformity. For details, use the preflight menu (verify PDF/A-1b) available in Adobe Acrobat Pro.
In both the 2021 and 2024 versions of Adobe Acrobat Pro (Mac), preflight fails with:
Document structure is invalid or damaged.
from mpdf.
PDF/A-1b compatibility was fixed in commit above by matching XMP and document metadata string.
As for the "Document structure is invalid or damaged" in your example, you have to call AddPage first manually unless you are writing into the document by any other method than WriteHTML().
from mpdf.
Works well now.
Thank you!
As for the "Document structure is invalid or damaged" in your example, you have to call AddPage first manually unless you are writing into the document by any other method than WriteHTML().
This information is placed very hidden at the bottom of this page: https://mpdf.github.io/reference/mpdf-functions/addpage.html
I would suggest adding a section "minimum code requirements" displayed more prominently.
from mpdf.
Related Issues (20)
- UTF-8 error when I use ctimes HOT 1
- Import external PDF page without overriding all document settings.
- div block width and font-size HOT 1
- Change ! to isset() on line 654 of Mpdf.php to remove warning
- https://www.exploit-db.com/exploits/50995 HOT 1
- Quickfix for color containing CSS variable is bad
- Hyphenation of words with hyphens not as expected HOT 3
- Add security reporting feature to the repo HOT 1
- There are some bugs related to border-collapse and padding and border with tables HOT 3
- Mpdf.php (#16141): Trying to access array offset on value of type null HOT 10
- Adding text to existing PDF file, can not move pdf file
- converting a .xlsx file to .pdf not retain the specified print area
- Undefined array key "VALUE" HOT 1
- htmlpagefooter element does not respect z-index HOT 4
- Error in pdf generation - Invalid argument supplied for foreach()
- Getting Fatal error sometimes with the ColorConverter HOT 2
- Attribute value truncated when containing double quote character and using single quote delimiter
- Warning: Undefined array key "s" HOT 6
- Nesting a table inside a tfoot element results in "Trying to access array offset on null"
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 mpdf.