Skip to main content

Lesson 7: Difficult PDFs

Sometimes a check fails on a drawing that looks perfectly correct on screen. The value is there, you can read it, and yet NodePDF reads nothing, or reads it twice. This lesson shows the three most common causes, how to recognise each in the report and the Review view, and what can be done about it.

What you learn​

  • What AutoCAD SHX text is, and the project setting Allow AutoCAD SHX text.
  • The No Autodesk SHX text Validator, for asking contractors to fix their plot settings.
  • What Text printed twice means.
  • How to recognise a scan, the Readable text Validator, and what text recognition (OCR) would and would not solve.

Files for this lesson​

Download Lesson 7 files (zip) and unpack it.

FileWhat it is for
template/NDXTEST-NHX-B1-00-DR-A-200100_P02_A3_landscape.pdfThe template for the document type. An ordinary drawing.
check/NDXTEST-NHX-B1-00-DR-A-200130_P01_A3_landscape.pdfDrawing to check.
check/NDXTEST-NHX-B1-01-DR-A-200131_P01_A3_landscape.pdfDrawing to check.
check/NDXTEST-NHX-B1-02-DR-A-200132_P01_A3_landscape.pdfDrawing to check.

All three drawings say "EXAMPLE CLIENT" in the CLIENT box when you look at them. Each one is difficult in a different way.

Three kinds of difficult PDF​

AutoCAD SHX text​

AutoCAD can draw text in its SHX fonts as lines. The PDF then has no real text at that spot, only strokes that look like letters, and an Extract reads nothing there. When AutoCAD plots with comments switched on, it adds an "AutoCAD SHX Text" comment over each text that holds the text, and the project setting Allow AutoCAD SHX text lets Extracts read those comments. The No Autodesk SHX text Validator fails on any PDF with SHX text, whatever the setting: use it when contractors must deliver real text, so that they change their plot settings. See Extracts › AutoCAD SHX text.

Text printed twice​

Some programs print a text twice, exactly on top of itself. You see it once; the PDF holds it twice, and an Extract would read "EXAMPLE CLIENTEXAMPLE CLIENT". NodePDF recognises this and fails every check that reads such an area with the reason Text printed twice, whatever the check itself says. No setting fixes it: the PDF must be produced again.

Scans​

A scanned drawing is one picture of the whole sheet, with no text at all, so every Extract reads nothing. The Readable text Validator fails on such a PDF, which tells a scan apart from a field that is really empty. Text recognition (OCR) in a PDF program would add a text layer that NodePDF can read, but OCR misreads look-alike characters such as O and 0, small grey labels and stamps. For checks that must be exact, ask for the original PDF instead.

Steps​

Set up the project​

  1. Create a new project named Difficult PDFs, drop the lesson 7 template on the Doctypes tab, open the document type and rename it to Drawing.
  2. Add a field validation on CLIENT with Exactly "EXAMPLE CLIENT" (as in lesson 1).

Run the report and read the reasons​

  1. On the Validate tab, choose the three PDFs from the check folder, name the report Lesson 7, and choose Run report. All three drawings fail.

    The Lesson 7 report: all three checks fail, two with "Doesn't match" and one with "Text printed twice"

  2. Export the report to Excel and look at the Results sheet:

    DrawingExtracted TextReasonDetails
    200130(empty)Doesn't matchThe extract is empty
    200131EXAMPLE CLIENTEXAMPLE CLIENTText printed twiceText printed twice in "CLIENT": "EXAMPLE CLIENT" (Expected "EXAMPLE CLIENT")
    200132(empty)Doesn't matchThe extract is empty

    Two drawings read nothing, with the same reason. The Review view tells them apart.

  3. Open 200130 in the Review view. The colour key at the top right says AutoCAD SHX text (1), and the client name is outlined in violet. Hover over it: the pop-up marks it as AutoCAD SHX text.

    The Review view of 200130, with the SHX client name outlined in violet

  4. Go to 200131 with Next file. The client name is outlined in magenta: printed twice.

  5. Go to 200132. The Review view says the PDF has no readable text. Switch on Text items: nothing is outlined, because the page is one picture.

Fix the SHX drawing with the setting​

  1. Open Project › Settings. Under Text, switch on Allow AutoCAD SHX text: extracts also read it.

    Project Settings with the Allow AutoCAD SHX text switch

  2. Run the three PDFs again, named Lesson 7 with SHX. 200130 now reads "EXAMPLE CLIENT" and passes. 200131 and 200132 still fail: the setting does not help them.

    The report Lesson 7 with SHX: 1 passed, 2 failed; the SHX drawing passes

Tell a scan apart (optional)​

  1. On the document type page, choose Add › Validator: Readable text. Leave Minimum text items empty and choose Save.
  2. Run the PDFs again. 200132 now also fails Readable text, with The PDF has no readable text. The two other drawings pass it, because the rest of their text is real text.

Exercise​

Run the three drawings with the setting off, explain each failure from the report's Reason and the Review view, then fix the one that a setting can fix and run them again.

You're done when…

  • the report "Lesson 7" shows Results 3: 0 passed, 3 failed;
  • you can say for each drawing why it fails: 200130 has its client name as AutoCAD SHX text, 200131 has it printed twice, 200132 is a scan with no text;
  • after switching on Allow AutoCAD SHX text, the report "Lesson 7 with SHX" shows Results 3: 1 passed, 2 failed, with 200130 passing.

Check yourself​

Two drawings fail with "The extract is empty". How do you tell an SHX drawing from a scan?
You switch on Allow AutoCAD SHX text. Does the No Autodesk SHX text check now pass on SHX drawings?
What should you ask the sender to do about a drawing that fails with "Text printed twice"?
Would running OCR on the scan make it pass?

See also​