Bug 428116 - Implement support for measure annotations
Summary: Implement support for measure annotations
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-22 22:40 UTC by Dion Moult
Modified: 2020-10-23 19:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dion Moult 2020-10-22 22:40:03 UTC
In the architecture, engineering, and construction industry, a huge part of our workflow is annotating PDFs.

Linux currently does not have a desktop tool for annotating drawings, similar to commercial offerings like Bluebeam, or PDF XChange Editor, etc that allow us to work in the AEC industry. It would be awesome if we could have a free software option :)

The basic features required for AEC, most of which is already supported are as follows:

 - Able to annotate text, callouts, arrows, lines, and polygons, with a variety of stroke and fill RGBAs and thicknesses
 - Able to "stamp" a preset graphic or text
 - Extract a subset of pages in a PDF, add new pages to a PDF, reorder pages

Those features already exist in PDF offerings. However, there are a few more features that the AEC industry needs that do not exist to my knowledge:

 - Annotating a dimension line with automatic dimension, applying a scale factor to represent the scale in real world units
 - A ruler calibration tool to calculate an arbitrary or unknown scale factor
 - A polyline measurement tool to calculate the summed length of a polyline, with scale factor applied
 - A polygon measurement tool to calculate the perimeter length, and area of the polygon, with scale factor applied
 - Naturally, support for both imperial and metric real world units
 - The ability to compare two PDFs side by side
 - The ability to overlay a PDF over another, to spot changes between them, perhaps colour coded, or visualised in another way

There are some more features like 3D PDFs, but the vibe I get is that nobody likes it as a developer :) It's also a lower priority, so don't worry about that one!

Some picture examples of commercial tools: [one](https://support.bluebeam.com/wp-content/uploads/2012/09/9-12-3.jpg), [two](https://carolhagen.files.wordpress.com/2014/05/independent-units-measurements-in-bluebeam-revu.jpg), and [three](https://cdn.forconstructionpros.com/files/base/acbm/fcp/image/2014/02/960w/bluebeam-studio--collaborate-r_11305813.jpg).

I've spoken to the [mupdf](https://mupdf.com/) devs. They advise me that the [PDF specification](https://ghostscript.com/~tor/pdfref17.pdf) which is 1,310 pages long (what a nightmare!) specifies this type of measurement / scale factor functionality (pages 627 - line annotations can have a measure dictionary attached, and page 744, like an entire chapter about this stuff).

Please let me know what is and isn't feasible, and if there is some work being done around this area in the FOSS world that I've missed.
Comment 1 Laura David Hurka 2020-10-23 15:54:47 UTC
Thanks for your report. :) I’m closing it, because we prefer reports about only one issue, so you should open individual reports for each of your suggestions.

> Please let me know what is and isn't feasible, and if there is some work
> being done around this area in the FOSS world that I've missed.
Here are some comments on your points:

> - Able to annotate text, callouts, arrows, lines, and polygons,
> with a variety of stroke and fill RGBAs and thicknesses
What is a callout? I assume like a speech bubble, like in the Wikipedia article “Callout”? Okular doesn’t support that directly. There are inline notes and popup notes. How do you do it currently, or what do you need?

> - Able to "stamp" a preset graphic or text
Stamp annotations are there in Okular, but don’t work with other readers yet.

> - Extract a subset of pages in a PDF, add new pages to a PDF, reorder pages
I think this is not planned for Okular, because it is too much “PDF editing”.

> - Annotating a dimension line with automatic dimension,
> applying a scale factor to represent the scale in real world units
The “Arrow” annotation can be configured to look like a dimension line, but there is no code to automatically measure and add text. We already talked about that idea, IIRC, PDF even allows to put text on a line annotation. But I am not aware that someone is working on this.

> - A polygon measurement tool to calculate the perimeter length,
> and area of the polygon, with scale factor applied
A generic measurement tool would make sense to me, but again I am not aware of someone working on this.

> - The ability to compare two PDFs side by side
Could be possible with split view (Bug 169847), if both documents are concatenated to a single document.

> - The ability to overlay a PDF over another, to spot changes between them,
> perhaps colour coded, or visualised in another way
Okular is designed to open a single document (one document = one KParts part; the Okular viewer is such a part), so I don’t think this fits in Okular’s concept.
Comment 2 Oliver Sander 2020-10-23 19:15:32 UTC
For what is worth, quite some 3d support code is in

  https://gitlab.freedesktop.org/poppler/poppler/-/issues/460

All the stuff that you mention is very interesting, but it needs somebody to find the time to do it.

I don't know whether you are writing as a private person or representing some organization.  If the latter you may want to consider that you can hire people to do the implementation work.