Abnormal accumulation when converting java-word to pdf

*. When converting word to pdf in java development, there will be a messy typesetting of text unexpectedly wrapping

Problem : The content of the text editor is incompatible with the style pasted from word, which leads to confusion

Guess : When the pdf is formed, since the number of characters in each line of the pdf is constant, then when the sum of the number of Chinese characters, the number of digital characters, punctuation, etc. in the line exceeds or is less than the rated number, it will cause a forced line break when generating the pdf, thus lead to typo

Solution : Just add a space near the unexpected line break

Summary : When converting pdf, the problem will occur because the number of characters such as Chinese and English numbers in the current line exceeds or is less than the constant number of characters in the line. The temporary solution is to manually add spaces.

           The ultimate solution is to study the source of source code tracing - this method is to be determined. I hope that the provider who provides the pdf generation tool can notice the problem and make up for the problem caused by the exception. Of course, if I have more than my ability, I will try my best. for.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326978159&siteId=291194637