Reading Time: 4 Minutes

Automatic positioning of stamps: Use free spaces efficiently

In this Article

    In order to be able to see their status outside of document management, drawings are marked with 

    Our challenge: Use free spaces efficiently

    We repeatedly have requests from our customers to stamp the documents in a previously unknown, free position. What is child’s play for any employee in the secretariat or in construction turns out to be a hard nut to crack for a computer.

    Drawing layouts are often not uniform in the company, so that a free space in the header cannot be clearly identified. External delivery documents do not have a uniform layout. However, the previous solution, a careful stamp using a watermark, outline font or a very small stamp, is often overlooked. The stamp must be clearly visible, but must not obscure anything. We took such inquiries as an opportunity and took on this task.

    The task using the example of “Ornithopter”

    The renowned painter and inventor Leonardo da Vinci provided us with a drawing for testing purposes. Here, he explo­res humanity’s eternal dream of flight, technically mimicking bird flight. We do not know the extent of his success. In the early stages of aircraft development, people abandoned this path in favor of rigid wings. What a missed oppor­tunity.

    Technical drawing

    The task is as follows:

    1. Attach a label stating that this drawing is for prototype construction only, as its flight suitability remains unproven.
    2. Display a clear warning to emphasize the danger of flying with such a device.
    3. Generate an overview of spare parts and model approval automatically.

    Unfortunately, da Vinci did not consider leaving appropriate spaces for stamping when creating the drawing. That’s the nature of genius. Similarly, CAD designers from suppliers do not always adhere to their clients’ specifications today, leaving the machine or plant manufacturer to find a solution. Fortunately, we can address this issue now.

    Our solution: Automatic image analysis

    So how can we help? Our solution automatically finds suitable open spaces on the drawing and carries out the stamping. But how does that actually work? We briefly explain the software technology involved.

    The search itself takes place on an image that is generated from the PDF. It is recursively broken down into squares, at whose corners it is checked whether there is a free area. The size of the desired free area can be specified. The starting position for the search can also be specified.

    In the event that no contiguous area that has enough space for stamping can be found, smaller, free adjacent partial squares can be combined again to form a usable area.

    Now to our task: For the first stamp – the status – a place above the title block makes the most sense and is most common. The algorithm produces this result and we are satisfied:

    Drawing with approval stamp
    To place the warning, we secondly instructed the algorithm to find the largest possible area in the middle of the drawing and adapt the text there. A threshold can be specified for the minimum size. If this is not found, the system issues a warning. Leonardo made it a point to use his personal encryption technology. As is well known, he prevented illegal reproduction by using mirror writing.
    Detail of a drawing with watermark
    And finally, a table with spare parts and release information should be included. It is preferable to place such a table at the top right. In our example there was enough free space there. Otherwise we would have automatically created an additional page or reduced the size of the page in order to place the table next to the drawing in the appropriate DIN format.
    Drawing with release stamp and watermark
    And this is what our result looks like. Leonardo would be very happy with the result because paper is scarce. And even today, companies are happy about this solution, which reduces manual effort and can therefore save costs.
    Drawing with table, approval stamp and watermark