[CONFSERVER-16833] Long words fail to wrap in PDF exports Created: 09/Sep/2009  Updated: 17/Feb/2017  Resolved: 25/Oct/2010

Status: Resolved
Project: Confluence Server
Component/s: Page - Export / Import
Affects Version/s: 3.0, 3.0.1, 3.0.2, 3.1
Fix Version/s: 3.4.1

Type: Bug Priority: Medium
Reporter: Gurleen Anand Assignee: Stefan Saasen
Resolution: Fixed Votes: 17
Labels: affects-server, bugfix_support_backlog, export-page/space, pdf-generation, pm_review
Remaining Estimate: 5h
Time Spent: 7h
Original Estimate: 12h

Attachments: PDF File PUBLIC-589889-202517-20.pdf     PDF File Sample_Linebreaks.pdf     File confluence-flyingpdf-plugin-1.12.jar    
Issue Links:
is duplicated by CONFSERVER-18590 Multi-byte long statement is cutoffed... Resolved
is duplicated by CONFSERVER-20592 long page title is cut in PDF export Resolved
is related to CONFSERVER-21976 Long words (eg in Chinese) are still ... Resolved
is related to CONFSERVER-21295 Long words in embedded Office documen... Resolved
is a regression of CONFSERVER-6738 Long words fail to wrap in PDF exports Resolved
has a regression in CONFSERVER-24533 Long words fail to wrap in PDF export Resolved
Last Touched By: Owen Sanico
Last commented: 7 years, 49 weeks, 6 days ago
Internal Complexity: 4
Internal Value: 5
Don Willis, Mark Hrynczak


Original Description

Long words are being cut off in a PDF export.
Please review the screenshot for more details.

Atlassian Status

This issue has been fixed in version 1.12 of the Confluence PDF Export plugin.

Note: In order to break long words in the PDF export a selector containing the word-wrap property with a value of break-word has to be added to the PDF stylesheet:


For example:

div {  
    word-wrap: break-word;  

Comment by Jabir Mahammad [ 31/Dec/2009 ]

We have the same issue with confluence 3.0.2. Please fix this ASAP.

I have a page with Chinese contents and when I do export to PDF, the page contents did not get wrapped and the contents were truncated. However this is not the case with contents in english language.
I have seen the issue "http://jira.atlassian.com/browse/CONF-6738" where it says the issue is fixed with confluence2.6.

I am using confluence 3.0.2 and the issue is still there for foreign characters.
Please advise how to get through this.

Comment by Partha Kamal [ 12/Jan/2010 ]

From support case:

If confluence fail to wrap long text in PDF exporting, it would be no use for chinese users to use the wiki system for pubulishing documents to the others. Please help to resolve this issue soon.

In my imagine,the issue didn't present in some earlier version of confluence.

This issue is affecting several of our customer instances located in Asian Locale (e.g. Japan, China).

As most of instances are managed by our partners, this issue has less votes then it should.

Comment by Joshua Tjhin (Inactive) [ 13/Jan/2010 ]

A fix for this issue is unavailable yet since we use Flying Saucer's xhtml renderer which doesn't support word-breaking.

See https://xhtmlrenderer.dev.java.net/issues/show_bug.cgi?id=191

Comment by Daisuke Miyamoto [ 16/Feb/2010 ]

This occured in Not only Japanese, but also English. (as attachement)

This wiki markup source is following.



Adolph Blaine Charles David Earl Frederick Gerald Hubert Irvin John Kenneth Lloyd Martin Nero Oliver Paul Quincy Randolph Sherman Thomas Uncas Victor William Xerxes Yancy Zeus Wolfe­schlegelstein­hausenberger­dorffvoraltern­waren­gewissenhaft­schaferswessen­schafewaren­wohlgepflege­und­sorgfaltigkeit­beschutzen­von­angreifen­durch­ihrraubgierigfeinde­welche­voraltern­zwolftausend­jahres­vorandieerscheinen­wander­ersteer­dem­enschderraumschiff­gebrauchlicht­als­sein­ursprung­von­kraftgestart­sein­lange­fahrt­hinzwischen­sternartigraum­auf­der­suchenach­diestern­welche­gehabt­bewohnbar­planeten­kreise­drehen­sich­und­wohin­der­neurasse­von­verstandigmen­schlichkeit­konnte­fortplanzen­und­sicher­freuen­anlebens­langlich­freude­und­ruhe­mit­nicht­ein­furcht­vor­angreifen­von­anderer­intelligent­geschopfs­von­hinzwischen­sternartigraum, Senior


Comment by Kenichiro Tanaka [ 17/May/2010 ]

It seems this issue is also related to Flying Saucer's issue below.

Comment by Kenichiro Tanaka [ 19/May/2010 ]

This issue is serious for me, so I'd like to try to fix it.
First I just replaced xhtmlrenderer jar in confluence-flyingpdf-plugin-1.7.jar by Flying Saucer R8', and uploaded to Confluence.
And exporting pdf, I got this error:

javax.servlet.ServletException: Servlet execution threw an exception
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)

caused by: java.lang.NoSuchMethodError: org.xhtmlrenderer.pdf.ITextFontResolver.addFont(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;)V
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.useCustomFontIfConfigured(FlyingSaucerXmlToPdfConverter.java:163)

Which version of Flying Saucer is used in confluence-flyingpdf-plugin?

Comment by Walter Scott [ 25/May/2010 ]

I am seeing a problem with long URLs causing all of the content in the column it occupies (within a table) to be cut off as well. Basically, it seems to push the column's right edge off the edge of the screen so text naturally flows over into that large space and gets cut off. Is that the same problem being reported here, or should I open another issue?

Comment by Henry Zhang [ 12/Oct/2010 ]

I am glad to seeing that this bug will be fixed on v3.4.1, that's a good news to chinese Confluence customers.
Thanks for Atlassian's support.


Comment by Stefan Saasen [ 13/Oct/2010 ]

Version 1.12 of the Confluence PDF export plugin: http://jira.atlassian.com/secure/attachment/41304/confluence-flyingpdf-plugin-1.12.jar

This version contains the backported fix for the issue reported in https://xhtmlrenderer.dev.java.net/issues/show_bug.cgi?id=191

Comment by Stefan Saasen [ 13/Oct/2010 ]

Version 1.12 of the Confluence PDF Export plugin contains a fix for this problem (the backported fix for issue #191 of the Flying Saucer library).

I attached the plugin jar to this issue.

In order to break long words in the PDF export a selector containing the word-wrap property with a value of break-word has to be added to the PDF stylesheet:


For example:

div {  
    word-wrap: break-word;  
Generated at Tue Sep 18 16:33:55 UTC 2018 using Jira 7.12.0-m0004#712001-sha1:06771438b07e15387c90fa781692d0e5cc365e4d.