T
Terence
Hi there,
I'm having a tough time to print .mdi files correctly in my visual
studio.net 2003 c# application. It either
a) skips page 1 if the print job has more than 1 page,
b) print the .mdi file in portrait orientation even when it's showing
as landscape,
c) cut off some contents on the edge of the document, or
4) shrink and print the document to a very small image.
Here's my code:
XmlNodeList xnl =
domObj.DocumentElement.SelectNodes("/PluginXML/FileList/File");
foreach (XmlNode xn in xnl)
{
string strFileName = xn.Attributes["Filename"].InnerXml;
int intNumOfCopies =
Int16.Parse(xn.Attributes["NumOfCopies"].InnerXml);
MODI.DocumentClass doc = new MODI.DocumentClass();
doc.Create(strPrintFolder+strFileName);
if (intNumOfCopies > 0)
{
for (int j=1;j<=intNumOfCopies;j++)
{
doc.PrintOut(1, -1, 1, strPrinterName, "",
false,MODI.MiPRINT_FITMODES.miPRINT_ACTUALSIZE);
}
doc.Close(false);
}
}
I have tried to change the FITMODE to miPRINT_PAGE but it still doesn't
work well on .mdi files with landscape orientation. I have no problem
printing .mdi files with portrait orientation at all. Does anyone has
any idea?
Thanks!
-Terence
I'm having a tough time to print .mdi files correctly in my visual
studio.net 2003 c# application. It either
a) skips page 1 if the print job has more than 1 page,
b) print the .mdi file in portrait orientation even when it's showing
as landscape,
c) cut off some contents on the edge of the document, or
4) shrink and print the document to a very small image.
Here's my code:
XmlNodeList xnl =
domObj.DocumentElement.SelectNodes("/PluginXML/FileList/File");
foreach (XmlNode xn in xnl)
{
string strFileName = xn.Attributes["Filename"].InnerXml;
int intNumOfCopies =
Int16.Parse(xn.Attributes["NumOfCopies"].InnerXml);
MODI.DocumentClass doc = new MODI.DocumentClass();
doc.Create(strPrintFolder+strFileName);
if (intNumOfCopies > 0)
{
for (int j=1;j<=intNumOfCopies;j++)
{
doc.PrintOut(1, -1, 1, strPrinterName, "",
false,MODI.MiPRINT_FITMODES.miPRINT_ACTUALSIZE);
}
doc.Close(false);
}
}
I have tried to change the FITMODE to miPRINT_PAGE but it still doesn't
work well on .mdi files with landscape orientation. I have no problem
printing .mdi files with portrait orientation at all. Does anyone has
any idea?
Thanks!
-Terence