Issue Bug Closed

#95725Title shown twice with pdfinfo using PDF/X files

Oliver Hader 10/21/21, 18:44 updated 12/02/25, 14:33

Description

The following report has been sent to me via mail by Josef Sigritz, I’m just dumping it here:

—-

wir haben ein Problem mit dem FileContentParser der Indexed_Search: pdfinfo gibt bei PDF/X-Dateien zweimal den Title aus. Dadurch wird der eigentliche Title überschrieben.

Beispiel:
pdfinfo test.pdf

 
*Title:          BAA010718_Broschüre_Chancen_bieten_V2.indd*
Creator:        Adobe InDesign CC 13.0 (Macintosh)
Producer:       Adobe PDF Library 15.0
CreationDate:   Thu Feb 22 15:51:27 2018 CET
ModDate:        Mon Mar 12 12:12:12 2018 CET
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          20
Encrypted:      no
Page size:      595.276 x 841.89 pts (A4)
Page rot:       0
File size:      2292621 bytes
Optimized:      yes
PDF version:    1.3
PDF subtype:    PDF/X-3:2002
    *Title:         ISO 15930 - Electronic document file format for prepress digital data exchange (PDF/X)*
    Abbreviation:  PDF/X-3:2002
    Subtitle:      Part 3: Complete exchange suitable for colour-managed workflows (PDF/X-3)
    Standard:      ISO 15930-3

Verbesserungsvorschlag:
Klasse: typo3/typo3/sysext/indexed_search/Classes/FileContentParser.php, function splitPdfInfo

public function splitPdfInfo($pdfInfoArray)
    {
        $res = [];
        if (is_array($pdfInfoArray)) {
            foreach ($pdfInfoArray as $line) {
                $parts = explode(':', $line, 2);
                if (count($parts) > 1 && trim($parts[0])) {
                    if (!array_key_exists(strtolower(trim($parts[0])), $res)){
                      $res[strtolower(trim($parts[0]))] = trim($parts[1]);
                    }
                    $res[strtolower(trim($parts[0]))] = trim($parts[1]);
                }
            }
        }
        return $res;
    }

Reviews 2

History 58

  1. Josef Sigritz commented <span data-processor="relativetime" data-value="2021-10-22T14:58:02+00:00" > 10/22/21, 14:58 </span>

    Sorry, i forgot to comment out the original line;

       public function splitPdfInfo($pdfInfoArray)
        {
            $res = [];
            if (is_array($pdfInfoArray)) {
                foreach ($pdfInfoArray as $line) {
                    $parts = explode(':', $line, 2);
                    if (count($parts) > 1 && trim($parts[0])) {
                        if (!array_key_exists(strtolower(trim($parts[0])), $res)){
                          $res[strtolower(trim($parts[0]))] = trim($parts[1]);
                        }
                    }
                }
            }
            return $res;
        }
  2. Tomas Norre Mikkelsen commented <span data-processor="relativetime" data-value="2022-06-17T07:17:27+00:00" > 06/17/22, 07:17 </span>

    How to reproduce this?
    And how do I recognize the problem in TYPO3?

    Do you perhaps have a pdf/x file that you could share, to each the steps to reproduce?

  3. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2024-12-11T18:15:13+00:00" > 12/11/24, 18:15 </span>

    Applied in changeset commit:ff2cafa350d69362a5fb9527d5479e9112fc2aba.