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
Cesar Ramirez Vasquez005391619375684564Cesar Ramirez Vasquez005391619375684564 

Printing an invoice information into a epson tm series ?

Is that possible, what i should do to achieve that i need to print an invoice after every purchase everyting is ready how can i add this functionally ?
Ramu_SFDCRamu_SFDC
Create a button to call a visualforce that is rendered as pdf. For more information on how to implement this, follow the below posts

How to create button
https://help.salesforce.com/apex/HTViewHelpDoc?id=defining_custom_links.htm&language=en

How to render a vf page as pdf
http://www.salesforce.com/us/developer/docs/pages/Content/pages_quick_start_renderas_pdf.htm

Once you generate a pdf of invoice, you can use the pdf print option to print the invoice record.

Cesar Ramirez Vasquez005391619375684564Cesar Ramirez Vasquez005391619375684564
Is there any way to automate the process? Print with just a click on the button
Kausik DasKausik Das
Please let me know how to do this , as we are stuck in printing with epson dot matrix?
What if we need to print in a pre printed stationary? Is it possible to send the content as text directly to the printer?

Thanks in advance
Kausik
Cesar Ramirez Vasquez005391619375684564Cesar Ramirez Vasquez005391619375684564
Yes just write the receipt or text in pure html and add the following JS

<head>
  <style>
@media print {
.noprint {display:none;}
}
</style>
<p><input type="button" id="print" value="Print" class="noprint" onclick="window.print();" /></p>
<script type="text/javascript">
    window.onload=function(){
   window.print();
  };
</script>
<!--
<script language="JavaScript">
window.setTimeout("self.close()", 1);
</script>
-->
</head>

Then create a button to print with the following onclick function:
onclick="window.open('/apex/YourVFName', 'Popup','height=600,width=600,left=100,top=100,scrollbars=yes,toolbar=no,status=no');"

and you can configure firefox to print without asking for confirmation. Hope it helps !
Bluenet CRMBluenet CRM
Did this work???
I am having trouble with the font as it does not print correctly.... Using the Epson lx350
FQuinonesFQuinones
@Cesar Ramirez

Where you able to implement this in Salesforce? I'm trying to do exactly the same thing.