Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 9 Question 103 Discussion

Posted by Rolf on Sep 15, 2024 at 02:55 PM

Which code displays the contents of a Visualforce page as a PDF?

Suggested Answer: C

Get Premium DEX-450 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
38 comments · newest first
SH
Sherrell 11 months ago
I don't trust that. Are you sure about D?
GR
Graciela 11 months ago
Wait, is it really that simple? I thought it was more complicated!
BR
Breana 12 months ago
Nah, D is definitely the way to go.
EM
Emile 12 months ago
I think B is also a valid choice, right?
SY
Sylvie 1 year ago
Option D is correct! It uses renderAs.
SI
Silva 1 year ago
I definitely recall "apex:page" being involved, but I can't remember if it was "renderAs" or "contentType" that was the right attribute.
EL
Elbert 1 year ago
I thought "contentType" was used for PDFs too, but now I'm second-guessing myself.
KR
Kristal 1 year ago
I remember practicing a question about rendering pages, and I feel like "renderAs" was the key term.
FI
Filiberto 1 year ago
I think it's either B or D, but I'm not completely sure which one is correct.
NA
Nakisha 1 year ago
I'm a bit confused by this question. I know there are a few different ways to display a Visualforce page as a PDF, but I'm not sure which one is the most correct or standard approach. I'll have to review the Visualforce documentation again to make sure I understand the best practice.
OL
Olene 1 year ago
Okay, let me think this through. The question is asking about displaying the contents of a Visualforce page as a PDF, so we need to use the `renderAs` attribute. I'm pretty sure the correct answer is C, where the `renderAs` attribute is set to `'pdf'`.
CU
Curtis 1 year ago
Hmm, I'm not sure about this one. I know we need to use the `renderAs` attribute to display a Visualforce page as a PDF, but I can't remember the exact syntax. I'll have to double-check my notes.
RY
Ryan 1 year ago
I think the answer is B. The code snippet shows that the `contentType` attribute is set to `'application/pdf'`, which should display the Visualforce page as a PDF.
AL
Alesia 1 year ago
Okay, I think I've got a good handle on this. The key is to identify which statements are true about both switchover and failover operations.
JE
Jean 2 years ago
Haha, these options are like a box of chocolates - you never know what you're gonna get! I'm leaning towards D though.
KA
Katina 2 years ago
Ah, the age-old debate of PDF generation in Visualforce. I'll go with B - can't go wrong with good ol' contentType.
GR
Graciela 2 years ago
↳ replying to Katina
Option D is also a valid choice, using renderAs='pdf' in the apex:page tag.
GE
Geoffrey 2 years ago
↳ replying to Katina
I agree with B, setting the contentType to 'application/pdf'.
CI
Ciara 2 years ago
↳ replying to Katina
I prefer option C, using renderAs='pdf' in the apex:page tag.
YE
Yesenia 2 years ago
↳ replying to Katina
I think A is the way to go, using renderAs='pdf'.
JU
Justine 2 years ago
This is easy! You just need to use the renderAs attribute and set it to 'pdf'. C is the winner!
GL
Glory 2 years ago
Hmm, I'm torn between B and D. Definitely one of those two, but I can't decide which is better.
KA
Karon 2 years ago
I think D is the correct choice. The renderAs='application/pdf' is the key to generating the PDF.
IR
Irma 2 years ago
↳ replying to Karon
I also think option D is the correct one with renderAs='application/pdf'.
EL
Elden 2 years ago
↳ replying to Karon
Yes, D is the right answer for displaying Visualforce page as a PDF.
AR
Armando 2 years ago
↳ replying to Karon
I agree, option D with renderAs='application/pdf' is the correct choice.
EL
Elke 2 years ago
C looks like the right answer to me. renderAs='pdf' is the way to display the Visualforce page as a PDF.
PA
Paz 2 years ago
↳ replying to Elke
A: Great, thanks for confirming!
SH
Sherell 2 years ago
↳ replying to Elke
B: Yes, renderAs='pdf' is the attribute to use for displaying a Visualforce page as a PDF.
JO
Josephine 2 years ago
↳ replying to Elke
A: I think you're right, C is the correct answer.
DE
Delisa 2 years ago
I'm pretty sure it's B. The contentType='application/pdf' is the way to go.
SI
Simona 2 years ago
↳ replying to Delisa
Thanks for confirming. B with contentType='application/pdf' is the correct code.
MI
Micah 2 years ago
↳ replying to Delisa
That makes sense. B is the way to display a Visualforce page as a PDF.
ET
Ettie 2 years ago
↳ replying to Delisa
Yes, B is the correct option. It specifies the content type as PDF.
QU
Quentin 2 years ago
↳ replying to Delisa
I think you're right. B is the correct option.
LA
Lavelle 2 years ago
I'm not sure, but I think C) could also be a valid option since it mentions rendering as PDF.
ST
Stefan 2 years ago
I agree with Ulysses, D) makes sense because it specifies the rendering format as PDF.
UL
Ulysses 2 years ago
I think the answer is D)
0/2000 characters

Save Cancel