Professional Documents
Culture Documents
However, if you know a little JavaScript and are motivated enough you can make
some mark-up tools that are just a little bit smarter.
I don’t really know JavaScript, nor am I that motivated to fully learn it either, but I
managed to cobble something together based on some googling and some
perseverance. I never managed to nd that much useful information on
JavaScript and PDF’s, seems to be something that just isn’t discussed in great
detail.
If you didn’t know, one thing about PDF’s that is quite cool is that you can embed
JavaScript code within form elements to do some magic in your documents. One
area where this proves useful as an Engineer is in the use of stamps in Bluebeam.
For example, when you place a stamp you can have some dynamic elds on the
stamp update as the result a calculation and/or prompt user for some input. With
some imagination you can create something quite useful that has potential to
make you a little more ef cient.
What I’ll attempt to show you here is some simple tricks to make some of these
smarter tools. Presumably if you are uent in JavaScript this will open up some
further possibilities to you.
I basically have zero JavaScript knowledge, it’s not really my thing, but it works
usually by virtue of perseverance and brute force trying various bits and pieces of
code.
But I can kind of follow along in terms of the logic being used in JavaScript (as
I’m sure you will be able), so it’s entirely possible to cobble together something
with a bit of experimentation & logical.
To access the editor functions you need to enable the forms Toolbar. Or access it
through the Tools menu in the title bar.
forms toolbar
This allows you to add form elements like textbox’s, radio buttons, check box’s
and the like to a PDF. It’s within the settings for these form elements that you
can start to embed JavaScript under the Calculations section if you select for
example to add custom calculation.
Create a new PDF and draw your weld symbol, freehand or using the mark-up
tools. Once you’ve completed your masterpiece, save you new stamp in
Bluebeam’s stamp folder.
If you now open your stamp through the stamps menu to edit it further. You will
note that there are some handles at the edge of the PDF sheet that can be
dragged around to set the view extent. Adjust these until they closely encompass
your llet weld mark-up like shown below: –
Now add a textbox in the correct location for the weld size. Select this textbox
and add the following code in the JavaScript editor under
Settings>Calculate>Custom calculation eld.
This essentially means once the mark-up is placed it will create and event that
prompt for a llet weld size, the text entered at this prompt populates the
textbox that you added the JavaScript code to. Your stamp should now look like
below, adjust the formatting if required. Save and close the stamp.
Then use the stamp in a PDF and you’ll be prompted for the llet weld size: –
Your stamp should appear with whatever leg size you entered in the textbox.
Champion.
Conclusion
You’ve created your rst dynamic stamp. Engineer 1, Sheep 0!
PREVIOUS NEXT
Leave a Reply
Name *
Email *
Website
Add Comment
Save my name, email, and website in this browser for the next time I comment.
POST COMMENT
Related Posts
Doing some cool stu with JavaScript in Bluebeam (Part 2)
May 23, 2020 / 3 Comments