function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
eswarieswari 

Content missing in PDF

Hi,

 

I am trying to download a pdf report and able to do that using renderAs pdf in <apex:page>.

 

However, in the pdf downloaded some of the content in a line which goes beyond the pdf page length is missing.

I tried by including the word-break and break-wrod css styles for the content and still I am unable to resolve the issue.

 

Could anyone help me regarding this.

_Prasu__Prasu_

Try adding those text under the DIV tag and setting the fixed width to them, allow wrapping of text from CSS.

eswarieswari

Hi,

 

Thanks for the reply.

 

I am able to fix the width of the column but however if the word length is more than the fixed width it is not getting wrapped into next line and is invisible.

 

I used word-wrap:break-word;word-break:break-all; in css but still not working.

 

Could you please help on this.

z_harika88z_harika88

Hi Prasanna,

 

We have used the DIV tag with some CSS styles to wrap the text in the PDF generated using visualforce page.

But the text is not wrapped. Please let me know if there is any other workaround.

 

Thanks,

Harika.

cloudlesscloudless

Did you ever get a reply or figure this out?

 

When I render as pdf, there is no break to long words.  If I display as HTML, then it appears properly by breaking the long word.  This happens within <td> or <div>

 

Here is example class for the div (works fine if html, but not if rendered as pdf)

.output {
width:400px;
word-wrap: break-word;
}