--- id: 2026-04-16T12:55:49-0400 title: 2026-04-16 12:55:49 tags: - status/draft date-created: 2026-04-16T12:55:49-04:00 daily: "[[2026-04-16]]" --- # 2026-04-16 12:55:49 ## Batch Creating Bluebeam Revu Length Measure Annotations I've been trying for years now to figure out how to batch create PDF markups understood by the Bluebeam Revu as length measurements. The most practical route I've found so far is to batch create polyline annotations through a PDF editing library, export these markups to Revu's XML based .bax format, edit the XML, then reimport the modified .bax file. ### Converting a Polyline to a Bluebeam Polylength #### Export Markups Below is a .bax file for a single-page letter-sized PDF document with only two markups, one standard polyline, and one polylength measurement. ``` 612 792 1 2026-04-16T10:34:28.0000000Z #FF0000 PolyLine QYMFSTEOUXIEHCPW Bluebeam.PDF.Annotations.AnnotationPolyline 789c 0 PolyLine 2026-04-16T10:34:28.0000000Z zmeyers 1 15'-7" 2026-04-16T10:35:00.0000000Z #FF0000 PolyLine BMHFFZSZURMLPTRN Bluebeam.PDF.Annotations.AnnotationMeasurePolylength 789cad92d 1 Polylength Measurement 2026-04-16T10:34:50.0000000Z zmeyers 1 RKEGIABVKDXPBWJP 789c 0.25 in = 1 ft' in" -1 0 0 612 792 789cf37 789c 789c ``` #### Change `` Change the `` property of the polyline from `Bluebeam.PDF.Annotations.AnnotationPolyline` to `Bluebeam.PDF.Annotations.AnnotationMeasurePolylength` #### Change `` ##### Decode and Decompress Decode and decompress the value of the `` property. > [!info] > The standard header `789c` > indicates the data is zlib-compressed binary, > encoded as hexadecimal. ```python # decompress_hex.py import zlib import binascii import sys raw_hex = sys.argv[1] data = binascii.unhexlify(raw_hex) decompressed = zlib.decompress(data) print(decompressed) ``` The resultant text is a PDF object resembling the following: ```pdf <> ``` ##### Modify the Object Insert the following key-value pair: ``` /Measure/BBObjPtr_XXXXXXXXXXXXXXXX ``` where `XXX...` is the name of the Scale object. It may be most straightforward to copy this key-value pair from a manually created length measurement on the same page. ##### Recompress and Reencode ```python # compress_to_hex.py import zlib import binascii import sys text = sys.argv[1] compressed = zlib.compress(text.encode('utf-8')) hex_encoded = binascii.hexlify(compressed).decode('ascii') print(hex_encoded) ``` Replace the old value of `` with the modified hex. #### Reimport Markups In the target PDF, open the markup summary, delete all markups, then reimport.