DocFX Version Used: 2.36.2
Template used: pdf.default
Steps to Reproduce:
> [!NOTE]
> The word
Expected Behavior:
The intermediate html file generated for PDF should render the Note like it does in the website, e.g.:

Actual Behavior:
The PDF rendered the note like:

Notes
I was able to get this scenario functional by customizing a template and loading the docfx.css into the pdf template.
@partychen, can you advise on how to customize the CSS for PDF template? Thanks!
@herohua , I was able to customize the PDF template to include the docfx.css from the default template. As a user, however, I was expecting this functionality to exist without customization (since I didn't customize the default web template, why would I have to customize the PDF template?). If the default web template includes support for things like glyphicons, couldn't the default PDF template include this support as well?
@MrBenMyster Could you please let me know which part you have customized? Thanks.
My apologies for the delay. I output the styles from the default template using docfx.exe template export default. From the output, I renamed docfx.css to default.css and copied this and docfx.js, docfx.vendor.css and docfx.vendor.js to another folder, like:
docFxTemplates\pdf\styles
…
default.css
docfx.js
docfx.vendor.css
docfx.vendor.js
Then in the docfx.json I updated the template section, like:
"template": [
"pdf.default",
"docFxTemplates/pdf"
]
I had to add the fonts folder to my custom template too.
Additionally the markdown emojis are not working in pdf.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
@MrBenMyster Thank you for the information. I agree it is ideal to work without customization. However, I am not sure whether it will break anything after this replacement. I need more investigation on this.
fixed in 2.56.3
Most helpful comment
My apologies for the delay. I output the styles from the default template using
docfx.exe template export default. From the output, I renamed docfx.css to default.css and copied this and docfx.js, docfx.vendor.css and docfx.vendor.js to another folder, like:Then in the docfx.json I updated the template section, like: