+ 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 ?
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

How to render a vf page as pdf

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
Cesar Ramirez Vasquez005391619375684564Cesar Ramirez Vasquez005391619375684564
Yes just write the receipt or text in pure html and add the following JS

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

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