Comments (6)
Hi!
I'd the same problem, just replace the tcpdf/include/tcpdf_static.php function file_exists (L1879 in tcpdf 6.3.4) like this:
public static function file_exists($filename) {
if (preg_match('|^https?://|', $filename) == 1) { return self::url_exists($filename); } if(stripos($filename,'data:')===0) { return true; } if (strpos($filename, '://')) { return false; // only support http and https wrappers for security reasons } return @file_exists($filename);
}
from tcpdf.
Do this
<img src="@/9j/4AAQ....
instead of
<img src="data:image/png;base64,/9j/4AAQ....
from tcpdf.
@detook solution works, but so is @LittleBigFox's if one is ok with modifying the static file.
I personally find it very sad that we have to add an @ instead of the default:
data:image/png;base64
I've created a PR with @LittleBigFox's fix:
#671
from tcpdf.
from tcpdf.
Version 6.2.21 works fine in local and server. I have 6.3.2 and render Ok in local and not works in server.
Above solution not working for me. I checked with 6.3.2 and 6.4.4
from tcpdf.
I'm testing versions: v6.3.4, v6.3.3, v6.3.2, v6.3.1, v6.3.0, v6.2.26, v6.2.25, v6.2.23, v6.2.22 and all broken
in v6.2.21 render OK.
from tcpdf.
Related Issues (20)
- Exclude indents from the nested tables HOT 1
- Some kanji characters cannot be displayed HOT 1
- Why SVG images using <path> elements create larger file sizes than those using <defs> elements?
- SetProtection() with hashed string
- Get PDF attachment
- getNumPages returns only current page in Header() function
- Wrong /Length calculation in xobjects
- CVE-2024-22641 HOT 5
- Issue: CJK Characters Not Displaying After Adding Noto Sans Fonts in TCPDF 6.7.5
- preg_replace - NULL for 3rd parameter on tcpdf.php:16560
- getting TCPDF ERROR: Please explicitly set action attribute path!
- Special font (βΈ§) error using writeHtml write error: Undefined array key 11815 HOT 1
- HTML table cells have wrong width after column break in writeHTML method
- PHP Fatal error: Uncaught Error: Class "Com\Tecnick\Pdf\ClassObjects" not found
- TCPDF Tscii font import support required
- PDF Download Issue with POST Method - Downloads PHP Code Instead of PDF
- Generate output pdf in a new tab
- Version HOT 1
- Apparent ReDoS vulnerability HOT 1
- Image will not show in TCPDF using $pdf->writeHTML($html, true, false, true, false, '');
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 tcpdf.