function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srinivasusrinivasu 

how to render a VF page with same appearance(look and feel) as that of Out of box Printable View.

Hi,

 

Is it possible to render a VF page with the same appearance as is seen in the Printable View page. Is it possible to display all the sections with similar spacing ,font-size, header etc as it appears in OOB printable view.

 

 If i use a comibination of apex:detail and apex:relatedlist tags then buttons are getting displayed and i have no control over formatting and aligning the sections in a prescribed format.

 

Any suggestions...

 

Thanks and regards

vasu

Andy BoettcherAndy Boettcher

If you look at the header of a "Printable View" page, you'll see some StyleSheets that you can reference.

 

In your <apex:page> tag, I'd imagine you would turn off the standardstylesheets - then put these in your VF page:

 

<link  href="/sCSS/23.0/sprites/1323209069000/Theme3/default/gc/elements.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><link  href="/sCSS/23.0/sprites/1323209069000/Theme3/default/gc/common.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><link  href="/sCSS/23.0/sprites/1323209069000/Theme3/default/gc/printableView.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><link  href="/sCSS/23.0/sprites/1323209487000/Theme3/gc/dStandard.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><link  href="/sCSS/23.0/sprites/1323209487000/Theme3/00DU0000000H4M4/005U0000000hLVD/gc/dCustom0.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" /><link  href="/sCSS/23.0/sprites/1323209069000/Theme3/default/gc/extended.css" media="handheld,print,projection,screen,tty,tv" rel="stylesheet" type="text/css" />

 I haven't tested it - but that's how I would start out doing so.