Comments (5)
I just published an update for the pdf generator. Can you run composer update
and see whether the issue is resolved or not?
from l4pdf.
I have run composer update.Using download('laravel.pdf') as I was before no longer produces an error but it is also no longer producing a file in the app/storage directory and when I navigate to the url in my browser produces a white page with no pdf being downloaded.
If I run PDF::loadUrl('http://www.laravel.com')->save('/vagrant/app/storage/laravel.pdf'); then everything is working correctly, with the pdf being created and saved in the storage directory.
Thanks for the quick response :)
from l4pdf.
app/storage
folder is used for saving temporary files so you generally don't see any file related to l4pdf because they are deleted after the pdf is generated.
I have no idea why download()
is not working. Are you sure you are return
ing the download()
as a response ?
Route::get('/', function()
{
return PDF::loadUrl('http://www.laravel.com')->download('test.pdf');
});
from l4pdf.
Aha... I was trying to get stream working and it wasn't until I realised I wasn't returning the result. Using:
return PDF::loadUrl('http://www.laravel.com')->serve('laravel.pdf');
was working as expected so I tried using download whilst returning the result and it is also working.
Having reviewed the examples on the main repo page I see I should have been doing this from the very start, I think what threw me was that the first example doesn't use return though I guess this should have been obvious.
Oh well, glad I got it solved and thank you for the rapid response and just in general for this excellent package, looking forward to using it in production.
from l4pdf.
Great! Enjoy!
from l4pdf.
Related Issues (11)
- Exit code from wkhtmltopdf is too eager HOT 5
- Segmentation fault error HOT 2
- Embedding images HOT 2
- Laravel 5 support HOT 4
- Configure wkhtmltopdf path in windows HOT 3
- How to configure the converter in laravel HOT 1
- Arabic language HOT 1
- file_put_contents(/vagrant/public/test.pdf8O1RWi): failed to open stream: Permission denied HOT 4
- Overprinting HOT 1
- Header with hebrew HOT 8
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 l4pdf.