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 ?
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="'/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
@Cesar Ramirez

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