Questions tagged [getcontentaspdf]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
61 views

Generated Word document from VF Page and store it in salesforce

We have a visualforce page to enter notes. On button click, we have to store the page as a word document in salesforce. So we use the getter setter variable contentType to render the page as the word ...
0
votes
0answers
40 views

insert attachment getcontentaspdf not loading data dynamically

I have a method that call a vf page and render as pdf the following Pagereference test = new Pagereference ('/apex/claire'); return test; that gives me the page I am expecting after that the ...
0
votes
1answer
33 views

Salesforce VF - getContent() and getContentAsPdf() timeout

How to set extent default timeout for getContent and getContentAsPdf? Those are considered as callouts so I assume it should be possible to set timeout. We are using them to generate PDF files from ...
0
votes
1answer
52 views

Unknown Visualforce Error CompositeFont

I am getting an exception like below- System.VisualforceException: class sun.font.CompositeFont cannot be cast to class sun.font.PhysicalFont (sun.font.CompositeFont and sun.font.PhysicalFont are in ...
1
vote
1answer
248 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
291 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. ...
4
votes
1answer
272 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
130 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 ...
6
votes
2answers
2k 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
73 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
290 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 ...
2
votes
2answers
2k 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 ...
2
votes
1answer
4k 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
1answer
629 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 ...
0
votes
0answers
406 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
78 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 ...
0
votes
1answer
90 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
89 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
216 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 ...
2
votes
2answers
413 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
259 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 ...
2
votes
2answers
263 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" ...
5
votes
2answers
4k 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 ...
6
votes
2answers
294 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 ...
4
votes
1answer
621 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
2k 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 ...