Skip to main content

Questions tagged [pdf]

Portable Document Format (PDF) is a file format used to present documents in a manner independent of application software, hardware, and operating systems.

Filter by
Sorted by
Tagged with
23 votes
2 answers
15k views

How can I specify a file name for a Visualforce generated PDF

What can I do on a Visualforce page that is a renderAs="pdf" that will result in the name of the file that shows up when the user clicks Save As... to not be the name of the Visualforce page. The ...
Peter Knolle's user avatar
  • 29.1k
21 votes
7 answers
15k views

word-wrap not working with VisualForce PDF generation?

I cannot get word-wrap to work in a VisualForce page, which is rendered as a PDF. There is a table with a column called Comments and this contains a long string without any spaces. The long string is ...
LMcDonald's user avatar
  • 463
18 votes
1 answer
3k views

apex charts render as pdf

When using apex:chart, if the page has the renderAs="PDF", the charts don't show up at all.
sfdc's user avatar
  • 13.7k
17 votes
2 answers
13k views

Convert HTML to PDF in APEX

I am trying to convert an HTML email that is sent to an Email Service into a PDF file. Some of the options I have explored: attachment.fileName = fileName + '.pdf'; attachment.mimeTypeSubType = '...
rumdumdum's user avatar
  • 695
16 votes
5 answers
7k views

Is it possible to use images in Visualforce generated PDFs which are not static resources?

I'm trying to generate a Visualforce PDF (renderAs) with a variety of images from different sources includes Salesforce Attachments and Documents, as well as third party sites. So far I've only been ...
paul's user avatar
  • 1,019
14 votes
1 answer
2k views

Status of renderAs advanced_pdf

I just wondering if this promising feature has been evolved or is evolving to GA https://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/rn_vf_advanced_pdf.htm Any info about current ...
Uwe Heim's user avatar
  • 28.4k
14 votes
1 answer
13k views

Display PDF with Visualforce

I have a PDF which is retrieved via web services calls. The PDF is sent over in a base64 encoded string. I would like to be able to visit a page and output the result of this request. Currently I am ...
Kyle's user avatar
  • 143
14 votes
3 answers
4k views

How to download a VF page as PDF and email it from a trigger?

I have a renderAsPDF VF page that takes an object id parameter as part of the URL string. It returns a PDF with some textual data and some images (e.g. <apex:image id="theImage" value="/servlet/...
pfeilbr's user avatar
  • 281
12 votes
5 answers
3k views

Download Invoice PDF's On List View without saving to Notes and Attachment as a zip file

Scenario: Am having Invoice__c Object. On the list view I have download button to download the selected invoices PDF's. What my below code is doing is it is after fetching the selected records id's of ...
mohammed azarudeen's user avatar
11 votes
1 answer
7k views

generating PDF of a record's printable view in batch apex

Some of my users cannot view the Case object owing to restricted licenses. To avoid paying for service cloud licenses, I need to generate PDF snapshots of all Case records using a batch (the are many ...
max's user avatar
  • 2,419
10 votes
1 answer
16k views

Rendering a VF page as PDF and saving it as an attachement

How can I render a VisualForce Page as PDF and have a button on the page that saves this PDF as an attachment to a record? I want to have a button on my object detail page, 'Generate PDF' which will ...
Dedo's user avatar
  • 5,017
9 votes
2 answers
14k views

Custom Fonts in Visualforce Page (renderas="pdf")

Trying to use a custom font in my visualforce page (rendered as pdf). I have looked at many conflicting articles saying that the only option are the "limited" fonts supported, whereas others say that ...
Justin's user avatar
  • 101
9 votes
2 answers
8k views

How to add page breaks to visual force page rendered as pdf so that a dynamically rendered list in apex repeat tag does not strech the table lines

I have created a VF page rendered as pdf for QuoteLineItems in which I have added the list inside <apex:repeat> tags inside a html table row which again is inside another table.The problem ...
Aditya Sagam's user avatar
9 votes
1 answer
11k views

My Header and Footer overlaps with the content in a PDF Visualforce Page

I am trying to render my PDF page with a header and a footer, that are actually images, and a content, that expands in more than one page. The problems that I am facing are: The Header gets ...
Endrit Sino's user avatar
9 votes
2 answers
7k views

How to get the customer signature inside salesforce and generate the pdf?

We have a requirement for Customer Sign-up form. We have created a VF Tab and included VF page for creating Customer signup form. In that Customer Signup Form, we have a field to get the Customer ...
Lavanya Sanathkumar's user avatar
8 votes
3 answers
9k views

Render a Visualforce page as PDF issues

I'm trying to render a HTML table in a Visualvorce page as PDF and I'm having the following issues: I used the CSS below to display the page in landscape but it doesn't work. @page { ...
Chicho's user avatar
  • 485
8 votes
3 answers
5k views

too many nested getContent calls?

I have a Visualforce page that renders perfectly as a PDF that I'd like to attach to an opportunity record and to attach to an email. Whenever the code gets to getContent(), I keep getting an error ...
sberley's user avatar
  • 554
8 votes
1 answer
5k views

Can You Use A PDF Template In Apex?

I was curious if I could leverage a standard PDF template or make a custom one that I can then render via Apex somehow. I'm curious if I can either: Render it as a PDF directly in Apex via ...
Programmable Medley's user avatar
8 votes
1 answer
695 views

PDF using Static Resource generated from REST doesn't display My Image

I have different ways in my organization to generate my invoice pdf and attach it to my records. My PDF includes a logo stored in a public StaticResource. It works perfectly everywhere except when I ...
brovasi's user avatar
  • 5,675
7 votes
4 answers
3k views

Can't use getContent() in a batch, future method, trigger etc

I have a VF page which has a method in the controller that generates PDF and sends it out via email. It's all working fine when I trigger off the method from a custom button on the page, which is the ...
Boris Bachovski's user avatar
7 votes
3 answers
12k views

renderas=pdf not generating borders in html tables

I have a Vf page which i am generating as pdf using renderas="pdf". The issue i am facing is that the html tables i am using in the Vf page dont seem to show the borders. They are visible when i view ...
Prady's user avatar
  • 12.3k
7 votes
2 answers
18k views

How to repeat HTML table header (thead) for each page rendersAs pdf

I would like to as you how to repeat table header ( thead) for each page on the top ?? the simple code is like this : </messaging:htmlEmailBody> <messaging:attachment renderAs="pdf&...
Julio Ludovic Ramihone's user avatar
7 votes
1 answer
5k views

visualforce PDF - content overlapping with header

I am trying to generate PDF from Visualforce but the problem I am running into is that content overlaps with Header. Here is the image: and here is the code: <apex:page controller="...
javanoob's user avatar
  • 8,907
7 votes
4 answers
8k 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. ...
NoNicknameSFDC's user avatar
7 votes
1 answer
3k views

How to render Multiple PDFs from a single Visualforce page?

I working on a visualforce page (running a tabular report) with a table (13 columns) and am rendering a PDF as well for this. Firstly, all the columns are not fitting in a single PDF. Secondly, how ...
Sapthagiri's user avatar
7 votes
2 answers
494 views

Generating quote PDF in the same context the quote is created (I found a dwarf)

When attempting to create a quote and then generate a PDF using the quote in the same context, I get one of the dwarf errors: Line: -1, Column: -1 ORA-20001: ORA-06512: at "HAPPY.CACCESS", line ...
gNerb's user avatar
  • 9,501
7 votes
1 answer
2k views

RenderAs PDF with Bootstrap

I'm building out a Bootstrap website in Salesforce and I now have a requirement to allow the users to download some of the pages as PDFs. Unfortunately, when I use renderAs="PDF", I get this error: ...
ricksmt's user avatar
  • 602
6 votes
2 answers
5k views

Remove Last Page from the PDF

I have created PDF of Multipage, where in VF page I am using <apex:repeat .......> ///////// some code <div style="page-break-before:always;"/> </apex:repeat> But it adds a ...
Salesforce Steps's user avatar
6 votes
3 answers
10k views

Render Visualforce page as PDF in landscape orientation

I've done it before but recently it does not appear to be working. Tried changing the api to an older version, still nothing. Not sure what else to try. i've tried multiple 'solutions' from other ...
cHam's user avatar
  • 183
6 votes
1 answer
3k views

External Image Link Broken when Rendering as PDF

When referencing an external image in a Visualforce PDF rendered image, the image is displaying a broken link. It works perfectly without the renderAs="PDF".
S Morgan Robertson's user avatar
6 votes
1 answer
1k views

PDF has no file extension .pdf when generated with visualforce

I am generating a pdf invoice with visualforce, but when it downloads there is no file extension. I have read other questions on SE and tried to simplify the content. Right now the code is simplified ...
dnbrobin's user avatar
  • 127
6 votes
2 answers
3k views

VF PDF(getContent) generates corrupted PDF while using standard controller

Well lately I noticed a weird behaviour of Pagereference getContent() method while using it with a standard controller along with an extension. So here is bit of code to demonstrate the issue. PAGE ...
Avidev9's user avatar
  • 5,659
6 votes
2 answers
31k views

How to generate a PDF and have it download from a Lightning Web Component

I'm trying to show a button on a Lightning Web Component, that when clicked generates a PDF and immediately starts downloading it on the browser. The LWC lives in a Screen Flow and I'm currently ...
Dan's user avatar
  • 215
6 votes
2 answers
617 views

Batch Apex and performance

I have a batch class that converts thousands of Visualforce pages to PDFs and stores the PDF files into a folder (in documents). The batch seems to work fine, but the process will take hours to ...
Riadh Mankai's user avatar
  • 1,088
6 votes
1 answer
3k views

Scaling Images in Visualforce PDFs

In our org, users are able to create PDFs with a logo in the header. We're using renderAs="pdf" to achieve this. The problem is we can't control the dimensions of the logos, so we need to scale them ...
Sean's user avatar
  • 646
6 votes
1 answer
3k views

renderAs PDF shows blank first page

I am using the html2canvas library to render the page with a view to rendering the canvas as a PDF. I am saving the canvas as an Attachment fine. The direct link to the attachment looks like this: ...
George S.'s user avatar
  • 2,740
6 votes
3 answers
7k views

pageblocktable rows spanning over page breaks when rendered as pdf

I have a pageblocktable that is being rendered as a pdf. The PDF is set as A4 landscape with small margins and page numbering in a style sheet. The problem is that rows in the pageblocktable span the ...
GdD's user avatar
  • 163
6 votes
2 answers
3k 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 ...
Testing_SFDC's user avatar
  • 2,950
6 votes
1 answer
4k views

Generating Barcodes in Salesforce

Is there any standard/ acceptable way of generating barcodes in salesforce? I'm exporting some pdf reports and there I need to print a barcode. I found some third party libraries like this. But when ...
highfive's user avatar
  • 6,241
6 votes
3 answers
5k views

How can you populate a PDF form and display it within SFDC?

Let's start with an existing PDF that has fillable form fields. The end goal is to populate those fields with SFDC data and display the PDF in the browser. What I've tried so far: I've created an ...
Ryan Elkins's user avatar
  • 7,687
5 votes
2 answers
4k views

How do I make a Visualforce PDF respect new line characters?

I have a Visualforce page where I need to show the chatter posts in a PDF. The chatter post is generated by apex code and contains new line characters. I am querying the posts and displaying them ...
Shebin Mathew's user avatar
5 votes
2 answers
4k views

Best way to create PDFs on a schedule?

I'm currently trying to set up a schedule that will create PDF files and save them as attachments in Salesforce. Methods I have tried: PageReference.getContentAsPdf() - works fine by itself but is ...
Davin Casey's user avatar
  • 4,217
5 votes
1 answer
4k views

Visualforce RenderAs PDF not supporting SLDS CSS

I have a VF page built on Lightning Design system (LDS) framework. When I add the renderAs="PDF" attribute, pdf does not show the content with LDS CSS/Style. Reference Link: SLDS not rendering CSS ...
Syed Moosa Nazir TN's user avatar
5 votes
2 answers
6k 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 ...
human's user avatar
  • 655
5 votes
2 answers
3k views

customize create pdf on quote based on a field on Quote

I have a custom field on quote which is a checkbox. I need a way to allow or disallow the pdf creation based on this field If the checkbox is true then only allow the create pdf to fire otherwise ...
Prady's user avatar
  • 12.3k
5 votes
1 answer
9k views

Adding a border to a visualforce page rendered as a PDF

I am trying to make a visualforce page with a border that renders as a PDF. Currently, there are 2 sets of tables within the visualforce page, both of which can have variable sizes depending on the ...
Katie Swol's user avatar
5 votes
1 answer
2k views

Image inside hyperlink not working in Visualforce page rendered as PDF

I am trying to create hyperlink in PDF using visualforce renderAs = "pdf". Actually I don't want the simple link i.e. text link, instead of text link I want image icon and on click of that icon/image ...
Flame Striker's user avatar
5 votes
2 answers
8k views

Print lightning component to PDF

I've got a lightning component who looks like a web page. The user wants a button to print that as PDF. I didn't find solution, though I did try some things: Build a visualforce page with my ...
Antonio Diaz's user avatar
5 votes
1 answer
10k views

Save Pdf as a attachement in Notes and attachment using apex class(Without clicking on Button)

My question is regarding Save Pdf as in Notes and Attachment under the record, So, my issue is, First controller is fill the document(PDF) and Second controller can Save that PDF using that first ...
Nihar's user avatar
  • 1,182
5 votes
2 answers
4k views

Apex & VF Code of Send Quote as E-Mail

I'd like to send my own Quote-PDF as E-Mail and not use the useless Salesforce Quote-PDF function. Problem is, using my own templates I can no longer use the native send Quote per E-Mail button. My ...
Atroxy's user avatar
  • 103

1
2 3 4 5
14