Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to output SHX fonts as Comments in ACAD 2015?

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
1027 Views, 7 Replies

How to output SHX fonts as Comments in ACAD 2015?

I am using ObjectARX and C#.

 

In ACAD 2016+ I'm able to set EPDFSHX = 1, and PDFTEXTRENDER = 1

which will output all SHX and TrueType fonts to comments in the resulting PDF.

 

However, in ACAD 2015  EPDFSHX is not available (nor is PDFSHX).

 

Without printing, using ONLY ACAD 2015, is there any way to get ACAD 2015 to output a PDF so that

the SHX text is searchable (as comments or any other way) ?

 

 

7 REPLIES 7
Message 2 of 8
pendean
in reply to: Anonymous

You need to use a more current version of AutoCAD than oldie 2015: switching to only use TTF is your choice in 2015 and older.
Message 3 of 8
Anonymous
in reply to: pendean

So, natively from within 2015 there is no way at all, even when using the SDK?

 

I've read that it might be possible by exporting to DWF first - any ideas on that?

Message 4 of 8
pendean
in reply to: Anonymous

2016 or newer if you want that Autodesk PDF feature.

You can test DWF without asking my friend 🙂
Message 5 of 8
cadffm
in reply to: Anonymous

In 2015 and earlier that feature isn't available, not for users and not in api.

 (can i ask, WHY you need that? Only for viewing PDFs (and search for Word "by hand")

or is your Workflow longer and you want to do (whatever) with the content?

 

Possible Workarounds:

a) Use TTF Fonts

b) Use (only) SHX Fonts and edit your pdfs- run a OCR function and save the file (best result for searchable PDFs)

 

111-Model.pdf standard pdf plot,  all TTF-(M)Text are searchable

222-Model_OCR.pdf standard pdf plot, later i runs a OCR function. All (M)Text are searchable.

(and you see why i prefer "(only) SHX Fonts" for the best result, because you will find TTF-Text doubled in the PDF.

One time by the normal PDF information and one time more because of the OCR-generated data, so better is

to use only TTF, or only SHX (with OCS editing)

 

 

Sorry, i dont know why, but i cann ot upload my sample file here/now.

Sebastian

Message 6 of 8
Anonymous
in reply to: cadffm

Why do I need the SHX output as comments in my PDF?

- So that I can do a search for specific words without having to review the entire sheet

- This also allows for automated searching and indexing of the content of the sheet for database referencing

 

My workflow is this:

I need to automate the conversion of thousands of DWGs to searchable PDFs using AutoCAD 2015.

If I change the SHX to TTF (which I can do using code/api) I risk text reflow and changing the layout of text on every sheet - so I can't do that.

 

I've tried over a dozen OCR applications to post-process the PDF and none of them provide the accuracy I need.

Most OCR apps/libraries return about 50-60% accuracy which is basically worthless. I've tried Asprise, FoxIt, Debenu, QuickPDF, Aquaforest, IronOCR, Tracker, ABBYY, ByteScout, OmniPage, and more.

 

What OCR did you use?

What accuracy did you achieve?

Message 7 of 8
cadffm
in reply to: Anonymous

"I need to automate the conversion of thousands of DWGs to searchable PDFs using AutoCAD 2015."

So it is a one-time Job (in this size/for thousends of files), why it isn't possible to use a version 2016.1+

for this Job?

 

"If I change the SHX to TTF (which I can do using code/api) I risk text reflow and changing the layout of text on every sheet - "

Good point, well. If you want to go this way (using ttf) you should change the right ttf font to the right shx font,

But there is a residual risk for special characters. If you know the content of DWGs and if they created under

restrictet rules (Standards), it should the best way if 2016SP1 is not available.

 

"I've tried over a dozen OCR applications to post-process the PDF and none of them provide the accuracy I need."

Yes, bigger the Papersize and smaller the Text, it is not easy to find a software who working well with this pdf.

 

"What OCR did you use?"

I use ABBYY, OmniPage and Adobe Acrobat!

 

"What accuracy did you achieve?"

~90-100%

But this statement is surely unfair because i had best conditions 😉

I could choose the best possible font
Free text, adapt text rotations and width - because I created the PDF directly before and the contents of the DWG was known to a large extent.
And the plans are only DINA4 formats.

But I remember it well: that too was hard work until everything was coordinated.
Only details I can not remember, only that everything afterwards fully automatic worked.

And: I did not have to provide this as a solution for others, I did all the work and controlled.

 

My way, when it is not so problematic with these files:

Change all shx to ttf for these fonts you have a fit ttf (and/or  you can create your own Fonts).

In My small sample file (i will try the uppload again) used ISOCP.shx and ISOCP.ttf side by side.

I know that this example is not a practical comparison, just a simple example.

 No chance, i can not upload my *.pdf files 😞

Sebastian

Message 8 of 8
m_latz
in reply to: Anonymous

If you are firm with ObjectARX write a function to plot to pdf and after the pdf file is created dump all text entities from your drawing into the pdf file. Then you have also the advantage to filter the text elements you want to write to your pdf file. We used for a similar project PDFLIB (http://www.pdflib.com/). Very fast and stable API.

 

regards

 

Markus

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

State of Sustainability Webinar


AutoCAD Inside the Factory