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

Blank PDF generation #36

Open
matthewhilton opened this issue Jul 5, 2022 · 1 comment
Open

Blank PDF generation #36

matthewhilton opened this issue Jul 5, 2022 · 1 comment

Comments

@matthewhilton
Copy link

I'm using the chromium generator, and can't seem to actually get any pages to generate properly. They are always blank.

I've tried both the test.php script as well as calling it from other scripts:

$url = new moodle_url("http://mysite.localhost/course/index.php?categoryid=13");
$file = $converter->convert_moodle_url_to_pdf($url, 'course1337.pdf', [], true);
http://mysite.localhost/admin/tool/pdfpages/test.php?url=http://mysite.localhost/mod/quiz/review.php?attempt=126558

When I try to run chromium just from the terminal, i get the following, which may or may not be related:
/usr/bin/google-chrome-stable [62402:62402:0705/030126.228260:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

@matthewhilton
Copy link
Author

matthewhilton commented Jul 5, 2022

Digging into it a bit more, I've found its likely something to do with the proxy urls.

For example, if I change the file converter_chromium.php to navgiate to a random url e.g. https://google.com and take a screenshot or output to pdf, the webpage is shown correctly. But if I navigate to the proxy url, it is a blank page.

Fuurthermore setting the url as a public moodle site's homepage works, but setting as my local sites homepage does not.

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

1 participant