Tony's Traveling Thoughts

Removing Author Name From PDF Annotations

Annotating PDFs with highlights and text notes can be an effective way to provide feedback to others reading the document or those that authored it. However, some situations call for providing that feedback anonymously. This can easily be done by ensuring the author name is blank in your PDF application of choice, but removing the author name from existing annotations can prove difficult.

I recently needed to remove my name from a number of annotations in a PDF and struggled to find a quick and effective method for doing so. Adobe Acrobat Reader was the only option that appeared to let me edit the author section and remove it from each note, but my name was still visible when I opened the file in a different program to confirm the Adobe edits worked.

After spending a bit of time searching for an alternative approach, I went down the path of writing a script to do this for me (here be dragons). I was surprised to learn that many parts of a PDF are structured as dictionaries, which makes them very easy to read and modify using python. The script below uses the pypdf library to read in our PDF file and write out a modified version.

The script iterates through each page of the document looking for a dictionary key labeled ‘/Annots’. It then iterates through each annotation object looking for any that contain a key labeled '/T'. This key stores the author name of each annotation, if it exists. We then remove that key from the dictionary with the pop() method. Finally, a new writer object is created from the modified pages and written to disk.

The input and output file paths are hard-coded in this example. I may revisit this in the future to allow it to run from the command line with a file path given as input, but that will have to be work for another day.

from pypdf import PdfReader, PdfWriter

reader = PdfReader('input.pdf')
writer = PdfWriter()

for page in reader.pages:
    if '/Annots' in page:
        for annot in page['/Annots']:
            obj = annot.get_object()
            if '/T' in obj:


with open('output.pdf', 'wb') as fp:

Link to gist of this script

An Opinion on Opinions

It wasn’t my first time hearing this phrase, but the words, “strong opinions, loosely held,” from a recent episode of The Talk Show With John Gruber stuck with me for some reason this weekend (this weekend was originally back in April … my writing speed is not very fast). If you search for this phrase online, you will find many positive and negative takes on the idea, but for someone working in the oilfield, it resonated for a few reasons.

Strong Opinions, Tightly Held

I run into many people whose approach is closer to, “strong opinions, tightly held.” They decided the right way to do things years ago, or were taught that way by someone who learned it years before that, and nothing you say will loosen their grasp on those opinions. They ignore the fact that technology, products, and the people that make up a particular company you love or loathe all change over time. They don’t allow themselves to explore a different, potentially better way of doing things.

Weak Opinions, Loosely Held

“Weak opinions, loosely held,” is another approach some people take. They are so afraid of making the wrong decision that they try to lean on others to tell them what the “right” call is. This fear may come from a lack of experience, confidence, or good management. Experience can be earned, and confidence can be built over time. Overbearing management that always expects perfection is a lot harder to deal with. There is no single “right” answer for most challenges we deal with. Instead, you make the best decision you can with the information available at the time. And you will be wrong sometimes. I can guarantee it. However, these choices do not have to be a negative experience. We learn from it, apply that knowledge to our decisions going forward, and hopefully, those around us recognize the same.

Strong Opinions, Loosely Held

Finally, we reach the idea of “strong opinions, loosely held.” What this idea says to me is you take in all the available information you can find, use that to inform your opinion on a topic, and put yourself in a position to confidently express that opinion to others. You have a strong opinion, not because you are stubborn or closed-minded, but because you were well-informed when you formed that opinion.

The loosely held piece is where many of us struggle, myself included. You gathered all the information and made an informed choice, so your opinion must be the correct one, right? If only it were that easy. The world is not a static place, with technology moving forward at an increasingly rapid rate. The oil industry can be tumultuous at times, with people moving from one company to another as companies are bought and sold, cultures change, and market share changes. The great service you once received from Abe’s Pump Shop suddenly goes away because the shop foreman and most of his technicians leave to work for Bob’s Pump Shop. The product you hated twenty years ago when it was first introduced continued to iterate and improve over the years and is significantly different from what you are being offered today.

A loosely held opinion is not necessarily a weak one, and the willingness to change one’s mind is not a sign of weakness. Gather as much information as you possibly can to inform your opinions. Be open to new ideas that change how you approached a problem in the past. Be confident in sharing your opinions with others, but be open to their questions and doubts on the topic. With any luck, you will both walk away having learned something from each other.

Please Remember to Be Nice

I stopped off at Founding Farmers before heading home from DC today and walked into a terrible interaction between the restaurant host and a man wanting a table. The man wasn’t happy with the wait time he was given, because he looked around and saw the restaurant mostly empty. I guess he didn’t realize there is a lot more that goes into restaurant service beyond empty tables. Did the restaurant have enough staff to serve all of those tables? Enough kitchen staff to keep up with orders in a reasonable time? Reservations for large parties that would arrive soon? This man didn’t know any of these things and just chose to berate the host for not immediately seating him and his friend before storming out.

Bravo to the restaurant host for keeping his cool through all of this. And who knows, maybe the guy was already having a bad day and chose to take it out on this restaurant employee who he decided was beneath him. I don’t know what he thought his behavior would get him. He didn’t get a table sooner; he didn’t get a table at all. He annoyed the people around him, probably annoyed himself, and missed out on an awesome breakfast place.

If you’re in DC and want a nice place for breakfast, or a place with a good drink selection, be sure to check out Founding Farmers. I had a great cocktail the night before and made sure to come back for breakfast after seeing all their baked goods. I highly recommend!

Crab cake benedict with maple pork sausage

I Had a Good Flight

So, I’m flying to Denver the other day, have my nice aisle seat picked out, and I’m settled in as the captain announces they’ve closed the cabin door. The middle seat next to me is still empty, and a mother is headed toward me with her young daughter in her arms. The daughter looks like she is on the verge of tears or just finished emptying the waterworks before they boarded the plane. Mom seemed a little stressed as she searched for their seats.

A flight attendant was helping them navigate, and it became clear one of their seats was the empty one in the middle next to me. I stood up and asked where their other seat was, offering to let them sit together in my row, and you would think mom had just won the lottery from the look on her face. The flight attendant said something to the effect of, “Thank you, we’ll comp you whatever you’d like for switching!”

Now, this isn’t a story about how nice or chivalrous a guy I am. I’ve flown enough to realize that the more generous we can all be towards one another, the easier it makes the journey for all of us. One cranky guy arguing that his over-stuffed carry-on really will fit in the overhead bin, or that he wants the keep the seat he picked out at check-in, can put a few hundred people on edge as they anxiously await him to concede so the plane can leave. By comparison, being kind to a fellow passenger, and offering that kindness freely, makes everything go smoother for everyone. The flight attendant could go back to more important things than trying to help negotiate a seat swap amongst reluctant passengers, the mom could get her daughter settled and happier more quickly, and we could get away from the gate and on our way sooner rather than later.

What struck me from this episode was how surprised everyone seemed by my willingness to change seats so quickly. Another flight attendant came and asked if I wanted a travel credit or mileage credit in exchange for switching seats. Of course, I appreciated this gesture on the part of the flight crew, but it really wasn’t necessary. Changing seats seemed like the natural thing to do, not something done in exchange for a perk on the flight. How terrible are airline passengers these days that my behavior seemed above and beyond?

So, I ended up in a middle seat three rows back next to a guy who a) didn’t bother to wear deodorant today and b) ordered a Bloody Mary mix for his drink. The entire crew suddenly knew me as “Mr. Allison” as opposed to “the guy in 31D”. Later, I saw the mom and daughter on the train to baggage claim, and both were in a 100% better mood than when we first met.

I had a good flight that day.

You Really SHOULD Read This

May, should, and shall. These three words can be found sprinkled across industry standards, recommended practices, and internal company procedures and guidelines. But, what do they really mean?

Most of my work with industry standards happens with the American Petroleum Institute (API), so I will admittedly approach this topic mostly from that perspective. The definitions that follow come from API’s Procedures for Standards Development:

  • May: Denotes a course of action permissible within the limits of a standard.
  • Should: Denotes a recommendation or that which is advised but not required in order to conform to the standard.
  • Shall: Denotes a minimum requirement in order to conform to the standard.

Let’s work through these terms in increasing order of important. The term “may” describes an action that you can take, but there is no requirement that you must do this. For example, API 11B (the standard governing sucker rods) states in section 7.2.2 that calibration intervals, “may be lengthened or shortened based on calibration history.” So, once you establish sufficient calibration history as required by the standard, you can extend the calibration interval if you want to. If instead you prefer to always follow the specific interval written in the standard, you can do that too. May statements leave the choice entirely to the end user if they follow that course of action or not.

“Should” describes something that is strongly recommended but still not a requirement of the standard or procedure in question. The API standard for surface pumping units, API 11E, states in section 6.4.9 that, “the tensile preload in the bolt, stud, or cap screw should be 70 % of the yield strength of the material …”. Now, there are other ways of determining the proper preload on a connection, but the standard is recommending this one possible way to do so. If you do it this way, great! You will be in compliance with the standard. If you would like to specify the connection requirements in a different way, and can demonstrate that method performs as well or better as the should statement in the standard, great! You have the flexibility to apply whichever you believe works best for your product and manufacturing processes.

Now we come to the heavy lifter, the “shall” statement. Shall statements say you absolutely, positively, must follow this statement to comply with the standard or procedure in question. The twenty-seventh edition of API 11B has 544 instances of the word shall spread throughout it! Section covers material test reports, and has some requirements for how long these records must be kept. “These documents shall be maintained by the manufacturer for a period of at least five years.” If someone trashes a pile of MTRs after four years and 364 days, they are not in compliance with the standard.

Let’s relate this back to something more applicable to everyday life. You want your kids to brush their teeth every night before bed, right? Which of the above terms best describe your desire for them to follow this routine? Would you prefer that they may brush their teeth, they should brush their teeth, or they shall brush their teeth?

2020 API Winter Standards Meeting

The American Petroleum Institute holds two main meetings each year, where its members gather to work on standards development. The winter meeting was held from 20-24 January in Fort Worth, TX, and brought together representatives from manufacturers, distributors, and end-users of products that are affected by API standards. I have the honor of chairing Subcommittee 11, which oversees standards that cover rod pumps, sucker rods, pumping units, plungers, and reciprocating compressors. Several of the task groups that fall under SC11 met that week and are actively working on updating many of our standards. A summary of each group’s activities follows below.

If you are a user of the products covered by these standards or are involved in the manufacturing and distribution of those products, I would encourage you to get involved in SC11 and the development of these standards. The work of these task groups materially impacts your business, and your voice should be part of guiding their work. For some, I’ve heard it is an issue of cost to travel and take part in these meetings. For some perspective, my expenses for a week in Fort Worth were less than what my company spends on one downhole rod pump. I think that’s a small price to pay to be able to impact how that pump is designed and built before it makes it to my location. For more information on getting involved with SC11 or any of these individual task groups, please reach out to me on LinkedIn (please be sure to include a message as opposed to just sending a request to connect).

Recommended Practice 11AR covers a variety of topics related to the teardown, assembly, and operation of rod pumps. This document has not been updated in many years, so a major task to be completed is reviewing all of the teardown and assembly procedures. The pictures that go along with those procedures need updating as well (anyone still wearing lab coats in their pump shops 🤔?).

Other areas of work by the task group include:

  • Documenting the advantages and disadvantages of different arrangements of the tubing anchor, pump intake, and perforations
  • Adding downhole dynamometer examples used in troubleshooting downhole pump problems
  • Recommendations for how to safely work with pumps with the plunger stuck inside the barrel

This group is starting to meet online once a month, as well as holding additional in-person meetings outside of the biannual API conferences. The next in-person meeting is currently planned for 7-8 April 2020 in Frisco, TX.

11AX: Specification for Subsurface Sucker Rod Pump Assemblies, Components, and Fittings

A big task for the 11AX task group is updating the document with additional components and assembly examples that are common in the industry today. Many contracts require the delivery of a monogrammed pump, and a pump cannot be monogrammed unless it is assembled from only monogrammed components. For example, a pump built with an insert-guided cage could not be monogrammed because that cage is not specified in 11AX.

Another significant change to this standard will be the shift from American National Standard threads (N-series) to Unified Inch Screw threads (UN-series). In many cases, the two threads are compatible with one another, but there are cases where gauges manufactured to one standard may improperly pass or fail a part threaded to the other standard. Given that the N-series threads have been considered obsolete since 1949, it’s probably time for our pump standards to move on as well.

There are also a few items related to barrel and plunger coatings and additional materials for barrels under discussion. This task group meets in conjunction with the 11AR task group.

The 28th edition of 11B passed in September 2018 but has been undergoing a lengthy comment resolution process. It is currently being circulated to ensure all of the subcommittee members are in agreement with how the comments were resolved, and I expect it to be published later this year.

11E: Specification for Pumping Units

The most recent addendum to the 19th edition of 11E added requirements to the construction of walking beams. Specifically, the design and construction of these beams must now conform to the American Welding Society standard D1.1/D1.1M, Structural Welding Code–Steel.

The next edition of 11E will expand those welding requirements to all structural beams of the pumping unit, not just the walking beam. Additionally, chain reducers will be removed from the standard (I bet most of you reading this have never even seen such a thing).

The 11E task group will next meet the week of 29 June 2020 at the API Summer Standards Conference in Washington, DC.

11P: Specification for Packaged Reciprocating Compressors for Oil and Gas Production Services

This task group is our busiest of all. It currently has over 30 people working on updating 11P to the 3rd edition. They expect to have their draft text finished later this year, with publication planned for 2021.

Hello World

Why am I here …

So, it seems obligatory that everyone’s site starts with a post such as this detailing why they thought this thing needed to exist. Over the past year, I’ve made a handful of posts and written one article on LinkedIn that seemed to attract more attention than I expected. That got me thinking that I would like to have a place to share my thoughts on technology, home improvement, traveling, life in the oilfield, and whatever else has captured my attention for the moment.

Ok, but why HERE specifically?

I could continue posting my thoughts on other platforms such as LinkedIn (and I probably will for shorter musings), but I really wanted something that was MINE. LinkedIn’s content policy is better than most, but that content is still dependent on their platform. I also have limited control over the look and feel of how my ideas are presented there. So, I decided to build this site in order to give myself that kind of control and learn some bits of how the internet works that is of questionable value to my day-to-day life.

Aside from having somewhere to share my thoughts, I’ve been curious about all things web-related for a few years. We live in a world that is increasingly connected together, and I want to learn more about how those technologies work. I’ve dabbled a little with fairly simple JavaScript pages for some projects at work, but this is my first foray into managing the server that runs my site, the platform it runs on, and the design around how the entire thing looks.

What’s so wrong with hosting content on LinkedIn (or any other service for that matter)?

Realistically, absolutely nothing. I imagine most people have absolutely zero desire to learn about setting up a VPS, static site generator, Markdown syntax, or the various other things I haven’t yet realized I need to learn to make this work. It’s amazing to me how many different platforms exist that allow people to easily share their message with the world with minimal technical expertise required. So, if you have something you want to share with the world, find what works best for you and just focus on getting it out there!

Here we go!

I hope people enjoy the things they find here, and that maybe we can laugh and learn a little together along the way. I will likely share links to things I’m writing here on LinkedIn, and I would love to get your feedback in the comments on those posts. Otherwise, I can sometimes, sorta, randomly be found on Twitter at @anthonyallison_ or my LinkedIn profile here1.

  1. Please note that I rarely accept LinkedIn connection requests from people I have not previously met that do not include a short message explaining why they wish to connect. ↩︎

🌟Discover a random blog🌟

Visitor countries: