Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream() doesnt work for me in Chrome ... #7

Closed
dmarko484 opened this issue Sep 2, 2013 · 14 comments
Closed

stream() doesnt work for me in Chrome ... #7

dmarko484 opened this issue Sep 2, 2013 · 14 comments

Comments

@dmarko484
Copy link

Thanks for such excellent dompdf binding!! I'm using it with Lataver 4, things are working smooth, I can download PDF without problem ... but stream() is working for me in Firefox but doesnt work in Chrome for me. In Chrome it just opens empty PDF and thats all. Is this just me or overall problem?

@barryvdh
Copy link
Owner

barryvdh commented Sep 2, 2013

Did it ever work, or did you just started using it? Are you on the latest dev-master?

If so, could you try an older version? Require this specific commit:

"barryvdh/laravel-dompdf": "dev-master#ed95661ac8b0b0fad268a863c08eeca820134761"

Does that work in Chrome?

@barryvdh
Copy link
Owner

barryvdh commented Sep 2, 2013

Does it work with other PDFs? Maybe you are missing a plugin. (See chrome://plugins/ to check for Adobe Reader or Chrome PDF plugin, perhaps disable one of them and use the other one)
Can you make a link to a streamed PDF page and do rightclick->save as and open it outside your browser. Does that give a correct PDF or empty page also?

@dmarko484
Copy link
Author

Here is info ...

a) I just started using it. Never seen this working in my Chrome (I mean stream specificaly)
b) tried your specific commit - no change
c) tried Chrome on my collegues computer accessing my laravel app - the same issue ... the internal Chrome PDF viewer just says 'Loading ...' . Generaly I have no issues when opening PDF files from internet using my Chrome ...
d) When I do right click on this, I can save the pdf with correct name and can open it correctly in Acrobat

I just also checked latest Opera(with new webkit engine), IE --- both working fine

Thank you ...

@barryvdh
Copy link
Owner

barryvdh commented Sep 2, 2013

Okay, and on Windows or linux/mac?

Does this happen with all your pdf's? Can you send me the code you are using?

Did you try the most basic pdf possible?

Route::get('hellopdf', function(){
    return PDF::loadHTML('Hello World!')->stream('download.pdf');
});

@dmarko484
Copy link
Author

Windows 8. My collegue the same ... I tried almost the same example and even bigger with View::make() and larger html template. I'm using 'artisan serve' as web server

@barryvdh
Copy link
Owner

barryvdh commented Sep 2, 2013

Just tried, works here in Windows 7/8/MacOS with Chrome, with Apache and also when using artisan serve.

Can you paste the code you are using?

@dmarko484
Copy link
Author

I tried the same code as you mentioned. If its working for you, I'm goind to try run project on another machine ...
Route::get('hellopdf', function(){
return PDF::loadHTML('Hello World!')->stream('download.pdf');
});

@dmarko484
Copy link
Author

Ok, just tried today under Apache (not artisan serve) and its working as expected. Thanks for such great support!!

@barryvdh
Copy link
Owner

barryvdh commented Sep 4, 2013

Okay, thanks for trying it out. Please let me know if you encounter any more problems! Closing this for now.

@barryvdh barryvdh closed this as completed Sep 4, 2013
@IftekherSunny
Copy link

barryvdh brother, pdf did not show in firebox browser when i used .com domain. but it shows pdf in browser when i am in localhost

@Nagesh29
Copy link

I am facing the same issue.
I am using apache server and windows 8 operating system.

Here is my link to the code:

http://stackoverflow.com/questions/25992427/unable-to-save-pdf-file-on-client-side-usng-dompdf

@emilas44
Copy link

@barryvdh I just wanted to add to this because I have a similar problem and didn't want to open a new "Issue"

It's that when I use return $pdf->stream('test.pdf');

It shows the pdf file properly in both Firefox and Chrome

And then when I want to download it in Firefox works
But in Chrome I get an error: "Failed - Network Error" down in the download tab. And I can't get to see what is the exact error... the network tab in dev extension is empty, nothing happens....

Maybe you have an idea or some advice what could I try?

@emilas44
Copy link

@barryvdh Hi, so I just wanted to say that I "solved" the problem.... I can't really say solved because there is something about Chrome that makes problem when you try to download a generated .pdf file when it's fetched with POST request.

So my solution was to send a GET request and then it shows the generated .pdf file and then I can download it.

@tripexito
Copy link

Hi, I am having issues to download pdf file generated with png images, in chrome download dialog shows as .html instead of .pdf
image
I've been trying using images as base64 and its working the pdf file download in chrome but the images does not showing on pdf file downloaded. In Firefox Pdf Viewer there's no issues. Please tell how can I solve. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants