Using groupdocs converter 22.8 version to convert chinese or kanji text file results in blocks in pdf file.
kanjiconversion.zip (26.6 KB)
Using groupdocs converter 22.8 version to convert chinese or kanji text file results in blocks in pdf file.
kanjiconversion.zip (26.6 KB)
Please take a look at these PDF results.zip (16.9 KB). We cannot reproduce this issue at our end.
Make sure that the font is installed on your machine. Could you please share all details regarding your development or deployment environment? Could you please also share a list of installed fonts on the machine? Also share the conversion code.
I thought groupdocs is automatically handling that. I do not have any fonts installed in my local machine or on liberty server. Can you please guide me how to install fonts in local machine or in WebSphere liberty server?
Installing Fonts on a Local Machine:
Installing Fonts in WebSphere Liberty Server:
<library id="fontLibrary">
<fileset dir="${server.config.dir}/fonts" includes="*.ttf"/>
</library>
Remember to ensure that the fonts you install are properly licensed for use in your environment.
@atir.tahir
can we have 'fonts ā directory outside of ${server.config.dir} like may be /usr/share/fonts location (having rwx permissions)?
Is it mandatory to add files/fonts directory insides the serverās installation directory?
We have getFontDirectories()
in ConverterSettings
class. Please take a look at the API references. You can specify custom font directories.
@atir.tahir
In my case, font directory will be having only double byte character fonts like CJK (Chinese, Korean, Japnese).
Will passing font directory to converter work in other cases where CJK fonts not there?
Does above code look good?
It is expected to work fine. You can try the conversion by passing the font directory, and if the issue persists, kindly let us know. As demonstrated in this message, we were able to successfully convert the source file to PDF.
@atir.tahir : Above test failed. Groupdocs Converter unable to find the fonts set in particular location i.e. ā/managefiles/additional-server-files/fontsā directory. After conversion, pdf file still showing blocks.
Installing fonts locally worked for me too but on server by passing font directory it failed.
Can you please take a look on your end.
@Ash_pot
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CONVERSIONJAVA-2068
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Weāll let you know if any further details are required.
@atir.tahir:
Do you have steps to Install fonts in Weblogic Server? like the steps for installing fonts in local machine and on webSphere Liberty, as you provided in earlier post.
Installing fonts in WebLogic Server is a bit different from WebSphere Liberty Server. In WebLogic Server, you typically donāt install fonts directly within the serverās configuration. Instead, you can make fonts available to your web applications deployed on WebLogic Server. Hereās how you can do it:
Prepare Your Font Files:
Obtain the font files you want to install in a format like .ttf or .otf.
Place Fonts in a Directory:
Create a directory where you will store your font files. This can be on the server or any other location accessible to your application. For example, you can create a directory called āfontsā within your web applicationās directory.
Configure Font Path in Your Application:
You need to configure your web application to look for fonts in the directory where you placed them. This can be done in your web applicationās code or configuration. For example, in a Java web application, you can set the font directory using a system property or configuration file.
Use the Fonts in Your Application:
Once you have configured the font directory in your application, you can use these fonts in your applicationās CSS or HTML files. Specify the font names in your CSS styles.
Deploy Your Application:
Deploy your web application to WebLogic Server as you normally would. Make sure the fonts directory is included in your application package if itās not located on the server itself.
Restart WebLogic Server (if necessary):
If you made changes to your web application or server configuration, you might need to restart WebLogic Server for the changes to take effect.
Test the Fonts:
Verify that the fonts are working as expected in your web application. You can do this by accessing your application through a web browser and checking that the specified fonts are being used.
Remember that WebLogic Server itself doesnāt have a specific mechanism for installing fonts like some other software platforms. Instead, fonts are typically managed and used within the context of your web applications running on the server.
Please note that the steps we provided are the standard approach for making fonts available to web applications deployed on WebLogic Server. However, depending on your specific use case and requirements, there may be some alternate steps.
@atir.tahir:
I also encountered the same problem.
But adding fonts to the system is not allowed on my server.
I am trying to add a font directory through the ConverterSettingsProvider. However, as it is a jar package, the fonts directory under resource cannot be found. Have you encountered similar problems and proposed solutions? Or can I import fonts by passing in InputStream?
You can only set custom font folder. And this folder can be anywhere in the storage (e.g. not needed to be a system folder).
Please take a look at the following API references:
@atir.tahir:
Thank you very much for your answer
I know this API, but my situation is that my font folder can only be placed in one zip file (. jar). Is there anything I can do about this situation?
like :
image.png (2.2 KB)
Or can you tell me how you find the font folder in your code?
by new File(String) ?
Itās an internal ticket, and weāll keep you informed of any developments. The latest update suggests extracting the fonts to the temp folder and utilizing them. The key question is, do you have the necessary access to the temp folder? Currently, this is the only solution supported by the API.
@atir.tahir:
Due to some special reasons, these fonts are saved in a zip file and cannot be decompressed. So we canāt give a file path as usual.
I can ensure that I have access to the zip file