Hello,
I am having the same issue.
I am using the code as described in the Inventor API documentation.
I originally wrote the code in VB.Net as a plug-in and the PDF files look great. However, I have recently created an Add-in to be more seamless with Inventor but the PDF files are terrible. I tested the Add-in on several computers and all had the same result.
Here is the code from my add-in:
Public Sub PublishPDF(ByRef DrawingFName As String)
'MsgBox("drawing name: " + DrawingFName.Replace("*.idw", ""))
Dim DrawingDocument As Inventor.Document = g_inventorApplication.Documents.Open(DrawingFName, False)
Dim PDFAddIn As Inventor.TranslatorAddIn
PDFAddIn = g_inventorApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
Dim oContext As Inventor.TranslationContext
oContext = g_inventorApplication.TransientObjects.CreateTranslationContext
oContext.Type = Inventor.IOMechanismEnum.kFileBrowseIOMechanism
Dim oOptions As Inventor.NameValueMap
oOptions = g_inventorApplication.TransientObjects.CreateNameValueMap
Dim oDataMedium As Inventor.DataMedium
oDataMedium = g_inventorApplication.TransientObjects.CreateDataMedium
If PDFAddIn.HasSaveCopyAsOptions(DrawingDocument, oContext, oOptions) Then
oOptions.Value("All_Color_AS_Black") = My.Settings.PDFAllColorsAsBlack
oOptions.Value("Remove_Line_Weights") = My.Settings.PDFLineweight
oOptions.Value("Vector_Resolution") = My.Settings.PDFVectorResolution
oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets
End If
'These two lines check to see if the assembly drawing is published
'Add an "_" as the file prefix for sorting so the assembly file is first to be merged.
Dim assName As String = g_inventorApplication.ActiveDocument.DisplayName.Replace(".iam", "")
Dim drwName As String = System.IO.Path.GetFileNameWithoutExtension(DrawingFName)
'MsgBox("drawing name: " + DrawingFName)
Dim oDrawName As String ' Use to store drawing filename. Remove path, extension and replace with PDFFoldername and pdf extension
If assName = drwName Then
oDrawName = PDFFolderName + "\" + "_" + System.IO.Path.GetFileNameWithoutExtension(DrawingFName) + ".pdf"
'MsgBox("yes, assy file")
Else
oDrawName = PDFFolderName + "\" + System.IO.Path.GetFileNameWithoutExtension(DrawingFName) + ".pdf"
End If
oDataMedium.FileName = oDrawName
Try
Call PDFAddIn.SaveCopyAs(DrawingDocument, oContext, oOptions, oDataMedium)
DrawingDocument.Close()
Catch
End Try
End Sub