Group:  General ยป microsoft.public.officedev
Thread: Microsoft Office Document Imaging MODI Printout Problem

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Microsoft Office Document Imaging MODI Printout Problem
Terence 07.06.2006 16:43:02
Hi there,

I'm having a tough time to print .mdi files correctly in my visual
studio.net 2003 c# application. It
a) skips page 1 if the .mdi file has more than 1 page, and/or
b) print the .mdi file in portrait orientation even when it's showing
as landscape, and/or
c) cut off some contents on the edge of the document, and/or
d) 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


RE: Microsoft Office Document Imaging MODI Printout Problem
Terence 07.06.2006 18:43:06
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

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net