The VB.NET add-in for 3D PDF generation works well and directly without issues. However, the C# API code throws an invalid arguments error at the
Publish() method. This is because the code uses late binding. This blog contains steps on how to resolve this error
As mentioned in this blog (here) set the Embed Interop Type to False under the Inventor Interop Assembly reference
Add the Microsoft.CSharp reference to your project then import the namespace in the code
Declare the PDF converter 3D ApplicationAddin Variable as dynamic as seen below
dynamic oPDFConvertor3D ;
oPDFConvertor3D = oPDFAddIn.Automation;
Publish() method takes two arguments, the first is of type Inventor document and the second is of Inventor NameValueMap type. Declare the variable of the type document as dynamic before parsing it to the method.
See the sample code below
oDocument = m_inventorApplication.ActiveDocument;
These steps should be able to resolve the error.