G
Guest
I am using a simple batch file that takes 3 args to create a .pdf file, and
then view that PDF file using on the Microsoft's Web Browser control
(AxSHDocVw.AxWebBrowser):
{
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName =@"C:\test-fo.bat";
p.StartInfo.WindowStyle= System.Diagnostics.ProcessWindowStyle.Hidden ;
string s1= @"C:\2.xml";
string s2= @"C:\ftid-fo.xsl";
string s3= @"C:\FO1.pdf";
p.StartInfo.Arguments= "\"" + s1 + "\"" + " " + "\"" + s2 + "\"" + " " +
"\"" + s3 + "\"";
p.Start();
p.Close();
string strFile = s3;
XMLBrowser.Navigate(strFile ,ref objNull,ref objNull,ref objNull,ref
objNull);
}
When I call the above for the first time... it gives an error :"Source file
for preview is not available". This only happens for the first time! I can
call the same code (after the first instance) without any errors and get the
preview of the generated file.
Is there any property/setting that i am missing related to the Process class?
Please suggest.
Thanks.
then view that PDF file using on the Microsoft's Web Browser control
(AxSHDocVw.AxWebBrowser):
{
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName =@"C:\test-fo.bat";
p.StartInfo.WindowStyle= System.Diagnostics.ProcessWindowStyle.Hidden ;
string s1= @"C:\2.xml";
string s2= @"C:\ftid-fo.xsl";
string s3= @"C:\FO1.pdf";
p.StartInfo.Arguments= "\"" + s1 + "\"" + " " + "\"" + s2 + "\"" + " " +
"\"" + s3 + "\"";
p.Start();
p.Close();
string strFile = s3;
XMLBrowser.Navigate(strFile ,ref objNull,ref objNull,ref objNull,ref
objNull);
}
When I call the above for the first time... it gives an error :"Source file
for preview is not available". This only happens for the first time! I can
call the same code (after the first instance) without any errors and get the
preview of the generated file.
Is there any property/setting that i am missing related to the Process class?
Please suggest.
Thanks.