PDF Converter - problem converting AutoCAD file

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
aldewacs2
Posts: 6
Joined: Thu Apr 26 2007
Location: CANADA

PDF Converter - problem converting AutoCAD file

Post by aldewacs2 »

Our application uses the developer version of PDF Converter 2.50e. It has been in use for over a year, so the basics should be OK – i.e. making proper calls before printing etc. It is designed to create and merge PDF files from various sources (.DOC, .XLS, .VSD, other …) and create a single PDF. Recently a customer started using AutoCAD drawings (.DWG) and the application has an error (#214790908), then proceeds and fails to create the PDF output. A blank page results. He has AutoCAD properly installed on 2 different test machines.

While we cannot be 100% sure, our tests have us believing that the PDF Converter may not be seeing the .DWG file as being associated in Windows to the application (in our case the viewer, and perhaps the actual AutoCAD application). (Our tests are done with an AutoCAD viewer, as we do not have the full application here).

We have manually associated the .DWG extension to the viewer, but the PDF Converter still fails to create a PDF and acts like the association is non-existent. (in Windows Explorer, Right click on a DWG file, we do not get a “Print” menu item, while with Excel, Word etc we DO get that, and we can print direct from that drop-down menu). Seems related, although we can’t prove it.

Has anyone seen/solved something similar? From this forum, I gather that others have printed from AutoCAD to the PDF Converter (hopefully the developer version, not just the end user version).[size=18][/size]
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Printing AutoCad files to the PDF Printer shouldn't be a problem whether you have the End User or the Developer version of the PDF Converter.

Are you using BatchConvert() in your application to print the different files to PDF?

Please ask your customer to make a right click on the file and check if 'Print' exists in the list or not.
aldewacs2
Posts: 6
Joined: Thu Apr 26 2007
Location: CANADA

PDF Converter - problem converting AutoCAD file

Post by aldewacs2 »

Hi Joan
Yes, we use BatchConvert(). Works like a charm on all other tested file types.
Testing on our PC here, using the AutoCAD viewer, when the process goes to BatchConvert, it does not return and hangs forever. (no timeout).
I will ask our customer to test the right-click menu as suggested.

I'm also trying to get my hands on a version of AutoCAD to test the function in-house and perhaps trap the culprit error.
aldewacs2
Posts: 6
Joined: Thu Apr 26 2007
Location: CANADA

PDF Converter - problem converting AutoCAD file

Post by aldewacs2 »

Joan, we completed a number of tests, and basically stripped our application down to bare basics so there is no question that anything else is interfering. We got it down to a dozen or so lines. We proved pretty well that while BatchConvert() works with WORD, EXCEL, VISIO, it does not work for us with AutoCAD (R14 is our test version, but our client has a later version but same problem). The Windows file associations are OK and I have AutoCAD installed, so when I double click in Explorer on an AutoCAD file (*.dwg) it launches as expected and opens that file. Also, a 'right click' on a DWG file shows the "Print" option. I guess that was not the problem. (see previous post).

BatchConvert returns a PDF with the WORD, EXCEL, VISIO representations but returns nothing for AutoCAD. It makes no attempt to launch AutoCAD, and returns no error, i.e. "GetLastErrorMsg" reports ‘Operation Completed Successfully’.

Any suggestions to correct this?

Here is the bare code:

cdi.PDFDriverInit ("OUR PDF Converter")
cdi.EnablePrinter "OUR Inc", "07EFCDAB010001…... Etc…"
cdi.SetDefaultPrinter

‘use only ONE of these:
strFilename = "C:\Temp\Test.vsd" ‘VISIO drawing WORKS
strFilename = "C:\Temp\Test.doc" ‘WORD WORKS
strFilename = "C:\Temp\Test.xls" ‘EXCEL WORKS
strFilename = "C:\Temp\Test.dwg" ‘AutoCAD drawing does NOT work

‘------------------------------

cdi.DefaultFileName = "c:\temp\ourtest.pdf"
cdi.FileNameOptionsEx = 1 + 2
cdi.DefaultDirectory = "c:\temp"
cdi.SimPostscript = False 'True
cdi.ImageOptions = 2
cdi.SetDefaultConfig

cdi.BatchConvert strFilename ‘<< works with VISIO, WORD, EXCEL, not with AutoCAD drawing

MsgBox "After BatchConvert = " & cdi.GetLastErrorMsg ‘<< reports ‘Operation Completed Successfully’ even though no PDF was created.>>

cdi.RestoreDefaultPrinter
cdi.DriverEnd
aldewacs2
Posts: 6
Joined: Thu Apr 26 2007
Location: CANADA

Post subject: PDF Converter - problem converting AutoCAD fil

Post by aldewacs2 »

Thanks to Jose for the help so far.

AUTOCAD PRINT:

To print to AutoCAD from Windows Explorer: File Type Associations after installation of AutoCAD (R14) yields a BLANK for the “Print” action word.
To get there: IE select a DWG file in explorer –click Tools > Folder Options > File Type > (select DWG file) > shows “open” and “print”, but there is no information at all under “print” when clicking the EDIT button. (it fails to open). I can recreate the "print" data, but need to know what to enter to trick AutoCAD into responding.

Does anyone have such information for the “print” and/or “printto” action word, and would you be kind enough to share the settings with a frustrated soul?

I’m trying to batch-print through a printer driver, and apparently that information is what’s lacking. BatchConvert() apparently uses this information.

Much appreciated!
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hi,

I don't have AutoCad to know what are the infomraiton to be entered for Print and Printto, however i suggest that you check any other file format like powerpoint or Word and copy the data while adjusting it as needed.
aldewacs2
Posts: 6
Joined: Thu Apr 26 2007
Location: CANADA

AutoCad

Post by aldewacs2 »

Joan,
Thanks for the suggestion.
I tried to do that (with WORD, EXCEL etc), however the required information is too specfic to AutoCAD and not easily guessed.

That's why I asked the community to see if I can get more specifc information from an actual succesful user.
Post Reply