Microsoft Office Document Imaging MODI Printout Problem

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
 
T

Terence

when i print the .mdi file manually, it also prints portrait and out of
margin. However, it won't skip page 1 and thumbnailed image, which happen
only when i print the .mdi file programmatically. I have absolutely no idea
how to fix it with the MODI.DocumentClass in C#. The Printout method doesn't
really give me any option.

- Terence
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top