Comments (6)
Hello @Adelysnet!
Could you provide a reproducible gist or any equivalent ? It is hard tell what could be wrong with the information you currently provided.
Did you manage to spot anything that could help ?
from snappy.
Hi Antoine,
here is the Gist : https://gist.github.com/Adelysnet/8c52f20f06b82192aec4ecfb8e6cfd7f
Just call the generatePDF method like so :
$html =
'<html><head><title>Test</title></head><body><h1>Test</h1></body></html>'
;
$pdfManager->generatePDF( $html );
Env :
PHP Version 8.1.16
Symfony : 5.4
Romain
from snappy.
Hi @Adelysnet ,
You wrote that "some times" the generation fails. Do you know every how many generation it fails?
I cannot reproduce what you are experiencing with a "filename" with a length longer than PHP_MAXPATHLEN
Do you have the message that triggered the 500 error code?
from snappy.
Hello @Adelysnet,
We can't replicate the issue you are having using your gist.
Are you sure your issue is related to the isFile
function?
In your example you don't generate a filename that's slightly below the PHP_MAXPATHLEN
but an header that's slightly below that length.
Are you sure that you don't have any issue reading/writing that file instead and, therefore, it's correct that theisFile
function returns false?
from snappy.
Hi @alexpozzi
the header-html option pass the optionsWithContentCheck test in the Pdf class, so the value (can be html string or filename) is sent to the isFile function, which in my environnement crash.
from snappy.
Oh! You are right, my bad, I missed that.
Can you give us more info on your environment? Like OS, Docker version (if using Docker) etc...?
I think that the assertion should be adjusted in order to better support this case.
from snappy.
Related Issues (20)
- Error on posted value!
- Set Option UTF-8 not responding HOT 1
- wkhtmltopdf HOT 5
- Deprecated: Return type of Symfony\Component\Process\Process::getIterator HOT 4
- symfony/process version contraints
- Snapshot HOT 2
- Enhancement: use internal exception HOT 3
- Error while installing wkhtmltopdf-amd64 via composer HOT 2
- How to get in touch regarding a security concern HOT 7
- wkhtmltopdf abandoned, what now ? HOT 3
- Whether google/snappy is affected by CVE-2023-28115? HOT 2
- Vulnerability in knplabs/knp-snappy (v1.4.1)
- DPI 96 vs 300. Align issues
- Installation: wkhtmltoimage-amd64 not found HOT 1
- PDF file rotation HOT 2
- The output file scheme is not supported HOT 5
- Snappy doesn't work on MAC OS M1 Pro HOT 3
- Support Symfony 7 HOT 3
- laravel snappy pdf HOT 1
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 snappy.