1

I have the following code :-

<apex:page controller="ReportsController" showHeader="false" sidebar="false" title="Valve Sizing Data" name="Sizing Data" applyHtmlTag="false" renderAs="pdf">

The problem with it is that, when I open the page I only see a blank screen and no pdf file is downloaded nor page is rendered as a pdf.

I also have used css styling and other many other html tags in the page. The <link> and <style> tags are present inside the <head> tag.

Can any body help me with it?

  • Check if the controller is able to bind the data. Try to check the debug log. – RCS Jan 23 '17 at 6:12
  • Is the User you are using a conventional one that has a "Salesforce" or "Salesforce Platform" license? – Keith C Jan 23 '17 at 9:07
  • it is "Salesforce" liscence @KeithC – Anas Rashid Jan 23 '17 at 9:47
0

Key Requirement:

  • Your controller class is able bind your data with VF page.

And make changes in your code as per below snippet,

<apex:page controller="ReportsController" showHeader="false" sidebar="false" title="Valve Sizing Data" name="Sizing Data" applyHtmlTag="false" applyBodyTag="false" renderAs="pdf">
    <html>
        <head>
            <style>
                 //Code
            </style>
        </head>
        <apex:form >
              //Code
        </apex:form>
    </html> 
</apex:page>

Key Points:

  • Use showHeader="false"
  • Has both applyHtmlTag="false" and applyBodyTag="false"
  • Addition of <html></html> tags
  • Did that too. Same problem. – Anas Rashid Jan 23 '17 at 9:16

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.