Issue in converting .doc to flashfile using Print2Flash4

Questions related to converting various types of documents
Post Reply
jameer.gem
Posts: 2
Joined: Tue May 03, 2016 4:26 am

Issue in converting .doc to flashfile using Print2Flash4

Post by jameer.gem » Tue May 03, 2016 5:41 am

I tried to convert .doc to flash using print2Flash4.dll,but iam getting the following issue

File could not be converted. Retrieving the COM class factory for component with CLSID {466FAC17-24D2-4B37-A2C4-E2CFA0D3E1E8} failed due to the following error: 8007042d The service did not start due to a logon failure. (Exception from HRESULT: 0x8007042D).


protected void txtConversion_Click(object sender, EventArgs e)
{
if (!FileUpload1.HasFile)
{
Label1.Text = "Please select a file to convert";
return;
}
Label1.Text = "";
// upload
String fs_filename = Server.MapPath("UploadedFiles/") + FileUpload1.FileName;
String converteddir = Server.MapPath("ConvertedFiles/") + FileUpload1.FileName;
String fs_convertedfilename = converteddir + "/doc";
try
{
FileUpload1.PostedFile.SaveAs(fs_filename);
}
catch (Exception ex)
{
Label1.Text += "File could not be uploaded. " + ex.Message;
return;
}
// convert
try
{
if (!Directory.Exists(converteddir)) Directory.CreateDirectory(converteddir);
int interfaceOptions = 0;
for (int i = 0; i < cblDocOptions.Items.Count; i++)
if (cblDocOptions.Items.Selected)
interfaceOptions |= Int32.Parse(cblDocOptions.Items.Value);

Print2Flash4.Server2 p2fServer = new Print2Flash4.Server2();
p2fServer.DefaultProfile.InterfaceOptions = interfaceOptions;
p2fServer.DefaultProfile.ProtectionOptions = (int)Print2Flash4.PROTECTION_OPTION.PROTENAPI;
p2fServer.DefaultProfile.DocumentType = Print2Flash4.DOCUMENT_TYPE.FLASH | Print2Flash4.DOCUMENT_TYPE.HTML5;
p2fServer.DefaultBatchProcessingOptions.GenerateExternalViewer = true;
p2fServer.ConvertFile(fs_filename, fs_convertedfilename, null, null, null);
Label1.Text += "File converted.";
//dirUrl = "ConvertedFiles/" + FileUpload1.FileName;
}
catch (Exception ex)
{
Label1.Text += "File could not be converted. " + ex.Message;
return;
}

}

staff
Posts: 281
Joined: Sat Dec 15, 2007 4:48 pm

Re: Issue in converting .doc to flashfile using Print2Flash4

Post by staff » Tue May 03, 2016 6:21 am

This error means that the user name and password you entered in the Print2Flash Service Configuration window are incorrect. You need to enter the valid user name and password of a Windows user account.

Post Reply