I have html table on a visualforce page which is printed using window.print() javscript function. This data on this table is printed on multiple pages depending upon it's record numbers. I want to print a watermark image on the printed pages. How can this be achieved.


You can do this using CSS and a image

<apex:page standardController="Quote" renderAs="pdf" applyBodyTag="false">
        <style type="text/css" media="print">

                .watermark {
                    background-repeat: repeat;
                    background-image: url("{!URLFOR($Resource.tran_watermark)}");

    <body class="watermark">
        <!-- PDF stuff goes here -->

background-repeat will repeat the image and media="print" will only work when this page is available as PDF or in Print view.

  • I'm not using renderAs="pdf", instead using window.print() in javascript on vf page. – Jitesh Goel Jan 29 '18 at 10:02
  • @JiteshGoel approach will be same. Did you try this solution? – Tushar Sharma Jan 29 '18 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.