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:

      http://confluence.atlassian.com/display/DOC/Editing+the+PDF+Stylesheet

      For example:

      div {  
          word-wrap: break-word;  
      }
      

        1. confluence-flyingpdf-plugin-1.12.jar
          3.59 MB
        2. PUBLIC-589889-202517-20.pdf
          30 kB
        3. Sample_Linebreaks.pdf
          15 kB

            [CONFSERVER-16833] Long words fail to wrap in PDF exports

            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:

            http://confluence.atlassian.com/display/DOC/Editing+the+PDF+Stylesheet

            For example:

            div {  
                word-wrap: break-word;  
            }
            

            Stefan Saasen (Inactive) added a comment - 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: http://confluence.atlassian.com/display/DOC/Editing+the+PDF+Stylesheet For example: div { word-wrap: break -word; }

            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

            Stefan Saasen (Inactive) added a comment - - edited 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

            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.

            Henry

            Henry Zhang added a comment - 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. Henry

            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?

            Walter Scott added a comment - 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?

            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?

            Kenichiro Tanaka added a comment - 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?

            It seems this issue is also related to Flying Saucer's issue below.
            https://xhtmlrenderer.dev.java.net/issues/show_bug.cgi?id=206

            Kenichiro Tanaka added a comment - It seems this issue is also related to Flying Saucer's issue below. https://xhtmlrenderer.dev.java.net/issues/show_bug.cgi?id=206

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

            This wiki markup source is following.

            じゅげむじゅげむごこうのすりきれかいじゃりすいぎょのすいぎょうまつうんらいまつふうらいまつくうねるところにすむところやぶらこうじのやぶこうじぱいぽぱいぽぱいぽのしゅーりんがんしゅーりんがんのぐーりんだいぐーりんだいのぽんぽこぴーのぽんぽこなーのちょうきゅうめいのちょうすけ

            http://ja.wikipedia.org/wiki/%E5%AF%BF%E9%99%90%E7%84%A1

            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

            http://en.wikipedia.org/wiki/Wolfe%2B585,_Senior

            Daisuke Miyamoto added a comment - This occured in Not only Japanese, but also English. (as attachement) This wiki markup source is following. じゅげむじゅげむごこうのすりきれかいじゃりすいぎょのすいぎょうまつうんらいまつふうらいまつくうねるところにすむところやぶらこうじのやぶこうじぱいぽぱいぽぱいぽのしゅーりんがんしゅーりんがんのぐーりんだいぐーりんだいのぽんぽこぴーのぽんぽこなーのちょうきゅうめいのちょうすけ http://ja.wikipedia.org/wiki/%E5%AF%BF%E9%99%90%E7%84%A1 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 http://en.wikipedia.org/wiki/Wolfe%2B585,_Senior

            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

            Joshua Tjhin (Inactive) added a comment - 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

            Partha added a comment -

            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.

            Partha added a comment - 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.

            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.

            Jabir Mahammad added a comment - 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.

              ssaasen Stefan Saasen (Inactive)
              ganand Gurleen Anand [Atlassian]
              Affected customers:
              17 This affects my team
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 12h
                  12h
                  Remaining:
                  Time Spent - 7h Remaining Estimate - 5h
                  5h
                  Logged:
                  Time Spent - 7h Remaining Estimate - 5h
                  7h