-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support RTL languages print from HTML to PDF. #42
Conversation
Hi, Could you please sign CLA and match adiatullin user with the Github user? |
import java.io.IOException; | ||
import java.io.OutputStream; | ||
|
||
public interface PdfConverter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to 'HtmlToPdfConverter'
protected PdfConverter createPdfConverter() { | ||
return openHtmlForPdfConversion ? new OpenHtmlToPdfConverter() : new ITextPdfConverter(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Introduce new factory: HtmlToPdfConverterFactory
Set HtmlToPdfConverterFactory for HTML formatter in the DefaultFormatterFactory.
protected void loadFontsFromDirectory(ITextRenderer renderer, File fontsDir) { | ||
loadFontsFromDirectory(new ITextPdfConverter(renderer), fontsDir); | ||
} | ||
|
||
protected void loadFonts(HtmlToPdfConverter converter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, do not remove deprecated methods. Methods are used for backward compatibility.
Integrated new pdf rendering library 'Openhtmltopdf' which correct prints RTL languages.