I have created a docx converter per your sample code with 6.4. Basicly using the exact code.
I am getting the following error
The document converter was not able to convert the file.
Log file shows
Document Converter Word Document to PDF failed with error code: CE_OTHER
The converter shows up in the list document dropdown and opens the default screen Document Conversion: test.docx
The docx itself is just a couple lines of test text.
Feature.xml
<Feature xmlns="<A href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</A>"
Id="{C0ADDD16-A482-4f0d-A858-3F42EC09D504}"
Title="DOCX to PDF Converter (by Aspose)"
Description="Makes it possible to convert documents from DOCX to PDF."
Scope="WebApplication">
<ElementManifests>
<ElementManifest Location="Elements.xml"/>
<ElementFile Location="DocxToPDF.exe"/>
<ElementFile Location="Aspose.Words.dll"/>
</ElementManifests>
</Feature>
Elements.xml file
<Elements xmlns="<A href="http://schemas.microsoft.com/sharepoint/">http://schemas.microsoft.com/sharepoint/</A>">
<DocumentConverter Id="{DB1587D1-31B0-4ada-9F7C-D4945DAABA58}"
Name="Word Document to PDF"
App="DocxToPDF.exe"
From="docx"
To="Pdf"
/>
</Elements>
CODE IS AS Follows
using System;
using System.IO;
using Aspose.Words;
namespace DocxToPDF
{
/// <summary>
/// DOC2PDF document converter for SharePoint.
/// Uses Aspose.Words to perform the conversion.
/// </summary>
public class ExMossDoc2Pdf
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
// Although SharePoint passes "-log <filename>" to us and we are
// supposed to log there, for the sake of simplicity, we will use
// our own hard coded path to the log file.
//
// Make sure there are permissions to write into this folder.
// The document converter will be called under the document
// conversion account (not sure what name), so for testing purposes
// I would give the Users group write permissions into this folder.
gLog = new StreamWriter(@"C:\Aspose2Pdf\log.txt", true);
try
{
gLog.WriteLine(DateTime.Now.ToString() + " Started");
gLog.WriteLine(Environment.CommandLine);
ParseCommandLine(args);
// Uncomment the code below when you have purchased a licenses for Aspose.Words.
//
// You need to deploy the license in the same folder as your
// executable, alternatively you can add the license file as an
// embedded resource to your project.
//
// // Set license for Aspose.Words.
// Aspose.Words.License wordsLicense = new Aspose.Words.License();
// wordsLicense.SetLicense("Aspose.Total.lic");
ConvertDoc2Pdf(gInFileName, gOutFileName);
}
catch (Exception e)
{
gLog.WriteLine(e.Message);
Environment.ExitCode = 100;
}
finally
{
gLog.Close();
}
}
private static void ParseCommandLine(string[] args)
{
int i = 0;
while (i < args.Length)
{
string s = args[i];
switch (s.ToLower())
{
case "-in":
i++;
gInFileName = args[i];
break;
case "-out":
i++;
gOutFileName = args[i];
break;
case "-config":
// Skip the name of the config file and do nothing.
i++;
break;
case "-log":
// Skip the name of the log file and do nothing.
i++;
break;
default:
throw new Exception("Unknown command line argument: " + s);
}
i++;
}
}
private static void ConvertDoc2Pdf(string inFileName, string outFileName)
{
// You can load not only DOC here, but any format supported by
// Aspose.Words: DOC, RTF, WordML, HTML.
Document docx = new Document(inFileName);
docx.Save(outFileName, SaveFormat.Pdf);
}
private static string gInFileName;
private static string gOutFileName;
private static StreamWriter gLog;
}
}