We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [blob.topdf]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
24 views

Visualforce page rendered as PDF saving to salesforce files (Content document) but failed to reload error on opening pdf

Rendering VF page as PDF. Attachment pdf is working fine in classic. On opening pdf in classic view PDF is correctly opening but when i switch to lightning then on click of button pdf is saved in ...
0
votes
0answers
116 views

Display blob value in VF page and render as PDF

I am trying to display a PDF stored in static resource and passing the blob as a string to VF page and late rendering as PDF <apex:page controller="DataDisplayController" renderAs="pdf"> {!...
1
vote
0answers
36 views

Issue rendering pdf on VF

I am not able to render pdf files of size greater than 1.5 Mb on VF using the below article. Only blank screen appears on load/preview opposite to successful pdf generation in case of <1.5 Mb pdf ...
0
votes
1answer
116 views

Unable view the attachment saved as pdf Blob

I'm getting a base64 String pdfContent from a callout response which I'm trying to save as a attachment of a record. I tried to save it after decoding it with EncodingUtil.base64Decode('base64String'...
1
vote
1answer
1k views

How to save Renderas='pdf' in files folder

Is it possible to save a visualforce page with renderas='pdf' to the files folder so I can attacht the files to an email in lightning? Something like files f = new files( FolderId = UserInfo....
0
votes
1answer
58 views

Why am I not getting coverage for my attacmentclass

I have a extension class to attach a PDF to a record. I made Unittest which status gives succes but my code still has no coverage, why is this? Class: public with sharing class attachPDF { private ...
0
votes
1answer
271 views

Contentversion getBodyAsBlob issue

I'm tried to insert contentversion record from API response. In response getting PDF only. I've tried below code but i'm having issue in previewing the file. ContentVersion cv = new ContentVersion(); ...
0
votes
1answer
182 views

I need to format the content of the PDF attachment on my trigger

I have trigger that creates and attaches a PDF and then send it out as an email. I would need to change the font and margin style on my div (e.g A.Application Letter Form) seems to be not working. May ...
0
votes
0answers
553 views

Resource image in to Blob for attachment

I have a trigger method after update on Opportunity. I am trying to insert attachment after closing the opp. private void createOppAttachments(list<Opportunity> opps) { Set<Id> ...
-2
votes
1answer
816 views

Apex Uploading PDF Failed to Load

There isn't any error after my Codes upload the File to the Document Folder. But When I try to view the file that was uploaded I keep getting a Fail To Load PDF Document message. Can Someone tell me ...
2
votes
0answers
172 views

pdf not downloading properly

I have these lines of code: public String getCoverPdf() { if(!String.isBlank(pdfLink)) { Http h = new Http(); HttpRequest req = new HttpRequest(); ...
0
votes
2answers
608 views

Read any kind of attachment and display it as PDF

Is there anyway you could read an attachment on your record(PDF, Image, Word etc) and display it as PDF on your visual force page? Thanks.
0
votes
1answer
82 views

Null Pointer exception to add blob to list of blob

I have below piece of code where I am getting a Null pointer exception adding blob to a list of blobs. Can someone let me know my mistake please? Apex code counter=1; form = integer.valueof(...
2
votes
2answers
1k views

Alternative to renderas PDF for converting an HTML to PDF in apex

Is there any alternative or work around to HTML to PDF convert in apex? Please help and provide your suggestions.
0
votes
1answer
915 views

HTML Page renderas PDF misplaces alignments

I have an apex page where I am using HTML tags mandatorily. Here , I need to convert it to PDF. Using renderAs PDF is misplacing the alignments and messed up in Apex page. Please find my Apex Page ...
4
votes
0answers
513 views

Merging multiple pdf files

I was just wondering if anyone has created a method to merge 2 or more pdf files into one single pdf using Apex. I basically want to give the option to users by uploading or selecting few different ...
7
votes
3answers
3k views

Render PDF Blob data in visualforce page

I have pdf blob data returning in my webservice.. I want to display this blob data as pdf in visualforce page. Is there any way to render the page as pdf with this blob data looking like pdf page. ...
2
votes
1answer
752 views

Add the attachment with image from static resource and value from text area field as pdf file

I generating the attachment from trigger action, Need to generate the attachment as pdf file, contains image from static resource and value from text area field. I have trying to use blob.toPdf() to ...
2
votes
0answers
108 views

Email a PDF page to User who clicks

I have a custom button on Custom object Incident. When it is clicked from a particular Incident record a VF page is displayed in PDF format. I need not to show this PDF to the User instead the PDF ...
4
votes
1answer
3k views

Combine multiple PDF's together and attach them in a mail?

As of now , all i have is a VF page which renders as a PDF and it needs Account ID to be passed to generate a PDF . Is there a way wherein i can group all the PDF's into a single PDF ? Should i change ...
1
vote
1answer
508 views

Create a multi-page PDF containing detail page views for each record — Give me any example

I want to show all record in one PDF, I have gone this far, I dont know what to do now ! GeneratePDF : is a VF page, which create a one single PDF with a single records detail on one page So, Here ...
0
votes
1answer
3k views

unable to assign Blob variable that is returned by EncodingUtil.base64Decode(String) method [duplicate]

Unable to assign Blob variable that is returned by EncodingUtil.base64Decode(String) method Blob k = EncodingUtil.base64Decode(call.Signature__c); Attachment record = new Attachment(ParentId = call....
2
votes
2answers
2k views

How to use Blob.toPDF() method to create attachment body containing image and texts

I want to use Blob.toPDF() method to create attachment body, currently using: attachmentPDF.Name = account.Name + '.pdf'; attachmentPDF.body = Blob.toPDF(pdfContent);` Inside pdfContent I want to ...
6
votes
2answers
2k views

Issues with displaying Blob image in Visualforce page rendered as PDF

Blob images appears in Visualforce Page but unable to display in renderas="pdf" form. Is this a limitation with apex? Is there any alternative solutions? Please help me out here is the code for my ...
1
vote
0answers
264 views

Decode Signature

I've one signature field containing encoded values like 'iVBORw0KGgoAAAANSUhEUgAAApAAAACNCAYAAAAAYko8AAAAHGlET1QAAAACAAAAAA...' and i want to restore it back and put them into a list and display the ...
1
vote
1answer
506 views

Dynamically generated VFP attach to the Case : Too many Content Calls

I have to save the Dynalmically generated PDF from VFP on the Order Object I am trying to attach PDF in contructor call only For the given code I am getting error : Too many Content Calls public ...
1
vote
1answer
812 views

Blob.topdf() throws error when parameter consist of <img>

Seeking some help. When Blob.topdf() has to process email.htmlbody with tag, it throws an error as explained here. http://help.salesforce.com/apex/HTViewSolution?id=000123577&language=en_US can ...