[
https://issues.apache.org/jira/browse/TIKA-4891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115447#comment-18115447
]
Tilman Hausherr edited comment on TIKA-4891 at 9/15/26 7:40 AM:
----------------------------------------------------------------
THausherr commented on code in PR #3172:
URL: https://github.com/apache/tika/pull/3172#discussion_r4013016012
{noformat}
##########
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/PDFMarkedContent2XHTML.java:
##########
@@ -1467,20 +1468,11 @@ private ElementSpec spec(StructureIndex.Node node) {
chain.add(n);
}
for (int i = chain.size() - 1; i >= 0; i--) {
- chain.get(i).spec = buildSpec(chain.get(i));
+ chain.get(i).spec = buildSpec(chain.get(i), new AttributesImpl());
{noformat}
Review Comment:
None of these throw checked exceptions. If any throw unchecked exceptions
then it's a bug that should be fixed. I don't believe it will fail, but if
there is something, I want it to make a huge drama.
was (Author: githubbot):
THausherr commented on code in PR #3172:
URL: https://github.com/apache/tika/pull/3172#discussion_r4013016012
##########
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-pdf-module/src/main/java/org/apache/tika/parser/pdf/PDFMarkedContent2XHTML.java:
##########
@@ -1467,20 +1468,11 @@ private ElementSpec spec(StructureIndex.Node node) {
chain.add(n);
}
for (int i = chain.size() - 1; i >= 0; i--) {
- chain.get(i).spec = buildSpec(chain.get(i));
+ chain.get(i).spec = buildSpec(chain.get(i), new AttributesImpl());
Review Comment:
None of these throw checked exceptions. If any throw unchecked exceptions
then it's a bug that should be fixed. I don't believe it will fail, but if
there is something, I want it to make a huge drama.
> Improve handling of PDF/UA structural tags/marked content
> ---------------------------------------------------------
>
> Key: TIKA-4891
> URL: https://issues.apache.org/jira/browse/TIKA-4891
> Project: Tika
> Issue Type: Task
> Reporter: Tim Allison
> Priority: Major
> Attachments: 1008690.pdf, TIKA-4891-1008690.html,
> image-2026-09-13-10-54-59-251.png, screenshot-1.png, screenshot-2.png
>
>
> PDF/UA includes structural markup. We hacked out a standalone handler for
> this back in 1.x but haven't touched it in years.
>
> We should modernize our handling of structural tags and eventually consider
> turning that on by default. That decision will be based on evaluation on
> 1000s of PDFs. This is not a default switch to be taken lightly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)