4
votes
Render PDF Blob data in visualforce page
Although this post is old, I came across the same problem and found a solution. As @jkraybill mentioned above, Visualforce will not emit binary data. This means we can't retrieve a Blob from ...
3
votes
Generate and download PDF file from Base64 Encode String
I've solved the problem. Here is the change in client-side controller:
let element = document.createElement('a');
element.setAttribute('href', 'data:application/pdf;base64,' + response);
element....
3
votes
Alternative to renderas PDF for converting an HTML to PDF in apex
There are a number of AppExchange packages that can generate a PDF using a template- Conga, Drawloop, and Thunderhead are three well known ones. Generally these templates are built in Word or another ...
2
votes
Accepted
Alternative to renderas PDF for converting an HTML to PDF in apex
Although certainly not the only culprits to mucking up a straight-forward conversion from a VF markup to PDF using the "renderAs" tag... I would carefully review all your CSS or other style markups, ...
2
votes
I need to format the content of the PDF attachment on my trigger
As a sample I used an existing page rendered as PDF and wrote a little method to show how this could be done for you. It is very simple. Just to illustrate i also took some screenshots for you.
Page ...
2
votes
Accepted
How to save Renderas='pdf' in files folder
By using getContentAsPDF, you can get a visualforce's page content as a pdf, regardless of the pages renderAs attribute.
You won't be able to perform DML on the file object directly, since its a ...
2
votes
Accepted
Why am I not getting coverage for my attacmentclass
This is because you din't create class instance and called the class method.
As this is a extension class and not a trigger handler class so you need to manually call them from your test class
...
2
votes
Accepted
Download as PDF
You can transfer the results back to the client, then initiate a download.
// client code
let action = component.get("c.orderRecord");
action.setParams({ OrderRecId: recordId });
action.setCallback(...
1
vote
How to open a save as dialog from javascript?
Generally speaking, modern web technologies do not allow you to manipulate the end-user's browser experience. Whether or not a "Save As" dialog pops up is a decision set by each user at the ...
1
vote
System.InvalidParameterValueException: An error occurred while parsing the input string - Blob.toPdf
Using the developer console this generates a System.InvalidParameterValueException:
Blob b = Blob.toPdf('');
and the InboundEmail Class documentation says the HTML form may not always be present:
...
1
vote
Unable view the attachment saved as pdf Blob
Just adding as answer so that can help others:
Base64 input string was not complete and was causing faulty input blob.
After fixing it, EncodingUtil.base64Decode worked as expected.
1
vote
Accepted
Contentversion getBodyAsBlob issue
You have skipped the extension part in Contentversion. You need to give file title name with extension.
cv.title = Sample+'.pdf';
ContentVersion
1
vote
Read any kind of attachment and display it as PDF
Yes you can, but you have to create a custom VF page that show the attachment, once you have that VF ready with its controller, you only need to render that page as a PDF.
You can achieve that with ...
1
vote
HTML Page renderas PDF misplaces alignments
I believe the pdf rendering engine struggles a bit with some CSS styles, which can make normal "modern" positioning using divs and floats inconsistent.
I find for this use case its better to strip ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
blob.topdf × 38apex × 20
pdf × 18
visualforce × 8
attachment × 7
blob × 7
lightning-web-components × 4
email × 4
javascript × 3
iframe × 3
lightning-aura-components × 2
html × 2
static-resources × 2
contentversion × 2
pagereference × 2
encodingutil × 2
unit-test × 1
community × 1
rest-api × 1
lightning-experience × 1
salesforce1-app × 1
controller × 1
class × 1
css × 1
list × 1