Is there a way to restrict available options in the PDF Export module? Let’s say I want my users to always use Cover, Header and Footer in their PDF export, but allow them to choose if they want to include Table of Contents. The best way would be to have the unmodifiable options grayed out, but if that’s not possible, I could settle for complete removal of every option but TOC.
Hello,
I don’t know if there is a more user-friendly way to do this, but you can edit this file to alter the html in the PDF export modal. You can find it in your xwiki instance folder, for me I needed to modify the one in the webapps/xwiki/skins/flamingo folder, since there’s another one in ../templates.
Replace the first input with something like:
<input id="pdfcover" name="pdfcover" type="checkbox" value="0" disabled />
Adding “disabled” completely disables the option, i.e. treats it as if unchecked. I need the option to remain active, but unchangeable.
Edit:
It works, I just had to change the value in <input name="pdfcover" type="hidden" value="0" /> to value="1".
This is what I have now:
<input id="pdfcover" name="pdfcover" type="checkbox" checked="checked" value="1" disabled />
<input name="pdfcover" type="hidden" value="1" />