Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pdf generation error

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
s.mccarthy
508 Views, 5 Replies

Pdf generation error

Hello,

 

I have been using iLogic's built-in snippet to generate pdf's. There are a few glitches with this process, in that the pdf will not render italicized fonts, nor special characters (for these special cases, I require 3rd-party software, which is currently pdfCreator), but for the most part it functioned well.

 

However, after I applied the recent SP2, along with the previous glitches, the iLogic routine will no longer generate a company logo in the titleblock. This occurs whether I use the iLogic routine, the Export > Pdf from the Inventor menu, or the PDF command from the User Customization dialog.

 

I must now generate all pdf's with pdfCreator which renders everything correctly.

 

Please see attached.

 

Thank you.

5 REPLIES 5
Message 2 of 6
SGPViewer
in reply to: s.mccarthy

Hi

 

Can you provide the sample data and the pdf export code that allow to reproduce the behavior on our side? 

 

Which version of Inventor are you talking about? And also does the issue appear only when using the iLogic code or when you export directly from UI through the native features? I'm trying to determine if it might be an API only behavior or a product issue...

 

Thank you,

Philippe.

Message 3 of 6
s.mccarthy
in reply to: SGPViewer

This is the iLogic code which functioned perfectly prior to the service pack. The routine culls the Part Number from the idw and populates the dwgNumber variable. This, along with the oPath variable, feeds the oDataMedium.FileName variable. I created a test directory on my system at "C:\pdfError\" You will need an identical path on your system or the routine will fail. You can create any directory as long as the oPath variable matches it, or the routine will fail. I just tested it and the pdf is generated, but without the embedded graphic.

 

'-------------------------------------------------------------------------------------------------------------------- 'Save PDF with options

 

PDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")

oDocument = ThisApplication.ActiveDocument

oContext = ThisApplication.TransientObjects.CreateTranslationContext

oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism

oOptions = ThisApplication.TransientObjects.CreateNameValueMap

oDataMedium = ThisApplication.TransientObjects.CreateDataMedium

dwgNumber = iProperties.Value("Project", "Part Number")

 

user = ThisApplication.GeneralOptions.Username

 

oPath = "C:\pdfError\"

 

If PDFAddIn.HasSaveCopyAsOptions(oDataMedium, oContext, oOptions) Then

'oOptions.Value("All_Color_AS_Black") = 0

oOptions.Value("Remove_Line_Weights") = 0

oOptions.Value("Vector_Resolution") = 400

oOptions.Value("Sheet_Range") = 0

'oOptions.Value("Sheet_Range") = Inventor.PrintRangeEnum.kPrintAllSheets

'oOptions.Value("Custom_Begin_Sheet") = 2

'oOptions.Value("Custom_End_Sheet") = 4

End If

 

'Set the destination file name

oDataMedium.FileName = oPath & dwgNumber & ".pdf"

 

On Error Goto handlePDFLock

'Publish document.

Call PDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)

'-------------------------------------------------------------------------------------------------------------------- '

Exit Sub

 

handlePDFLock:

MessageBox.Show("PDF could not be saved. Either it is open, or the oPath variable is incorrect ", "No PDF for you " & ThisApplication.GeneralOptions.UserName & "!")

Resume Next

 

handleXLSLock: MessageBox.Show("No XLS", "iLogic")

Resume Next

 

As I indicated in my initial post, none of the built-in Inventor pdf routines will now generate the graphic.

 

Thanks for taking a look at this.

Message 4 of 6

Sorry for the delay on that. I was testing on my side and I could reproduce the issue after installing SP2.

 

This has nothing to do with iLogic or the API, as I could also reproduce the issue by directly exporting to pdf from the UI, so it is a product issue. I will report that to the development team and log a change request.

 

Unfortunately at the moment I don't see a workaround, you would most likely need to uninstall SP2 if you want to have a correct pdf export.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 5 of 6

Sorry for the delay on this - I just tested a fix for this issue. It should be live within the next 24hrs.

 

-Chris



Chris Mitchell
PDMS Customer Engagment Team
Autodesk, Inc.

Message 6 of 6

This fix is now available from http://knowledge.autodesk.com/support/inventor-products/downloads/caas/downloads/content/hotfix-inv1...

 

Sorry for the inconvience,
Chris



Chris Mitchell
PDMS Customer Engagment Team
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report