Export PDF using Remote Chrome
Last modified by Ilie Andriuta on 2024/01/31 17:40
Steps to reproduce
Preconditions:
- Chrome browser is installed on the test machine
- Have a page with an imported office document already created.
- Start headless Chrome following the instructions from https://extensions.xwiki.org/xwiki/bin/view/Extension/PDF%20Export%20Application/#HHeadlessChromeonLocalhost, for Windows may be better to use (paste in a Terminal, e.g. Command Prompt or Windows Terminal):
chrome --headless --disable-gpu --remote-debugging-port=9222 --remote-allow-origins=http://localhost:9222 - Go to Administer Wiki > Content > PDF Export
- From "Generator" select 'Remote Chrome'
- Set Chrome Host to "localhost"
- Set Chrome Remote Debugging Port to the port you used (e.g. 9222)
- Set XWiki URI to "localhost"
- Click 'Save' and check that the Generator status is "Available" on the top, under "Status"
- Go to the page imported with Office
- Click 'More Actions > Export > PDF (make sure the page is ticked)
- Click 'Export' > 'Export'
Expected results
The page is exported successfully with its content rendered like the original wiki page.
Results
| per page of Previous Page Next Page Page | |||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| Previous Page Next Page Page | |||||||||||||||||||||||||||||||||