Questions tagged [getcontentaspdf]
It returns a visualforce Page Reference in PDF form - base64 encoded binary data
43
questions
0
votes
0
answers
14
views
Create PDF Returns Accurate Preview but PDF Lacks Data
I am an Admin user for our SalesForce org, and the only user experiencing this issue. Users of both different and the same profile type are not experiencing this, which leads me to believe it is not ...
1
vote
0
answers
23
views
Change the locale of Quote PDF
We have a problem in my org related to the locale and the creation of the Quote PDF.
We have 2 offices ("Europe" and "America") for the Quote object, specified in the Office (...
0
votes
0
answers
52
views
Visualforce Page not opening for a profile
I have a VF page that I am rendering as PDF, and we need to call it from an apex future method.
For testing, we got the URL parameter and checked through direct URL.
For 1 of the profiles, we are able ...
0
votes
0
answers
97
views
get pdf from external url
In the response from 3rd party I am getting url, I want to grab that url and save that pdf in a salesforce object.
If I manually use that url and paste in browser it downloads the file. But when I use ...
0
votes
0
answers
144
views
Workaround for URL limit error of maximum 4096 characters when rendering VF page as PDF
I have a class createPDF which is called by a flow. When a new case is created the flow runs passes only Id of the case and this class recovers the necessary fields and creates a page reference to ...
0
votes
1
answer
108
views
Dynamic page numbering when generated pdf through vf page using Render as PDF
We are generating PDF using render as PDF in VF page, now we have requirement for dynamic page number on generated PDF. for example page number should start from 30 and end at 35 i.e 6 pages. If ...
1
vote
1
answer
43
views
How can we access visualforce page for pdf generation from a future annotated method
I have a future annotated method which should generate a pdf in PdfController, the method is as below:
@future(callout=true)
public static void savePdfAsAttachment(Id applicationId){
PageReference ...
1
vote
1
answer
441
views
Create Pdf from visualforce page with button
I create a PDF with button at the account record. That works good, but now I want to pass information from the account record into my visual force. I tried it, see below, but the (AName) account name ...
0
votes
0
answers
72
views
How to save Visualforce page via button
I have a button that generates a VF PDF page for a resume builder. The resume is built from records in Salesforce that are related to a record on a Record Detail Page. When I click on the button I ...
2
votes
1
answer
2k
views
Trying to show PDF in Lightning web component in iFrame but it does not render the PDF file
I am trying to display a pdf file using Base64data in the Lightning Web component, the PDF Viewer renders but it does not get the PDF file in it.
here's my HTML:
<template if:true={showModal}>
...
1
vote
0
answers
236
views
Tables in visualforce page renderAs Pdf are moving to the top of the page
I am rendering a html code as pdf in visualforce page. But the tables in the page are going to the TOP. If I remove renderAs="pdf" and check the VF page, everything looks fine. Please advice....
2
votes
0
answers
45
views
How to take input in a VF page that also needs to be rendered as a PDF with the help of getContentAsPDF()?
I have a table on a VF page that displays 3 columns.
Last column of the table is defined as follows:
<apex:column headerValue="New Value">
<apex:inputText value="{!...
1
vote
0
answers
312
views
How to adjust column widths in Visualforce to PDF email attachment?
I wish to send a visualforce page as an email PDF attachment to user. The problem I am facing is that the columns don't fit in the PDF. Hence I sent the PDF in landscape mode. After that, some extra ...
0
votes
1
answer
373
views
How can a VF page be attached to an email as a pdf attachment in landscape format?
I have a requirement where I have to send a VF page as a pdf email attachment to user. The problem is that a table present on the VF page has many columns and they don't fit in the pdf attachment.
All ...
0
votes
1
answer
245
views
How to create a table in VF page that will appear as standard table and can also be emailed as a pdf attachment?
I wish to create a VF page that displays a table of data to users. If the user clicks on the 'Email' button on the VF page, the table of data should get emailed to the user in PDF format.
I ...
5
votes
2
answers
405
views
Marketing Cloud Email Archival as PDF to FTP
I came across a requirement where I need to archive the email sent to customer as PDF onto a different Archival platform.
I currently have the preview links synced to Salesforce, which expires after ...
0
votes
1
answer
559
views
Generate Quote PDF via Apex returns blank
I am trying to automate the generation of quote pdfs. I have found a really nice blog entry on that topic here: https://automationchampion.com/2020/06/23/getting-started-with-process-builder-part-97-...
0
votes
2
answers
35
views
Salesforce Visualforce Update Timing issue?
I have a Visualforce page (Call VF1) which does some processing and updates a Custom object (Sales_Prints__c). After updating the sales_prints__c on VF1 I need to call another visualforce page (Call ...
0
votes
0
answers
145
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
1
answer
216
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
1
answer
80
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 ...
2
votes
1
answer
2k
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
0
answers
695
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
1
answer
485
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
0
answers
267
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 ...
9
votes
2
answers
5k
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
1
answer
194
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
0
answers
579
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 ...
4
votes
1
answer
13k
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
0
answers
678
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 ...
3
votes
0
answers
201
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 ...
2
votes
2
answers
4k
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
1
answer
146
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
1
answer
152
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
1
answer
329
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
2
answers
866
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
1
answer
403
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
2
answers
467
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
1
answer
1k
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
2
answers
5k
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
2
answers
501
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
1
answer
793
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
2
answers
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 ...