Comments (4)
Fixed in https://github.com/Setasign/FPDI/releases/tag/v2.4.1
from fpdi.
Please share the PDF in question and also a minimal reproducable code snipped, so that we can reproduce this. Thanks!
from fpdi.
I generate it like this:
(unfortunately I can not share the base PDF file. But it is a PDF (version 1.5).
$mpdf = new Mpdf([
'fontDir' => ['fonts'],
'fontdata' => ['volkart' => [
'R' => 'volkart-regular/Volkart-Regular.ttf',
]],
'default_font' => 'volkart',
]);
$mpdf->setSourceFile('my-pdf.pdf');
$mpdf->AddPage('P');
$templateId = $mpdf->importPage(1);
$mpdf->useTemplate($templateId);
$mpdf->WriteFixedPosHTML($this->html('a wonderful product', '#000'), 77.5, 85.3, 99, 15, 'auto');
$mpdf->WriteFixedPosHTML($this->html('a description', '#000'), 77.5, 126, 99, 15, 'auto');
// ...
protected function html(string $text, string $color)
{
return <<<HTML
<table style="width: 100%; margin: 0; padding: 0;" cellpadding="0" cellspacing="0">
<tr>
<td style="height: 47pt; text-align: center; vertical-align: middle; padding: 0px 5px; margin: 0; font-size: 35px; color: {$color}">
{$text}
</td>
</tr>
</table>
HTML;
}
from fpdi.
Okay, there's a variable clash between FPDI and mPDF.
I just added a quick fix to the development branch. Can you please test it? If this works I am going to release a hotfix tomorrow morning. Gn8!
from fpdi.
Related Issues (20)
- Class "FPDF" not found HOT 2
- Custom Font HOT 3
- Added Text missing except on first page when viewing with some PDF software (incl. Acrobat) HOT 1
- setasign\\FpdiPdfParser\\PdfParser\\PdfPars Class not founded HOT 3
- PDF/A-3 with TCPDF (parameter not transmit)
- How wrap long title HOT 3
- FPDI - Getting "CrossReferenceException::OBJECT_NOT_FOUND" while trying to ImportPage from existing PDF file
- Indirect references in link annotation dictionaries creates corrupted PDFs (when FPDI is used with FPDF)
- Unable to find PDF file header. HOT 2
- while I setSourceFile ,then importPage, the seal missed HOT 1
- Problem with Y Coordinate on different page size HOT 2
- Undefined property: setasign\Fpdi\Tcpdf\Fpdi::$PDFVersion HOT 8
- Set Meta Data HOT 3
- Getting error while adding custom font. HOT 1
- (Question) Replace an Image inside a PDF HOT 1
- Snyk ReDoS vulnerability HOT 1
- WriteHTML() not possible anymore HOT 2
- Don't work without composer autoload HOT 5
- doesn't support cryllic alphabet HOT 3
- Parser have issue here HOT 2
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 fpdi.