Wiki source code of Export PDF using Remote Chrome

Last modified by Ilie Andriuta on 2024/01/31 17:40

Show last authors
1 Preconditions:
2 - Chrome browser is installed on the test machine
3 - Have a page with an [[imported office document>>doc:Administration Tests.Create Page from Office]] already created.
4
5 1. 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): {{code}}chrome --headless --disable-gpu --remote-debugging-port=9222 --remote-allow-origins=http://localhost:9222{{/code}}
6 1. Go to Administer Wiki > Content > PDF Export
7 1. From "Generator" select 'Remote Chrome'
8 1. Set Chrome Host to "localhost"
9 1. Set Chrome Remote Debugging Port to the port you used (e.g. 9222)
10 1. Set XWiki URI to "localhost"
11 1. Click 'Save' and check that the Generator status is "Available" on the top, under "Status"
12 1. Go to the page imported with Office
13 1. Click 'More Actions > Export > PDF (make sure the page is ticked)
14 1. Click 'Export' > 'Export'

Get Connected