Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [getcontentaspdf]

The tag has no usage guidance.

1
vote
1answer
34 views

Page getContent / getContentAsPDF not retrieving the updated data

I'm able to get all the data by calling the Page.getContentAsPDF() function by selecting all the record from Account object. Basically, I'm loading the pdf content based on query from page ...
1
vote
0answers
102 views

PageReference for quote/quoteTemplateDataViewer as PDF is blank

I'm having trouble getting a PDF when using a PageReference to the quoteTemplateDataViewer. This class is creating a QuoteDocument on the Quote record, but the contents of the document are blank. ...
3
votes
1answer
147 views

Generating a PDF from a Lightning Page with LockerService restrictions

I'm trying to generate a PDF from a Lightning Page using jsPDF. When I use the addHTML function in jsPDF I get an error (but only if locker service is enabled). The problem is in the use of ...
1
vote
0answers
58 views

Style codes appear on using getContentasPDF

I am trying to insert a pdf on click of a button using the getContentasPDF method. The page which has to be rendered is the page I'm redirecting to. I'm pasting the partial code - PageReference ...
5
votes
2answers
821 views

Programmatically generate Quote PDF in Lightning Component Apex controller

I'm trying to programmatically generate and insert a Quote PDF, given a Quote Id and a Template Id, within an @AuraEnabled method in my Lightning component's server-side controller. (N.b. - the ...
0
votes
1answer
59 views

Cache value not being saved in Org from Async call

I have a batch call that calls a queuaeble that calls a future call which utilizes a visualforce page 'getContentAsPdf' function. Also in this queuable call I set a custom class value to a local ...
1
vote
0answers
172 views

PDF generation failed. Check the page markup is valid.- Occurred when using getContentasPDF

I have a VF page, where I am not using renderas "PDF". In the single email messaging method of Controller, I am using the Attachment as pdf of the VF page. I used getContent() function which ...
1
vote
1answer
2k views

Regex including curly brackets

I have an e-mail processing class which takes the HTML content of e-mails, and stores them in rich text fields to be later rendered as PDF's to be printed via VisualForce. However, the e-mails ...
0
votes
0answers
307 views

Not able to save quote document as pdf display from the visualforce page

I have one visualforce page called : QuoteDetail. This page have button called : Generate PDF. This Generate pdf open up a popup with selection (checkboxes) 1. Remove items with no quantity 2. Show ...
1
vote
0answers
57 views

PDF isn't rendered using apex class on community site

I have a community site with some partner users on it, and there's a specific record that I want to make available to render as PDF and be saved as attachment on the same record. Rendering the PDF ...
1
vote
2answers
791 views

PageReference.GetContentAsPDF throws Internal Salesforce.com Error

The PageReference.GetContentAsPDF method throws an internal Salesforce.com Error when there is a problem generating the page. i.e. when an exception is thrown in the controller. This makes it very ...
0
votes
1answer
59 views

apex:repeat render as pdf cant format based on css tags for table or td or th or span

.bPageBlock .pbBody table { min-width: 90% !important; max-width: 90% !important; width: 90% !important; margin: 0 auto !important; } .bPageBlock .pbBody td { width: 45% !...
1
vote
1answer
62 views

getContentAsPDF() SOQL has no rows

I have a problem. I need to get pdf and attach it to object. I create object (and for test I execute query - it's ok), get ID and put it to page as parametr: PageReference pdfPage = Page....
1
vote
1answer
152 views

How to render page as PDF in a seperate subtab

I'm looking for a way to open a new subtab in the service console that renders an existing form as a PDF prior to saving the form and without storing the PDF in Salesforce. I managed to work out how ...
1
vote
2answers
249 views

Why am I not able to get full 60 second CPU time in @future method with getContentAsPDF()

I'm trying to generate a PDF, and in normal Apex execution the function is haulted due to CPU timeout (exceeding 10 second execution time). So I tried using @future annotation to use Asynchronous ...
1
vote
1answer
173 views

How to change the design of the exported Excel or PDF files?

I'm providing an export links to export some result into a PDF or Excel files. The tables, in the exported files, don't look that good and I had tried to add some style to my VF page but it didn't ...
3
votes
2answers
197 views

displaying the vf page details as pdf

I am trying to coverting vf page as pdf format,for that am usinf contentType="application/pdf" <apex:page standardController="Opportunity" extensions="PDFcontroller" ...
0
votes
1answer
482 views

Increase PDF height to show in one page

I have an HTML used Apex page which has renderas PDF tag for PDF conversion. But the content is too long and coming in two pages. I need to keep it in one Page. Can someone suggest a solution? Apex ...
5
votes
2answers
3k views

How would I create a PDF in salesforce on any object WITHOUT using ANY code [closed]

Business case - So I have to create invoices (not quotes) in PDF format from opportunities that contain a whole lot of account and opportunity object fields. I dont want to use VF or in-fact any ...
5
votes
2answers
227 views

How to mix getContentAsPDF calls with DML?

This critical update: PageReference getContent() and getContentAsPDF() Methods Treated as Callouts will be auto-activated in January 2016. We have some code that uses a queue of custom event ...
3
votes
1answer
503 views

PDF Generation Salesforce

I'm kinda stuck in the middle of all the limitations Salesforce has for creating a pdf out of a Visualforce page. What I have is a Visualforce page that takes some parameters and I use to rerender as ...
10
votes
2answers
1k views

GetContentAsPDF from Batch Apex and Trigger fails with new Update

[Salesforce Update] The critical update named “PageReference getContent() and getContentAsPDF() Methods Treated as Callouts” was scheduled for auto-activation in Winter ’16. To allow for planning ...