We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Convert DWG to PDF in Java

Hi,

We are in the process of evaluating the groupdocs-conversion Java solution and for now we found problems converting autocad formats

1 - It takes a lot of time per example

Convert from DWG to PDF
- Size original file => 4 867 Ko
- timeTaken => 5005 seconds
- Size converted file => 54 121 Ko

we tried to convert the same file to PDFA_1B but we had (java.lang.OutOfMemoryError: GC overhead limit exceeded)even by allocating 3gB of memory

is there an option to set a timeout to stop the conversion ?

2 - The content of the converted file is not good, as you can see in the attached screenshots

  • Converted with groupdocs-conversion : groupdocs-conversion.png
  • Converted with another product : ap#0.png, ap#1.png

NB : for privacy policy I cannot provide the dwg files

if you have any suggestions or pdfoptions to define for a better result ?

ap#0.png (48.1 KB)
ap#1.png (77.2 KB)
groupdocs-conversion.png (56.6 KB)

@hsalaheddine

Do you face this issue with a particular DWG? Could you please share any DWG using that issue could be reproduced (we need it for a proper investigation)? Also specify the API version that you are evaluating (e.g. 20.10, 21.1) and the conversion code.

#API version => groupdocs-conversion : 21.10.1

#Conversion code :

//Pass DWG as a constructor parameter
Converter converter = new Converter(FILE_DWG);
PdfConvertOptions options = new PdfConvertOptions();
PdfOptions pdfOptions = options.getPdfOptions();
//set PDF format
pdfOptions.setPdfFormat(PdfFormats.PdfA_1B);
options.setPdfOptions(pdfOptions);
converter.convert(convertedFile, options);

For now I cannot provide the dwg files I’m waiting for permission (privacy policy)

@hsalaheddine

Looking forward to that. You can share any DWG using that issue could be reproduced.

Hi,

we are testing with other dwg files to see if we trigger the same issue

It depends on the files, the conversion takes a long time and sometimes we had a “GC overhead limit exceeded”

Please tell me if there an option to set convert resources timeout and prevent long rendering

sometings like ResourceLoadingTimeout but for conversion

@hsalaheddine

We are investigating this issue. Your investigation ticket ID is CONVERSIONJAVA-1551. However, as far as conversion results are concerned. You still have to share a problematic AutoCAD file.