Jump to content

Creating Searchable PDF's


Bill Tillman

Recommended Posts

I have found out this morning that the PDF files I've been creating from AutoCAD are not searchable if we're using any .shx type font. Well, of course you can guess what type of font all 90K plus drawings we have in storage are using as the default font. *.shx all over the place.

 

Now I also hear that Adobe has a tool called PDFMaker which will provide a workaround for this which does not involve changing the font type in 90K plus drawings.

 

Can anyone elaborate more on this. I of course am looking for an Open Source solution which will be Free instead of having to shell out $$$ for new software.

 

I should add here that I combine about 780 individual PDF files into a single file. Then the users want the ability to search for text in this file which using the method I'm using now does not work because *.shx fonts are rendered as graphics, not text when the PDFs are created.

Link to comment
Share on other sites

Didn't believe it myself until I read it. And I believe everything I read...especially the stuff that's on AutoDesk's website.

 

http://knowledge.autodesk.com/support/autocad/troubleshooting/caas/sfdcarticles/sfdcarticles/How-to-create-selectable-and-searchable-text-in-a-PDF-from-AutoCAD.html

 

BTW I just spent the past 9 days in Big D. Loved it. The weather was great and I got at least a couple of hours of sight seeing at the State Fair before I had to fly home. Oh yes, and the Cowboys are now 6-1. Woo hoo!

Link to comment
Share on other sites

Thanks for the link. That workaround still seems like too much work. Simply switching to TTF corrects everything, really.

 

We have the best State Fair. I think we win 1st nation-wide every year. And yes, Cowboys are finally doing good which makes most Dallas residents happy. I'm a hockey fan so the Cowboys are the least of my interest in the sporting domain. :)

Link to comment
Share on other sites

I thought at one time that "making SHX convert to true, readable text during PDF creation" was on the augi wish list. I can't find it at the moment, but maybe we'll get it someday.

I don't mind TT fonts in general, but they are still too flaky to use in everyday production work.

Long live SIMPLEX.SHX :-)

(and thankfully, searchable PDF's are not high on our list)

Link to comment
Share on other sites

... That workaround still seems like too much work. Simply switching to TTF corrects everything, really.

 

Yes, going forward switching to TTF's may be the ticket, but with 90K existing drawings....it won't be that easy. This is a special project we're doing so it's basically a once or twice a year thing that will happen. But having this single PDF file with all the parts in it has become very popular around here. No one knew how to merge PDF files and they don't have the expensive tools like Adobe and Bluebeam here so I used Ghostscript command line on a Linux server to merge them all into one file. Then simply by using the down arrow key you can start scrolling through pages quickly. But they also would like to search and with this PDF file at least we're not quite there.

 

We're also deploying Autodesk Vault Professional 2015....but.... and there's always a big BUT! Vault 2015 Professional is still lacking the ability to do text searches inside of the files. It's supposed to have been fixed by now...according to our re-seller. If they don't fix it soon we will have to downgrade to 2014 and my bosses are going to let me here about it.

Link to comment
Share on other sites

For 90k drawings I would approach a programmer to develop something if one can't be found to batch replace the font. Even if it ranges in the thousand dollar range, it would be worth it in my opinion.

 

Sometimes budgets need to exist for things such as this. But yes, going forward with TTF would be the best bet.

Link to comment
Share on other sites

Do you have any examples?

 

 

TT Text objects that are not at 0.0 elevation look fuzzy on screen and on the plot preview (but strangely enough, seem to plot OK)

This is a problem on certain C3D labels that automatically acquire the elevation of whatever you're labeling. Not a showstopper, but an annoyance.

 

Trying to snap to the INS point of TT text is an adventure. Same for selecting them sometimes.

 

Zoom out far enough and all the TT text becomes a blob

 

One that I've seen occasionally, but I can't reproduce on demand -- I've seen mtext blocks that literally move when plotted.

It's pretty rare, but I've seen it a couple times over the last couple of years.

We had to delete the entity and create a new one.

That may not even be TT related, but it did happen with TT text which at time was rarely used here.

Edited by rkmcswain
add quote
Link to comment
Share on other sites

Those are pretty much all the same examples I've encountered. But, given those "mere annoyances" I still stand by searchable PDF's with TTF. Being on the receiving end of a PDF set where nothing but SHX fonts is used is very depressing nowadays. For instance:

 

In the MEP realm, lots of "tags" are used to label equipment (such as RTU-5 for Rooftop Unit #5). If I need to track down something in the set related to RTU-5, I can't do it with SHX fonts. So now I have to spend tons of time going page by page, note block by note block to gather all the info I can regarding it, and still I run the possibility of missing something. TTF gives me the ability to be more accurate, and speed up my efficiency. And, let's not forget that "rush plot" ever so often when SHX fonts was put on a wrong layer/color and it made the font so bold it's unreadable.

 

TTF fonts all the way for me in AutoCAD. Revit is TTF only so no issues there. :)

Link to comment
Share on other sites

Using archquick.shx, In AutoCad 2014 and 2015, I get flying spear points on the high and low ends of the angled lines of "A", "K", "M", "W", "X", and "Y". The characters look like poo, and they're at least 1/4 as big as they should be. Funny thing, they only look like that on preview, and in pdf format, even printed pdf's, but never when plotted straight to paper. But the powers are hanging with the "standard company fonts" no matter what, even after having suffered a dose of chagrin when they found out their GC/builder client was upset that their pdf submittal package was not searcheable.

 

It wouldn't be so bad, except that a good 2/3 of the words on architectural millwork drawings are WD-'nn', the word TYP, and MATERIAL.

 

I live by TT fonts when working for any other client except these guys.

Link to comment
Share on other sites

Re writing a program it would not be hard to open a dwg and redefine the font then save, you will be suprised how quick it can be. As you are not actually chnging stuff inside then regens which slow stuff down is not applicable.

 

I write lots of scripts and using MS word you can create say 100 dwg changes script in a few minutes. I take it the dwg's are grouped into directories.

 

A quick lesson go to start CMD

change drive say Q:

cd projects\123456\final\oct 2014

dir *.dwg >dirlst /b

 

this makes a text file called dirlist.txt

 

Using word open it and you can use the search and replace for ^p this is end of line so 1st pass is serachreplace ^p with Open ^p

You should now have open dwg1, next line open dwg2 and so on. Next do again but swap the ^p searchreplace ^p with (load "swapshp") close y^p

you should now have open dwg1 (load "swapshp") close Y

 

Your script is ready, I have used a lisp but you do commands also to make eplanation simpler.

 

Check out www.Lee-mac.com has a script editor and I m pretty sure it opens directories and makes dwg list etc.

Link to comment
Share on other sites

I do automate tasks with code a lot these days. My tool of choice for this is Visual Studio and some .NET code. .NET includes a class called DirectoryInfo which makes getting all the files in a folder a snap. Even does the recursive search for you without breaking a sweat. Once you've got everything in an array, you're off and running to do batch processing of all kinds. Like the one I did yesterday for these folks to print almost 500 CAD files to PDF. Once I merged them into a single file the subject of searching came up, thus this thread. At the moment, we're not talking about doing all 90K drawings. But moving forward I think this is an important step. We send PDF's out all the time to clients. Some ask for the CAD file but most only want the PDF. And with multi-sheet files, searching is imperative.

 

Also, I just read that saving PDF files using text rather than raster saves space.

Link to comment
Share on other sites

Its the sort of thing you do at lunch or say a directory every night and go home. Not sure but try open two copies of Autocad (not two dwg's) in one work as normal in other have your script running do shx change. This way say 15 mins a day may do hundreds per day.

Link to comment
Share on other sites

Bill Here is change the style to a different font note it needs full path to work. As part of your script I would autoload then just (chgshx) in your script

 

(defun chgshx () 
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for lay (vla-get-Textstyles doc) 
(if (= (vla-get-name lay)"Standard")
(vla-put-fontFile lay "C:\\windows\\fonts\\Arial.ttf" )
)
)
)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...