-
Notifications
You must be signed in to change notification settings - Fork 674
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
print a remote pdf #95
Comments
@weihongyu12 , we can't print a remote pdf because of the cross-domain protection and the same-origin policy. I'll check if we there is way to work around it. Maybe we can implement a solution in the library. |
I'm also looking for a way to print a remote pdf. Can you imagine a way to do it? |
Try PDF.js? |
You could create a server endpoint that acts a proxy. i.e. |
I haven't found a solid solution to work around the some-origin policy and allow the lib to print remove pdf files. As it uses iframe to load the pdf before printing it, the error will always occurs. I recommend using the solution above suggested by Steve. |
I implemented a better pdf pre-loading logic which I just realized it solved the issue when printing remote pdf files. Here is an example: For now, it will only do this when preloading, which means, we have to pass the Either way, I thought this was pretty cool and wanted to share. |
Now that the remote file can be promised, I think the document should prompt the server to set |
This worked for me. http://plnkr.co/edit/kxn1TuoP9Dxj75jrdl5W?p=preview |
Can you print a remote PDF? Existing Features Printing a remote file will report a cross-domain error, but in general, the file server may not be in the same domain as the application server
The text was updated successfully, but these errors were encountered: