0

I am trying to view this visualforce as a PDF when it simply shows the page titled and remains blank. The page displays fine when viewed in the browser but I have now created a second Custom Button to open up a 2nd Visualforce page that simply lets the user Save a copy of the PDF to related record.

The error simply looks like this; the "pdftest" is the name of the page:

PDF Error page

It only contains a few lines of text:

  <apex:page renderAs="pdf" >
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page: pdftest
  <!-- End Default Content REMOVE THIS -->
</apex:page>

I am using Jeff Douglas's sample code here but with getContentAsPDF().

4
  • 1
    Remove the development mode toolbar by clicking on the X or whatever closes it on the right side of the bar. It can mess with things. Once removed refresh and see if it works.
    – Eric
    Jan 29, 2017 at 16:34
  • Your absolutely right - thanks (create an answer and i'll tick it). I presume there is no workaround as the development mode has it's uses... Jan 29, 2017 at 16:39
  • done............
    – Eric
    Jan 29, 2017 at 16:49
  • If the answer solved your problem please mark as accepted so others looking for answers to a similar question can find questions with answers...
    – Eric
    Jan 30, 2017 at 1:00

1 Answer 1

5

Remove the development mode toolbar by clicking on the X or whatever closes it on the right side of the bar. It can mess with things

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .