Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why chinese MardownFile can't convert to pdf #7

Open
Yfygithub opened this issue Aug 2, 2018 · 1 comment
Open

why chinese MardownFile can't convert to pdf #7

Yfygithub opened this issue Aug 2, 2018 · 1 comment

Comments

@Yfygithub
Copy link

i try to convert chinese MardownFile to pdf but get messy code in pdf,what‘s wrong with it?

@Yfygithub Yfygithub reopened this Aug 2, 2018
@henryhqhuang
Copy link

you should make sure you have the chinese font-family, if not, add it
ITextFontResolver fontResolver = renderer.getFontResolver(); fontResolver.addFont("font/simsun.ttc", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);

and the html should add follow code
`

<style type="text/css">body {font-family: SimSun}</style>

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants