Unable to use Snappy because of the Orange Preview page

php

#1

I get the orange preview page, when I try to use Snappy to make a PDF file.
Any way to fix this? Making the workspace public does not work, it just remove the login page.

I’m using “PDF::loadFile()” to load an internal URL.


#2

If you are running snappy on the same workspace, load page via localhost, otherwise you can set user agent to a non browser one, to avoid the orange page.
Please let us know if this helps.


#3

Hmm… using localhost would be preferable, but can’t get it to to work.
This should work, right?

$pdf = PDF::loadFile('http://localhost/pdf/eye/'.$id);

The URL works when using normal path (not localhost).

Getting and error when I try to do that:

Error: Failed loading page http://localhost/pdf/eye/1234
Exit with code 1 due to network error: ConnectionRefusedError

#4

Which port do you use?, try http://localhost:8080/pdf/


#5

Haha… i’m soooo stupid.
Works now, thanks!