Do you have Prince installed on your local machine, and does it work if you run it from the command-line on a simple document, such as "prince test.html"?
Prince is installed on my PC, but when I run prince test.html the following appears:
prince : The term 'prince' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ prince test.html
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (prince:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
From some little testing locally, I seem to understand that you get the 404 error because docusaurus-prince-pdf does not find the expected 'next' link. There might be several reasons for this: 1. in its default setting, it works with dovusaurus v2 2. if you have a custom landing page, also that page needs a (recognizeable) 'next' link.
Thus: 1. if you are working with docusaurus v1, the command to run is:
prince http://localhost:3000/userguide/docs --selector '.docs-next' --output ATGuide.pdf
2. if you are using v2 and have a custom landing page, you need to add a link constructed like this:
As for the warning messages for unsupported CSS properties: that shouldn't cause any problem in the generation of a PDF. Prince is just telling you that it doesn't support these CSS properties. But did the PDF actually get produced?
It looks like you might be missing a 'next' link to the rest of the documentation.
To check if everything else works, you can enter the next page in the sequence (i.e. the first page of the actual documentation) - if all is OK, it should generate the whole documentation without the first page.
As for the landing page: the JSX page is irrelevant here, what you care for is the page that actually gets served. You can either build your site and check the generated HTML landing file, or you load the landing page in your favourite browser and find out whether the landing page actually contains said link (for v2, the default class you are looking for is 'pagination-nav__item--next'.
If that class does not exist, you need to find a way to insert it on the landing page - I'll leave it to you to find out how (I have been struggling with some "docusaurus-v2-magic" myself, and I know that at times some things can get rather messy...).
And so a PDF was created! And the TOC on the left worked!
But there was a big problem - only the first page of each individual file was inserted into the PDF. Would this be due to the fact that I do not have a Prince license but just a trial version? Or is there something else?
Thanks but I don't have a login at GitHub. There does not seem to be a fix. Is this correct?
Indeed, I reported the issue a few days ago, when noticing that it didn't seem to work. And it is yet to be fixed. Will try and see if I have some time to look for a fix.
I don't know your local site - it looks like you have styled something in some other way, and might have caused some other issues. Without having access to your local site, debugging is impossible.
? If yes, I agree that docusaurus-prince-pdf should document it somewhere - or better yet, they might want to consider whether to enable JavaScript by default. Else, it might be an issue specific to your local site.
It must be something in your HTML or CSS - I cannot reproduce this in the Docusaurus site. Without seeing your HTML and CSS it is impossible to give you an answer.
Thank you, nothing in there justifies the hashes. Do you only see it in the generated PDF?
It would be good to post the HTML of the title generating the PDF-bookmark-with-hash, and any CSS connected with it (you might find that in the web development tools in your browser).