that austrian security guy
firefart / gochro Goto Github PK
View Code? Open in Web Editor NEWTake screenshots of websites and create PDF from HTML pages using chromium and docker
License: MIT License
Take screenshots of websites and create PDF from HTML pages using chromium and docker
License: MIT License
I have an issue where i need to pass --print-to-pdf-no-header
to Chromium,
It would be great if it was possible to pass values to args via the request URL.
Something like: /html2pdf?w=1024&h=768&print-to-pdf-no-header=true
Line 142 in b5c0792
Hi, I have noticed this strange error log in gochro container. It is occurring on every request. It is even stranger that gochro returns correct PDF with response 200 ๐ .
Do you have some hint what is going on inside? I am using headless mode with seccomp profile.
time="2023-12-11T22:11:50Z" level=debug msg="number of goroutines: 5"
time="2023-12-11T22:11:53Z" level=debug msg="number of goroutines: 5"
time="2023-12-11T22:11:55Z" level=debug msg="going to call chromium with the following args: [--headless=new --disable-gpu --disable-software-rasterizer --virtual-time-budget=55000 --disable-dev-shm-usage --hide-scrollbars --disable-crash-reporter --block-new-web-contents --enable-logging --v=1 --ignore-certificate-errors --print-to-pdf --no-pdf-header-footer /tmp/pdf.4137431764.html]"
time="2023-12-11T22:11:55Z" level=debug msg="STDOUT: "
time="2023-12-11T22:11:55Z" level=debug msg="STDERR: [2354:2374:1211/221155.451578:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2354:2377:1211/221155.458716:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2354:2377:1211/221155.458902:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2354:2374:1211/221155.461941:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")
[2354:2374:1211/221155.462025:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")
[2354:2374:1211/221155.462183:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")
[2354:2374:1211/221155.462249:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")
[2354:2354:1211/221155.466591:ERROR:policy_logger.cc(157)] :components/enterprise/browser/controller/chrome_browser_cloud_management_controller.cc(163) Cloud management controller initialization aborted as CBCM is not enabled.
[2354:2374:1211/221155.479960:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")
[2354:2374:1211/221155.480024:ERROR:bus.cc(407)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are \"tcp\" and on UNIX \"unix\")
[2354:2438:1211/221155.591215:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2354:2438:1211/221155.591326:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2354:2438:1211/221155.591663:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2354:2438:1211/221155.591730:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[2354:2438:1211/221155.591781:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
37576 bytes written to file output.pdf
"
time="2023-12-11T22:11:55Z" level=error msg="os: process already released"
10.0.1.29 - - [11/Dec/2023:22:11:55 +0000] "POST /html2pdf HTTP/1.1" 200 37576 "" "python-requests/2.31.0"
time="2023-12-11T22:11:56Z" level=debug msg="number of goroutines: 5"
time="2023-12-11T22:11:59Z" level=debug msg="number of goroutines: 5"
Hi,
I was wondering if there is a way to get a capture of the whole URL, not just cropped to provided height, or if it's going to be implemented.
Otherwise, thanks, it works perfectly !
Hi,
It's a great job you've done.
Some feature suggestions that might be great to implement in the future:
Cheers,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.