Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Aug 05, 2022 1:42 am

Hi,

Thanks for your feedback.

Yes sure. I'll inform you in time when we release the maven version.
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Fri Dec 09, 2022 7:55 am

Hello,

Thanks for your patience!
Glad to inform you that we just released Spire.Doc 10.12.2 which fixes the issue with SPIREDOC-8031.
Please download the new version from the following links to test.
Website download link: https://www.e-iceblue.com/Download/doc-for-java.html

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Mon Jan 09, 2023 5:17 am

Hello, there was another problem when I used the version you answered.

When you make pdf, all the Korean letters overlap.

Is there a solution to this problem?

This is a problem that did not occur in the version of the bugfix that you posted on Google Drive.

crizen.solution
 
Posts: 14
Joined: Mon May 30, 2022 12:47 am

Mon Jan 09, 2023 9:49 am

Hello,

Thanks for your inquiry.
The cause of your problem is that the font (Gulim) used in word document is not embedded successfully in the result Pdf document, as shown in the screenshot below.
To avoid this issue, you can use the following code.
Code: Select all
String inputFile="data/before.docx";
String fontFile="data/gulim.ttc";
String outputFile="output/after_embedNoninstalledFonts.pdf";

Document document = new Document();
document.loadFromFile(inputFile);

//embed the non-installed fonts.
ToPdfParameterList parms = new ToPdfParameterList();
List<PrivateFontPath> fonts = new ArrayList<PrivateFontPath>();
fonts.add(new PrivateFontPath("Gulim", fontFile));
parms.setPrivateFontPaths(fonts);

//save the document to a PDF file.
document.saveToFile(outputFile, parms);


If you have any other issue, just feel free to contact us.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Tue Jan 10, 2023 2:13 am

Hello.
As you posted, as a result of implementing the code by receiving the rolling body file and entering the path, the tilt phenomenon occurred as it was. I'll include a screenshot and upload it.

Below is the usage code.

Code: Select all

ToPdfParameterList ppl = new ToPdfParameterList();
            ppl.isEmbeddedAllFonts(true);
            List<PrivateFontPath> fonts = new ArrayList<PrivateFontPath>();
            fonts.add(new PrivateFontPath("Gulim", getClass().getClassLoader().getResource("gulim.ttc").getPath()));
            
            ppl.setPrivateFontPaths(fonts);
            
            doc.saveToFile(filePath+type.getCode(), ppl);


crizen.solution
 
Posts: 14
Joined: Mon May 30, 2022 12:47 am

Wed Jan 11, 2023 6:51 am

Hello,

Thanks for your feedback.
I used your code to test your scenario, I can get the correct pdf file. Did you encounter any exceptions during the execution?

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.Doc