Font-related exception when converting DWG file to PDF
Emilsson
4/9/2018 2:20 PM
|
---|
Hi
I'm getting the following exception when trying to convert a specific DWG to PDF using the PdfExporter class.
Unhandled Exception: System.ArgumentException: Cannot locate table 'prep'
Parameter name: tableName
at ..(String tableName, Boolean optional)
at ..()
at ..(MemoryStream output)
at ..get_FontData()
at WW.Pdf.Font.PdfFontCreator.(PdfBody body, String pdfFontID, Font font, cidFont)
at WW.Pdf.Font.PdfFontCreator.AddFont(PdfBody body, String pdfFontID, Font font)
at WW.Pdf.Font.FontSetup.(PdfBody body)
at WW.Pdf.PdfWriter.(PdfBody body)
at WW.Pdf.PdfWriter.Write(Boolean closeStream)
at WW.Cad.IO.PdfExporter.EndDocument()
The error is related to a specific character in the DWG file, which Autocad also seems to be having problems with as it renders as just a square ("□"). If that character is removed the conversion works fine. Setting either PdfExporter.EmbedFonts or GraphicsConfig.TryDrawingTextAsText to false also avoids the error.
I've attached some related files: a C# test application, the dwg-file and a screenshot showing the problematic text.
Regards
/Tomas Emilsson
|
Wout
4/9/2018 7:55 PM
|
---|
Hi,
The problem has been fixed. That character indeed is represented as a square, the same way that AutoCAD renders it.
Thank you for the report!
- Wout
|
Emilsson
4/10/2018 5:43 AM
|
---|
That is awesome. Thanks!
|