VisibleClipBounds property

  • Thread starter Thread starter Francesco
  • Start date Start date
F

Francesco

I've got some problems printing to a dot matrix printer.
After correctly setting all the charecteristics of my papersize in the
BeginPrint()...

private void pdLabelDoc_BeginPrint(object sender,
System.Drawing.Printing.PrintEventArgs e)
{
pdLabelDoc.PrinterSettings.PrinterName = "Epson LX-300";

printFont = new Font("Arial", 10);
printFontR = new Font("Arial", 8);
printFontBC = new Font("IDAutomation.com Code39", 12,
FontStyle.Regular);
PaperSize etichette = new PaperSize("Etichette", 285, 1200);
pdLabelDoc.DefaultPageSettings.PaperSize = etichette;
Margins margins = new Margins(0,0,0,0);
pdLabelDoc.DefaultPageSettings.Margins = margins;
}

I call the PrintPage()...

private void pdLabelDoc_PrintPage(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
int count = 0;
DataRow articolo;

float yPos = 0;
// My paperSize contains 8 articles. of each article I print
four lines...

// If I have a breakpoint here, paperSize and the other settings are
// correct. The only strange property is VisibleClipBounds, that is
// set at (0,0,285,1066)
// VisibleClipBounds is a read-only property (the online says it's a
// get-set...) and I don't know how to modify it

while (count < 32 && contaArticoliGenerale <
listaArticoli.Rows.Count)
{
...
contaArticoliGenerale++;
}

if (contaArticoliGenerale < listaArticoli.Rows.Count)
{
e.HasMorePages = true;
contaPagine++;
}
else
e.HasMorePages = false;
}


Any suggestion?

TIA
 
Back
Top