View Issue Details

IDProjectCategoryView StatusLast Update
0000380fileGeneralpublic2024-05-11 06:29
Reporterjmoyano Assigned Tochristos  
PrioritynormalSeveritycrashReproducibilityalways
Status feedbackResolutionopen 
Product Version5.41 
Summary0000380: PDF file incorrectly reported as "data"
DescriptionPDF files are incorrectly reported as "data" if the file has leading spaces in the "%PDF-" string

  %PDF-1.4 <-- Notice the spaces at the beginning
%����
3 0 obj
<</Type /Page
/Parent 1 0 R
/MediaBox [0 0 595.280 841.890]
/TrimBox [0.000 0.000 595.280 841.890]
/Resources 2 0 R...
TagsNo tags attached.

Activities

jmoyano

2022-09-01 14:23

reporter  

boleta (5).pdf (60,395 bytes)

christos

2022-09-01 16:03

manager   ~0003813

While it is easy to fix the magic recognition to ignore spaces, according to the spec https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf this is not a pdf file.

tali

2024-05-11 06:29

reporter   ~0004038

I have several PDF files which even have a Windows Path in front of the `%PDF` header.
They are all correctly recognised and displayed as PDF by macOS, but `file` just shows them as "data".

Martins-Air:~ > file Documents/Privat/Rechnungen/O2\ -\ 2015/*
Documents/Privat/Rechnungen/O2 - 2015/2015-12-23-1957244037_04-EVN.pdf: PDF document, version 1.3, 1 pages
Documents/Privat/Rechnungen/O2 - 2015/2015-12-23-1957244037_04-RG.pdf: PDF document, version 1.3, 3 pages
Documents/Privat/Rechnungen/O2 - 2015/PDF_Rechnung_M211150117336384_01-2015.pdf: data
Documents/Privat/Rechnungen/O2 - 2015/PDF_Rechnung_M211150119470802_02-2015.pdf: data
Documents/Privat/Rechnungen/O2 - 2015/PDF_Rechnung_M211150121632155_03-2015.pdf: data

Martins-Air:~ > head -1 Documents/Privat/Rechnungen/O2\ -\ 2015/*
==> Documents/Privat/Rechnungen/O2 - 2015/2015-12-23-1957244037_04-EVN.pdf <==
%PDF-1.3

==> Documents/Privat/Rechnungen/O2 - 2015/2015-12-23-1957244037_04-RG.pdf <==
%PDF-1.3

==> Documents/Privat/Rechnungen/O2 - 2015/PDF_Rechnung_M211150117336384_01-2015.pdf <==
c:\tempdarch\228511514\X5002905.pdf%PDF-1.5

==> Documents/Privat/Rechnungen/O2 - 2015/PDF_Rechnung_M211150119470802_02-2015.pdf <==
c:\tempdarch\228511514\X5003160.pdf%PDF-1.5

==> Documents/Privat/Rechnungen/O2 - 2015/PDF_Rechnung_M211150121632155_03-2015.pdf <==
c:\tempdarch\228511514\X12002827.pdf%PDF-1.5

Issue History

Date Modified Username Field Change
2022-09-01 14:23 jmoyano New Issue
2022-09-01 14:23 jmoyano File Added: boleta (5).pdf
2022-09-01 16:02 christos Assigned To => christos
2022-09-01 16:02 christos Status new => assigned
2022-09-01 16:03 christos Status assigned => feedback
2022-09-01 16:03 christos Note Added: 0003813
2024-05-11 06:29 tali Note Added: 0004038