AutoCAD

How To Translate PDF SHX Into Mtext – AutoCAD Blog

How To Translate PDF SHX Into Mtext – AutoCAD Blog
Wei Zhang
Written by Wei Zhang

Understanding the Challenge of PDF Imports in AutoCAD

Importing vector-based PDFs into AutoCAD can greatly enhance your workflow, but it comes with challenges, particularly when it comes to font compatibility. TrueType fonts typically import seamlessly; however, SHX fonts translate into individual polyline segments, complicating the text recognition process. This guide will walk you through the steps to convert these polyline representations into usable Mtext within AutoCAD 2025.

Step 1: Initiate the PDF Import Process

Begin by opening your AutoCAD 2025 application and locate the PDF file you wish to import. Use the ‘PDF Import’ command, found in the ‘Insert’ tab or via the command line, to load your PDF. You will notice that some text will not import as editable text due to the use of SHX fonts.

Step 2: Recognizing SHX Fonts

After the PDF has been imported, it is crucial to identify the SHX fonts that failed to import correctly. These will appear as series of polylines. To convert these into Mtext, you will utilize the ‘PDFSHXTEXT’ command, which allows for the recognition and conversion of the font.

Step 3: Access the Recognition Settings

Upon initiating the PDFSHXTEXT command, the software will prompt you to select the objects. Before doing this, ensure you adjust your recognition settings. Access the PDF Text Recognition Settings dialog box, where you can specify which SHX fonts to compare against. If you know the specific font used, like Simplex, check that option.

Step 4: Selecting Fonts for Recognition

In the settings dialog, you’ll find a section labeled "SHX fonts to compare." Choosing the correct fonts will assist in improving your recognition accuracy. You can select multiple fonts if there’s a possibility of mixed font usage in the drawing. If uncertain, tick the “Use best matching font” option to allow the program to select the closest possible match automatically.

Step 5: Adjust Recognition Parameters

The parameters within the dialog include a Recognition Threshold slider. Generally recommended to keep this at the default setting of 95, adjustments might be necessary depending on your specific scenario. Ensure you explore the preview box to see a visual representation of the selected font which aids in confirming your font choice visually by entering example text.

Step 6: Executing the Recognition Process

Once your settings are configured, click ‘OK’ to exit the dialog and proceed to select the text you want to convert. It’s advisable to zoom in and select smaller groups of polylines, as this will yield better results than selecting large areas.

The tool will perform its function and provide feedback on the conversion process. Pay attention to the results, especially if any segments were not converted successfully. This insight will help understand what remains and may need further attention.

Step 7: Combining Converted Mtext

After executing the recognition command, the output may consist of several individual lines of Mtext. To create a unified text object, use the ‘Combine Text’ tool found in the Import panel. Simply select the separate lines and initiate the command, which will merge them into one cohesive Mtext object.

Frequently Asked Questions

1. Why do SHX fonts not import correctly as text?

SHX fonts are stored as vector graphics in PDF files, leading them to render as polylines rather than editable text. This necessitates the use of the PDFSHXTEXT command for conversion.

2. Can I preview the recognized fonts before finalizing the conversion?

Yes, during the recognition settings configuration, there is a preview box that allows you to see how the selected font compares to text in your drawing by entering sample content.

3. Is it necessary to adjust the Recognition Threshold for each project?

While it’s generally best to keep the Recognition Threshold at its default setting of 95 for optimal performance, you might need to adjust it based on the complexity of the text and the variety of fonts present in your PDF to achieve the best results.

About the author

Wei Zhang

Wei Zhang

Wei Zhang is a renowned figure in the CAD (Computer-Aided Design) industry in Canada, with over 30 years of experience spanning his native China and Canada. As the founder of a CAD training center, Wei has been instrumental in shaping the skills of hundreds of technicians and engineers in technical drawing and CAD software applications. He is a certified developer with Autodesk, demonstrating his deep expertise and commitment to staying at the forefront of CAD technology. Wei’s passion for education and technology has not only made him a respected educator but also a key player in advancing CAD methodologies in various engineering sectors. His contributions have significantly impacted the way CAD is taught and applied in the professional world, bridging the gap between traditional drafting techniques and modern digital solutions.