I am using the code template from Microsoft at this site with this snippet to print out only a single line and form feed:
string s = "Hello world!\xC"; //\xC means form feed
PrintDialog pd = new PrintDialog();
pd.PrinterSettings = new PrinterSettings();
if (DialogResult.OK == pd.ShowDialog(this))
{
RawPrinterHelper.SendStringToPrinter(pd.PrinterSettings.PrinterName, s);
}
But no luck, my paper size long is always like A4 paper size long.
What is wrong with my code? Do anyone got a hint or trick to deal with this problem?