Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #27147

    Hi,

    I have a requirement to create PDF in Chinese Japanese and Korean (CJK) Language also apart from other non-multi byte languages.

    Our development server are mac/windows and production server could be any type of server like WIN/UNIX/LINUX/AIX or AWS/AZURE.

    Currently I am need of free CJK fonts i can use as a JAR deployment file.

    I tried following steps in TTF embededding pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html with some converted NOTO ttf fonts, but I was not successful.

    NOTO fonts from google are available in OTF. Is there any way i can use OTF fonts instead?

    Or if i can get free CJK fonts in bundled JAR , so i can deoploy in my Web APP directly.

    Thanks In Advance.

    #30046

    You may use free FontForge tool to convert OTF to TTF.

    If you familiar with Python programming, you may also use the simple script
    https://github.com/fonttools/fonttools/blob/master/Snippets/otf2ttf.py

    #30050

    Hi,

    I have downloaded NOTO CJK OTF fonts (https://www.google.com/get/noto/help/cjk/) and converted into TTF from https://convertio.co/.

    But when i was using the following command the pd4fonts.properties was not generating any entries for the fonts.

    ==== Mac cmd prompt out put start ==================

    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont
    bash-$> pwd
    /cawork/pdf/pdffont

    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont
    bash-$> ls /fonts
    NotoSansCJKjp-Black.ttf NotoSansCJKkr-Bold.ttf NotoSansCJKsc-DemiLight.ttf NotoSansMonoCJKjp-Regular.ttf
    NotoSansCJKjp-Bold.ttf NotoSansCJKkr-DemiLight.ttf NotoSansCJKtc-Black.ttf NotoSansMonoCJKkr-Bold.ttf
    NotoSansCJKjp-DemiLight.ttf NotoSansCJKkr-Light.ttf NotoSansCJKtc-Bold.ttf NotoSansMonoCJKkr-Regular.ttf
    NotoSansCJKjp-Light.ttf NotoSansCJKkr-Medium.ttf NotoSansCJKtc-DemiLight.ttf NotoSansMonoCJKsc-Bold.ttf
    NotoSansCJKjp-Medium.ttf NotoSansCJKkr-Regular.ttf NotoSansCJKtc-Light.ttf NotoSansMonoCJKsc-Regular.ttf
    NotoSansCJKjp-Regular.ttf NotoSansCJKkr-Thin.ttf NotoSansCJKtc-Medium.ttf NotoSansMonoCJKtc-Bold.ttf
    NotoSansCJKjp-Thin.ttf NotoSansCJKsc-Black.ttf NotoSansCJKtc-Thin.ttf NotoSansMonoCJKtc-Regular.ttf
    NotoSansCJKkr-Black.ttf NotoSansCJKsc-Bold.ttf NotoSansMonoCJKjp-Bold.ttf pd4fonts.properties
    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont

    bash-$> java -jar pd4ml.jar -configure.fonts /cawork/pdf/pdffont/fonts/

    bash-$> cat fonts/pd4fonts.properties
    #this is an autogenerated file. please remove manually any references to copyrighted fonts
    #Mon Jul 31 15:35:50 PDT 2017

    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont
    bash-$>
    ==== Mac cmd prompt out put ends ==================

    #30051

    Hi,

    I have downloaded NOTO CJK OTF fonts (https://www.google.com/get/noto/help/cjk/) and converted into TTF from https://convertio.co/.

    But when i was using the following command the pd4fonts.properties was not generating any entries for the fonts.

    ==== Mac cmd prompt out put start ==================

    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont
    bash-$> pwd
    /cawork/pdf/pdffont

    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont
    bash-$> ls /fonts
    NotoSansCJKjp-Black.ttf NotoSansCJKkr-Bold.ttf NotoSansCJKsc-DemiLight.ttf NotoSansMonoCJKjp-Regular.ttf
    NotoSansCJKjp-Bold.ttf NotoSansCJKkr-DemiLight.ttf NotoSansCJKtc-Black.ttf NotoSansMonoCJKkr-Bold.ttf
    NotoSansCJKjp-DemiLight.ttf NotoSansCJKkr-Light.ttf NotoSansCJKtc-Bold.ttf NotoSansMonoCJKkr-Regular.ttf
    NotoSansCJKjp-Light.ttf NotoSansCJKkr-Medium.ttf NotoSansCJKtc-DemiLight.ttf NotoSansMonoCJKsc-Bold.ttf
    NotoSansCJKjp-Medium.ttf NotoSansCJKkr-Regular.ttf NotoSansCJKtc-Light.ttf NotoSansMonoCJKsc-Regular.ttf
    NotoSansCJKjp-Regular.ttf NotoSansCJKkr-Thin.ttf NotoSansCJKtc-Medium.ttf NotoSansMonoCJKtc-Bold.ttf
    NotoSansCJKjp-Thin.ttf NotoSansCJKsc-Black.ttf NotoSansCJKtc-Thin.ttf NotoSansMonoCJKtc-Regular.ttf
    NotoSansCJKkr-Black.ttf NotoSansCJKsc-Bold.ttf NotoSansMonoCJKjp-Bold.ttf pd4fonts.properties
    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont

    bash-$> java -jar pd4ml.jar -configure.fonts /cawork/pdf/pdffont/fonts/

    bash-$> cat fonts/pd4fonts.properties
    #this is an autogenerated file. please remove manually any references to copyrighted fonts
    #Mon Jul 31 15:35:50 PDT 2017

    sagar3mac1221:sagar:clarity trunk:/cawork/pdf/pdffont
    bash-$>
    ==== Mac cmd prompt out put ends ==================

    Question 1: Why the -configure.fonts utility is not working with the noto ttf fonts and not generating pd4fonts.properties
    Question 2: Is there anyway I can get some DEBUG information while running -configure.fonts utility.
    Questions 3: Eventually, i need a JAR file which I can place in my app lib folder to load these fonts for PD4ML, Can i just get a jar file with CJK font i can directly use in my java code to generate PDF ?
    Question 4: Assuming , somehow get the noto jar with ttf embedding , what should be the right replacement for the java method arguments?
    pd4ml.setDefaultTTFs(“Times New Roman”, “Arial”, “Courier New”); // current

    pd4ml.setDefaultTTFs(“NotoSansCJK”, “Arial”, “Courier New”); //Proposed??

    Please let me know if you need any more information.

    Thanks,
    Parag Sagar

    #30052

    @PD4ML – Please reply

    THX!

    #30047

    If the fonts are not listed in the .properties file, it seems they are still not in a compatible format. Did you try to convert them with a mentioned above Python script?

    Q2 more debug info will be available in forthcoming PD4ML v4
    Q3, Q4 it is possible. http://pd4ml.com/examples.zip contains chinese_ttf sample, which illustrates how to do that.

    See also http://pd4ml.com/cookbook/pd4ml_pdf_true_type_fonts.htm

    #30048

    following link does not work
    http://pd4ml.com/examples.zip

    Page is throwing Error

    No such file: /examples.zip

Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.