Author Topic: SHX-text as Text to PDF?  (Read 13207 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 650
SHX-text as Text to PDF?
« on: July 01, 2014, 07:13:47 AM »
Hi

usually, SHX-strings are converted to "Lines which looks like a string" while creating a PDF.

Are there solutions / apps which can create searchable text in PDF, based on SHX?

Thanks and regards
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: SHX-text as Text to PDF?
« Reply #1 on: July 01, 2014, 08:40:12 AM »
Nope, though you can change the font to a TTF font instead before you plot/save the PDF.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Peter2

  • Swamp Rat
  • Posts: 650
Re: SHX-text as Text to PDF?
« Reply #2 on: July 01, 2014, 08:51:53 AM »
Nope, though you can change the font to a TTF font instead before you plot/save the PDF.
Thanks. The answer leads to the next question:

Who knows / has experience with a "SHX to TTF converter"??  :?
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: SHX-text as Text to PDF?
« Reply #3 on: July 01, 2014, 09:07:51 AM »
Who knows / has experience with a "SHX to TTF converter"??  :?
You don't need a converter. You change the style's font in AutoCAD's style dialog - just type style at the command-line.

If you want similar appearance, then AutoDesk's already added most of the standard SHX fonts as TTF fonts. These are actually used to display in the MText editor. Unfortunately you can't directly use them as is in ACad. You'd need to make new copies of them and then rename the files before you can set the style to those fonts in acad.

If you've got special SHX fonts and want to turn them into TTF's. I'm sorry but that's rather difficult - the 2 font definition types aren't compatible. A SHX is like a description of how to move a pen to make each character, while a TTF is like a description of the borders around a filled in space for each character.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Peter2

  • Swamp Rat
  • Posts: 650
Re: SHX-text as Text to PDF?
« Reply #4 on: July 01, 2014, 09:26:16 AM »
...If you've got special SHX fonts and want to turn them into TTF's. I'm sorry but that's rather difficult - the 2 font definition types aren't compatible....
This is why I asked (but to be honest, with not much hope  :cry: )

Thanks irneb, maybe another user has an advice (but I'm realistic ....)
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SHX-text as Text to PDF?
« Reply #5 on: July 01, 2014, 02:33:23 PM »
Can't be that difficult to create a TTF file.
http://www.ehow.com/how_6956130_create-ttf.html
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SHX-text as Text to PDF?
« Reply #6 on: July 01, 2014, 02:35:30 PM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

ROBBO

  • Bull Frog
  • Posts: 217
Re: SHX-text as Text to PDF?
« Reply #7 on: July 01, 2014, 04:39:34 PM »
Perhaps mapping your shx font to a ttf would solve this. Haven't tried this, but perhaps adding a line in your acad.fmp: e.g. romans.shx; romans__.ttf
might work.
« Last Edit: July 01, 2014, 05:13:37 PM by ROBBO »
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

Peter2

  • Swamp Rat
  • Posts: 650
Re: SHX-text as Text to PDF?
« Reply #8 on: July 01, 2014, 04:44:14 PM »
Thanks to both of you.
@CAB:
I will save the links for later use.

@ROBBO:
Yes, mapping could / should work - if there exists a corresponding TTF.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

ROBBO

  • Bull Frog
  • Posts: 217
Re: SHX-text as Text to PDF?
« Reply #9 on: July 01, 2014, 04:55:37 PM »
A ttf font should exist as the mtext editor uses these to display the the text styles, I believe.

http://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/Some-TrueType-fonts-not-listed.html
« Last Edit: July 01, 2014, 05:27:53 PM by ROBBO »
The only thing to do with good advice is to pass it on.
It is never of any use to oneself.

Oscar Wilde
(1854-1900, Irish playwright, poet and writer)

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: SHX-text as Text to PDF?
« Reply #10 on: July 02, 2014, 11:38:53 AM »
Just be aware that if you xref a file with a lot of TTF text, the resulting drawing will become EXTREMELY slow to open. We have had some take as much as an hour to open due to the number of xrefs that had TTF fonts in them, we changed them to SHX in all of the xRefs and the same file opened in under a minute.

Here is the thread that I had asking about changing TTF fonts to SHX fonts through LISP:
http://www.theswamp.org/index.php?topic=47156.0

If you want the text to be searchable though, you can use Bluebeam Extreme as your PDF reader and use the OCR feature, I find that it is extremely accurate and very fast. You can find more details about it at: http://bluebeam.com/us/products/revu/extreme.asp

This would avoid the TTF performance hit in your drawings at least.

I would also think that you could use a reactor and modify the LISP routine above to automatically change SHX styles to TTF before potting, them change them back once the plot is done and this may also help avoid the performance hit as far ans opening and closing the drawings go. Although plotting drawings with a lot of TTF text in them also has a similar performance hit, especially within xRefs.
« Last Edit: July 02, 2014, 11:48:00 AM by cmwade77 »

Peter2

  • Swamp Rat
  • Posts: 650
Re: SHX-text as Text to PDF?
« Reply #11 on: July 02, 2014, 12:39:06 PM »
Just be aware that if you xref a file with a lot of TTF text, the resulting drawing will become EXTREMELY slow to open. We have had some take as much as an hour to open due to the number of xrefs that had TTF fonts in them, we changed them to SHX in all of the xRefs and the same file opened in under a minute. ....
That's good to know (again). I made this experience 15 years ago (Acad 14, 2000), but since this time I did not use such big files again. In the meantime I thought this issue is solved - better integration in OS, high-speed machines and so on.
So I'm surprised the issue still exists.

...Here is the thread that I had asking about changing TTF fonts to SHX fonts through LISP:...
Yes, I think my next steps will investigate in the results above: mapping, font changing, ...

...If you want the text to be searchable though, you can use Bluebeam Extreme as your PDF reader and use the OCR feature, I find that it is extremely accurate and very fast. You can find more details about it at: http://bluebeam.com/us/products/revu/extreme.asp ...
I made only quick tests with OCR inside the "PDFXChange-Viewer". I saw that it works fine on newspapers and old typewriter-text, but with new created PDFs using ISOCP.shx it has problems to distinguish "1 l t  f I ..."
But I'm aware that OCR is a science and not "click to button - done" solution.

Peter
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: SHX-text as Text to PDF?
« Reply #12 on: July 02, 2014, 06:31:37 PM »
Just be aware that if you xref a file with a lot of TTF text, the resulting drawing will become EXTREMELY slow to open. We have had some take as much as an hour to open due to the number of xrefs that had TTF fonts in them, we changed them to SHX in all of the xRefs and the same file opened in under a minute.

I'm not noticing this...  Maybe you could define "lot of TTF text"   :?

Is it possible it was applying font mapping or alternate font substitution for TTF fonts not installed?
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

danallen

  • Guest
Re: SHX-text as Text to PDF?
« Reply #13 on: July 02, 2014, 06:53:39 PM »
I just did a test of lots of TTF text xreffed into a file, image attached. No change in drawing open. My guess is that many texts say on a site plan with rotations, scales, etc, might affect plotting and regens, but not drawing opens.

Dan

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: SHX-text as Text to PDF?
« Reply #14 on: July 02, 2014, 07:25:21 PM »
Just be aware that if you xref a file with a lot of TTF text, the resulting drawing will become EXTREMELY slow to open. We have had some take as much as an hour to open due to the number of xrefs that had TTF fonts in them, we changed them to SHX in all of the xRefs and the same file opened in under a minute. ....
That's good to know (again). I made this experience 15 years ago (Acad 14, 2000), but since this time I did not use such big files again. In the meantime I thought this issue is solved - better integration in OS, high-speed machines and so on.
So I'm surprised the issue still exists.

...Here is the thread that I had asking about changing TTF fonts to SHX fonts through LISP:...
Yes, I think my next steps will investigate in the results above: mapping, font changing, ...

...If you want the text to be searchable though, you can use Bluebeam Extreme as your PDF reader and use the OCR feature, I find that it is extremely accurate and very fast. You can find more details about it at: http://bluebeam.com/us/products/revu/extreme.asp ...
I made only quick tests with OCR inside the "PDFXChange-Viewer". I saw that it works fine on newspapers and old typewriter-text, but with new created PDFs using ISOCP.shx it has problems to distinguish "1 l t  f I ..."
But I'm aware that OCR is a science and not "click to button - done" solution.

Peter
We used to use PDF xChange Viewer, but we ran into similar issues, Bluebeam Extreme, while slightly more expensive does an excellent job with OCR on CAD drawings in my experience. There is a free trial to test it.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: SHX-text as Text to PDF?
« Reply #15 on: July 02, 2014, 07:30:11 PM »
Just be aware that if you xref a file with a lot of TTF text, the resulting drawing will become EXTREMELY slow to open. We have had some take as much as an hour to open due to the number of xrefs that had TTF fonts in them, we changed them to SHX in all of the xRefs and the same file opened in under a minute.

I'm not noticing this...  Maybe you could define "lot of TTF text"   :?

Is it possible it was applying font mapping or alternate font substitution for TTF fonts not installed?
I would say about 5,000 individual pieces of text per drawing, with about 50 different text styles. With approximately 15 drawings (all with this) xrefed into our drawing. So this results in about 50,000 individual pieces of text with about 500 text styles referenced into one drawing.

The drawings were not created by us, we simply have to use them as our backgrounds.

This was definitely the cause of the problems, because all w did to fix the open times was change everything to SHX fonts and it disappeared. Now, it could be some combination of being a TTF and have text rotated or width factors defined, etc. but changing to SHX fixed the problem.

We only made the switch because AutoDesk told us that this was the problem that was causing the slow down and sure enough, they were right.

danallen

  • Guest
Re: SHX-text as Text to PDF?
« Reply #16 on: July 02, 2014, 08:54:48 PM »
OK 50,000 texts is nuts. But was it really the drawing open, or the drawing regen? You might test by turning on QTEXTMODE. I totally get regens being crazy with TTF, just not understanding why drawing open would be a problem.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: SHX-text as Text to PDF?
« Reply #17 on: July 14, 2014, 01:23:28 PM »
OK 50,000 texts is nuts. But was it really the drawing open, or the drawing regen? You might test by turning on QTEXTMODE. I totally get regens being crazy with TTF, just not understanding why drawing open would be a problem.
Not positive, but honestly, at this point, changing them to SHX fixed the problem, so I am going to leave it be.

danallen

  • Guest
Re: SHX-text as Text to PDF?
« Reply #18 on: July 14, 2014, 03:14:14 PM »
oh I agree, no argument with your solution. My only thought is that for "normal" projects without 50K+ texts, TTFs work just fine and have benefit of searchability. Adding OCR processing to our workflow is possible but not desirable to use SHX. I really with our consultants would use TTF, so that I can search their drawings, and copy/paste their notes as required.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: SHX-text as Text to PDF?
« Reply #19 on: July 15, 2014, 04:30:09 PM »
oh I agree, no argument with your solution. My only thought is that for "normal" projects without 50K+ texts, TTFs work just fine and have benefit of searchability. Adding OCR processing to our workflow is possible but not desirable to use SHX. I really with our consultants would use TTF, so that I can search their drawings, and copy/paste their notes as required.

Interesting, no one has ever wanted to copy our notes, simply because they pertain specifically to our disciplines.

danallen

  • Guest
Re: SHX-text as Text to PDF?
« Reply #20 on: July 15, 2014, 06:12:53 PM »
Interesting, no one has ever wanted to copy our notes, simply because they pertain specifically to our disciplines.

I might copy a consultant's notes for response to a contractor's RFI, or other project related email.