A PDF Preview available for each chapter?

I would like to see a preview feature in which the preview would look like the PDF output. With this feature, I can change the embedded photo so I can tweek it to look like a single or double page, especially it is going to be a recipe cookbook. Please advice how to access this feature if it exists already.

Hi Alex, that’s a great idea for a feature. Closest thing to what you’re looking for the full book PDF preview available in the browser when you click Diagnostics (in the admin footer) -> XHTML preview. Should be available at https://YOURBOOKURL/format/xhtml?debug=prince if you’re looking for the direct link. It’s not perfect, but helpful in many cases. In order for it to work properly you’ll need to have previously generated at least one PDF export.

I’m sorry, the https://YOURBOOKURL/format/xhtml?debug=prince link doesn’t work in my FireFox browser.

@Margfi you’ll need to replace the YOURBOOKURL with the actual URL of your book. For example book.pressbooks.com or university.pressbooks.pub/book etc

Thanks for the tip.

I tried what you wrote, but the pdf appears for a split second then it disappears.

We do have a preview, so people can print if they like it.

is that what you mean?

@Alex_Wong sounds like your book is running into a problem with the paged.js module we rely on to generate the PDF preview. It’s an upstream project, so there’s not a lot we can do to fix this besides report bugs (like https://gitlab.pagedmedia.org/tools/pagedjs/issues/80, etc.) but if you let us know what book you’re having trouble with, we can see if it’s something we can duplicate?

It is the only file on my account - The Baba Nyonya Peranakans.

Thanks.

https://peranakan.pressbooks.com/format/xhtml?debug=prince

I’m seeing the same thing, Alex :frowning: . We’ll try to look into it when we can. In the meantime, one option is to control the individual chapters included in each export from the organize menu. When I’m debugging PDF exports and can’t get the PDF preview to work (as in this case), I often click the ‘show in exports’ heading on the organize page to turn off all chapter exports and then manually check only the chapters I want to check/preview in. Repeat as needed until it’s looking good and then click the ‘show in exports’ heading again to globally toggle them on for a given part.

Good luck – it looks a beautiful (& delicious) book project you’re working on!

Hi @Alex_Wong, we fixed the bug that was blocking your ability to use the PDF preview feature for your book. You should be able to see that now at https://peranakan.pressbooks.com/format/xhtml?debug=prince in case this is still relevant/useful for you.