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
İrem Günerİrem Güner 

Visualforce page cannot be called to salesforce1

We have created a visualforce page on a custom object (invoices) that is rendered as PDF to issue the invoice.Our code is

<apex:page standardController="Invoice1__c" showHeader="false" renderAs="pdf" language="tr">

<meta content="text/html; charset="utf-8" http-equiv="Content-Type" />
<table align="center" cellpadding="1" cellspacing="0" style="width: 640px;" table-border="1">
    <tbody>
        <tr>
            <td border-color="#000000" style="width: 400px; height: 245px;">
            
            </td>
            <td height:="" style="border-color=" text-align:="" width:="">
                &nbsp;</td>
        </tr>
// our main html code calling SFDC fields to page layout //

</apex:page>


pdf displays on desktop and fullsite view in any mobile device. However if I try to display the same page in the the Salesforce1 by calling the page from a custom button on my cusom object (invoices) page doesn't render and the animated circular fetch gif keeps moving. Screenshot below:

User-added image
The page never loads.

Creating an empty Visualforce page, with renderAs="PDF" also does not work in sf1.

When I press the back arrow on the app, the pdf shows just 1/4 of the pdf but it cant be scrolled to any direction and seems like a frozen image.

We appreciare any idea or feedback toresolve or workaround this problem

Regards
 
AshwaniAshwani
Look at the following link:
http://salesforce.stackexchange.com/questions/44206/visualforce-pages-in-object-specific-actions

I think Salesforce1 doesn't support render as pdf.

In the question the workaround done is that they get the pdf file by referencing to visualforce page by page.getContentAsPDF(); method and then store that pdf file in Attachment or Document.
After that they redirect user to that new created file using sforce.one.navigate (automated) or publisher action (manually).