I've been using Converter.Convert(InString, OutString) without problems. Now I need to add a margin around the conversion. So I tried this:
ConversionOptions options = new ConversionOptions(PageSize.Letter, PageOrientation.Portrait, 50d);
Converter.Convert(InString, OutString, options);
This seems pretty straightforward, but I keep getting the following exception on the Convert line (The ConversionOptions constructor works fine).
System.Exception: Conversion failed ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A11FD): This method or property is not available because this command is not available for reading.
Any Ideas?
ConversionOptions?
Re: ConversionOptions?
Support · Jul 10, 2013Hello,
Please try using the latest DynamicPDF Converter for .NET product in your system and see if it works for you. You can download the latest DynamicPDF Converter for .NET product MSI by logging into our CustomerArea: CustomerArea
using your DynamicPDF product serial number.
Please make sure that you completely uninstalled the previous Converter build from the Add Remove Programs. Then install the new Converter build using downloaded product MSI. Also make sure you have changed the reference to the Converter dll to point to the dll provided with the new build.
You can refer the deployment instructions for Converter here
.
If you continue getting the similar error then please send over the following details to our [^a|mailto:support@cete.com|opennewwindow|support^] team so that they can look into it further?
1.Sample input file.
2.Input file type(HTML , doc, etc) with which you are getting this error.
3.Exact build number of the DynamicPDF Converter(if you are unable to locate the build number send over the DynamicPDF Converter for .NET dll file).
4.Does the application works fine if you run it without using ConversionOptions?
5.Name of the operating system.
6.Whether the OS is of x86 orx64?
7.Exact version of the MS Office installed in your system(if you are converting MS Office documents).
8.Whether the MS Office is of x86 or x64 edition?
Thanks,
ceTe Software Support Team.
Re: ConversionOptions?
Forum member · Jan 18, 2017Hi all,
I've the same problem; I've installed the latest version of converter tool and the sample program give me this error.
System.Exception non è stata gestita
HResult=-2146233088
Message=System.Exception: Conversion failed ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A11FD): This method or property is not available because this command is not available for reading.
--- End of inner exception stack trace ---
at p.b(i A_0, i A_1)
--- End of inner exception stack trace ---
at ceTe.DynamicPDF.Conversion.Converter.Convert(ConversionOptions conversionOptions)
at ceTe.DynamicPDF.Conversion.Program.a.b()
at ceTe.DynamicPDF.Conversion.Program.a(Byte[] A_0)
at ceTe.DynamicPDF.Conversion.Program.a(Object A_0)
Source=ceTe.DynamicPDF.Converter.40
StackTrace:
at ceTe.DynamicPDF.Conversion.Converter.Convert(String sourceFilePath, String outputFilePath, ConversionOptions conversionOptions)
at DPDFConverter.Program.Main(String[] args) in C:\Program Files (x86)\ceTe Software\DynamicPDF Converter v1.0.1 for .NET\Examples\Visual Studio 2010_2012_2013_2015\Console\Console_CSharp\Program.cs:line 13
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
HResult=-2146233088
Message=System.Exception: Conversion failed ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A11FD): This method or property is not available because this command is not available for reading.
--- End of inner exception stack trace ---
at p.b(i A_0, i A_1)
--- End of inner exception stack trace ---
at ceTe.DynamicPDF.Conversion.Converter.Convert(ConversionOptions conversionOptions)
at ceTe.DynamicPDF.Conversion.Program.a.b()
at ceTe.DynamicPDF.Conversion.Program.a(Byte[] A_0)
at ceTe.DynamicPDF.Conversion.Program.a(Object A_0)
Source=ceTe.DynamicPDF.Converter.40
StackTrace:
at o.a(Object A_0)
InnerException:
Can anyone help me?
thanks
Re: ConversionOptions?
Support · Jan 18, 2017Hello,
You are getting this error most likely because of not having the required software installed on the machine where in the conversions are running.
The DynamicPDF Converter has additional software requirements in order to convert certain supported file types to PDF. For example if you are converting MS Office documents to PDF then you will need to have the MS Office 2010 x86 edition of software and DynamicPDF Converter products installed on the machine where in the conversions are running. Please refer to the documentation on operating system requirements and limitations here
.
If you continue seeing the similar behaviour even after having all the prerequisites installed on the machine then send over the following details to [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] so we can look into it further.
1.Code sample to recreate the error.
2.Input file type(HTML , doc, etc) with which you are getting this error.
3.Exact build number of the DynamicPDF Converter product. You can get this information in DLL references properties (Version and Description fields) in Visual Studio.
4.Does the application works fine if you run it without using ConversionOptions?
5.Operating system details: Name, x86 or x64.
6.MS Office details which is installed on the system where in the conversions are running (if you are converting MS Office documents): Version, x86 or x64.
7.Version of IE installed locally where in the conversions are running (If you are converting HTML or URL to PDF)
8.Are you able to convert simple text and images (JPEG or PNG) to PDF?
Thanks,
ceTe Software Support Team.