I'm using this code now:

<apex:outputText rendered="{!NOT(ISBLANK(Description__c))}" value="{!Description__c}"/>

But sthis string is between another strings, and when I use this code, I'm getting just a blank string instead of deleting it completely. I don't need a space there. How can I implement it?

P.S. I'm working with renderAs="pdf".


You can make use of OutputPanel attribute

<apex:outputPanel rendered="{!(!ISBLANK(Description__c))}">
   <apex:outputText value="{!Description__c}"/>

If Description is null/empty this wouldn't be visible/no space would be displayed.

| improve this answer | |
  • Thank you. It works! – Apelsinova Oct 23 '19 at 11:50

You could try using an old plain html tag like this


If there's no description, the tag shouldn't show up.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.