4
votes
Accepted
Visualforce Page: How to display all the content/data in a single VF PDF page
I don't think you can force it to just a single page.
However, you can define a custom page size - and make it big enough that you never get a page break.
Something like this:
@page { size: 8.5in ...
3
votes
Accepted
Is it possible to call a LWC from Apex?
No, you can't execute JavaScript from Apex (at least, not without Functions). If you're trying to render a PDF on-demand, and it's not standard PDF rendering engine, you'll need to callout to another ...
3
votes
Accepted
Charts in Visualforce generated PDFs in early 2023
What worked for me...
Using external sites that generate images of charts based on URL parameters remains IMHO the simplest approach. Even the nominally deprecated Google Image Charts is still running....
2
votes
Accepted
Trouble loading PDF.js lib in LWC
When you do loadScript you need to point it to the .js file in your static resource, not just the folder name.
For example, instead of loadScript(this, pdfjs), you need to do loadScript(this, pdfjs + &...
1
vote
AppExchange to generate PDF of a record
Depending on your use case, you can likely do this without an app by creating a custom Visualforce page using renderAs="pdf".
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/...
1
vote
Accepted
How to generate e PDF in Apex from a VFP containing multiple aura components and attach it to an email
Per the Visualforce doc, PDF rendering is not supported if content is rendered by Javascript
PDF rendering doesn’t support JavaScript-rendered content.
You might need to refactor your Aura ...
1
vote
Visualforce CORS Error Even When Origin Is Whitelisted, Headers Are Also Set
I faced the same issue, so the workaround is to get the base64 blob value of the document from ContentVersion and call pdfjsLib.getDocument(). Check this https://mozilla.github.io/pdf.js/examples/
1
vote
I want to add image on Visualforce PDF but i cant change its size
apex:outputField has some extra layers between the field and the style, which is causing problems.
Try something like:
<style>
div.squareImage {
display: inline-block;
}
div.squareImage img {
...
1
vote
Visualforce pdf - only show footer on even pages
**The reason the footer was displaying with incorrect content is because we have to specify a footer (even if it's a blank one). I guess when you use running:footer, it will take the default footer if ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pdf × 646visualforce × 390
apex × 193
css × 65
renderas × 58
attachment × 50
html × 37
lightning-web-components × 34
email × 27
quote × 27
lightning-aura-components × 22
javascript × 22
blob.topdf × 18
lightning × 17
files × 15
images × 13
blob × 13
table × 12
community × 11
getcontentaspdf × 11
controller × 10
printpdf × 10
visualforce-component × 9
custom-object × 8
repeat × 8