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

Support RTL languages print from HTML to PDF. #42

Merged
merged 7 commits into from
May 8, 2018
Merged

Support RTL languages print from HTML to PDF. #42

merged 7 commits into from
May 8, 2018

Conversation

gecrepo
Copy link
Contributor

@gecrepo gecrepo commented Mar 21, 2018

Integrated new pdf rendering library 'Openhtmltopdf' which correct prints RTL languages.

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2018

CLA assistant check
All committers have signed the CLA.

@jreznot
Copy link
Contributor

jreznot commented Mar 21, 2018

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 {
Copy link
Contributor

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();
}

Copy link
Contributor

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) {
Copy link
Contributor

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.

@andreysubbotin andreysubbotin removed the request for review from tinhol May 8, 2018 08:29
@andreysubbotin andreysubbotin merged commit 9b4aad8 into cuba-platform:master May 8, 2018
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

Successfully merging this pull request may close these issues.

None yet

4 participants