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
cathy369cathy369 

Need Help - trying to increase print size of visual force page renderedAs pdm

i'm no apex, html or SF expert, and i'm trying to modify an existing visualforce page that prints a job ticket from the opportunity object.  it currently prints in an 8 1/2 x 11 format, but i would like to increase this to 9 x 12... i've tried a couple of things, but don't know if i'm stepping on myself, or if what i've tried doesn't work... any help would be GREATLY appreciated!!!  thanks much....

what i've tried:
1.  setting all margins to 0 to gain a little additional space:

body {
    font-family: Arial, Helvetica, sans-serif;
    margin-left: 0px;
    margin-right: 0px;
    margin-top:0;
    margin-bottom:0;
}
______________________________
2.  using @page:
@page {
  size: 23cm 28cm;
}

______________________________

i'm at a loss... thanks again....

Pradeep_NavatarPradeep_Navatar

Tryout the code given below :

             <style>

             @page: first{

             size: landscape; // either landscape or portrait

             }

             </style>

 

Another option :

 

You can do this through javascript &colon;

 

<apex:page>

<apex:form>

<apex:inputtext value="{!proptext}"/>

<apex:commandbutton action="{!dummy}" onclick="showreset()"/>

</apex:form>

<script>

function showreset()

{

document.getElementByid('pageid:formid:textid').value='';

}

</script>