I have an instance of PressBooks installed locally on my Mac. I have singed up for the free option of DocRaptor to produce pdf documents and covers, however I can’t figure out how to set the test documents parameter to ‘true’, otherwise I will rapidly go through my monthly allocation of free pdfs. Is there switch to do this in PressBooks or do I have to setup something with DocRaptor? I have an API key which I have added to the wp-config.php file according to the PressBooks installation instructions.
I have answered my own question.
On searching the files I found class-docraptor.php in which the test parameter is set according to how WP_ENV is defined. From the code I could make out that if WP_ENV is defined as ‘development’ then the test parameter is set to true. So I added define( ‘WP_ENV’, ‘development’ ); to the config.php file and I now get the pdf with the watermark which I can use to check before printing after commenting out, define( ‘WP_ENV’, ‘development’ ); . It would be useful if there was a switch in PressBooks for toggling the test parameter for use in DocRaptor. Maybe there is but I just don’t see it.