New answers tagged

0

Check the page's API version. In my case, the apex code took about 1 sec of CPU time, and the generating of the PDF itself took almost 18 seconds. I found out that it uses an old api version (27). i updated it to 48 and it soved the problem.


0

Oh dear, there is no issue in creating the respective PDFs. With document preview, a PDF file is generated and then left to the browser to render it. If you click on a saved PDF, Salesforce renders a preview image. This preview image is not rendered correctly, looking like boldness looks the same.


2

I made a "Content Document" so I could then create a public link and use it in the front: public class PX_IRN_PDF_CTR { @AuraEnabled public static String generaPDF( Id accId1){ String url = '/apex/PX_IRN_PAGE?id=' + accId1; PageReference pageRef = new PageReference(url); Blob ret = pageRef.getContentAsPDF(); String ...


1

Ensuring the footer doesn't appear on the last page should be possible with @page and Named Pages in your CSS. Unfortunately there's no :last psuedo-selector for @page, otherwise that would get the job done. First, add some CSS for your last page: div.lastPage { page: lastPage; /* This assigns the name, basically, if this class appears, then this ...


0

Check critical updates for 'Lightning Experience Honors Target Values for Hyperlinks in Formula Fields' Also you should use <apex:page renderAs="pdf"> instead of your JS approach. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_renderas_pdf.htm


0

From Setup, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages. Click Edit for the page you want to make available for your community. Select Available for Salesforce mobile apps and Lightning Pages and click Save. https://developer.salesforce.com/docs/atlas.en-us.community_templates.meta/community_templates/...


Top 50 recent answers are included