Bug 136923 - Export to PDF/A is not PDF/A conformant (ISO 19005-1:2005, Clause: 6.1.12, Test number: 5 - Maximum capacity of an array (in elements) is 8191)
Summary: Export to PDF/A is not PDF/A conformant (ISO 19005-1:2005, Clause: 6.1.12, Te...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.0.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2020-09-21 11:25 UTC by jan.prochaska
Modified: 2026-02-25 13:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Input file (2.56 MB, application/pdf)
2020-09-21 11:25 UTC, jan.prochaska
Details
Export with LO 5.4.3.2 (3.28 MB, application/pdf)
2020-09-21 11:26 UTC, jan.prochaska
Details
Export with LO 7.0.1 (3.32 MB, application/pdf)
2020-09-21 11:27 UTC, jan.prochaska
Details
Export with PDFTron (for reference, it is PDF/A-1a compliant) (2.64 MB, application/pdf)
2020-09-21 11:27 UTC, jan.prochaska
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jan.prochaska 2020-09-21 11:25:17 UTC
Description:
I have a bug where a document exported to PDF/A is not PDF/A conformant.
The bug is similar to Bug 136805 (in overall result, but seems otherwise unrelated).

Steps to Reproduce:
We use the uno interface on a localhost socket
with following filterparam

filterParam.Name = "SelectPdfVersion";
filterParam.Value = Integer.valueOf(1); // 0 = PDF 1.4 (default selection). 1 = PDF/A-1 (ISO 19005-1:2005)
filterParams.add(filterParam);

, but the the behaviour is reproducible via GUI as well:
1. Open the attached PDF in LibreOffice
2. Choose File -> Export as PDF with PDF/A checked

Actual Results:
PDF is produced and metadata claim PDF/A conformance level/profile.
In fact there is a problem:

Specification: ISO 19005-1:2005, Clause: 6.1.12, Test number: 5	
Maximum capacity of an array (in elements) is 8191

The problem can be reproduced by the VeraPDF CLI utility or using its online demo (https://demo.verapdf.org/)

Expected Results:
The PDF produced is really a PDF/A, passing validation checks.
Note:
The input file has problems of its own.
It claims PDF/A conformance but it's not a PDF/A file.
Never the less the output file


Reproducible: Always


User Profile Reset: No



Additional Info:
None
Comment 1 jan.prochaska 2020-09-21 11:25:43 UTC
Created attachment 165721 [details]
Input file
Comment 2 jan.prochaska 2020-09-21 11:26:50 UTC
Created attachment 165723 [details]
Export with LO 5.4.3.2
Comment 3 jan.prochaska 2020-09-21 11:27:15 UTC
Created attachment 165724 [details]
Export with LO 7.0.1
Comment 4 jan.prochaska 2020-09-21 11:27:41 UTC
Created attachment 165725 [details]
Export with PDFTron (for reference, it is PDF/A-1a compliant)
Comment 5 jan.prochaska 2020-10-03 17:57:32 UTC
One useful information.
When testing in newer version of LibreOffice (in my case 7.0.2.2) then with this setting

filterParam.Name = "SelectPdfVersion";
filterParam.Value = Integer.valueOf(2);
filterParams.add(filterParam);

(note the change from 1 (PDF/A-1a) to 2 (PDF/A-2b)
the exported PDF is really a PDF/A-2b.
At least according to VeraPDF which is a good reference for start.
It seems that the export problem can be constrained to case when trying to export to PDF/A-1a.
Comment 6 sl.leblanc 2021-05-21 22:36:51 UTC
Hello,
Please excuse my bad English but I am French.

Looks like I have the same problem.

When I try to macro export a report (base) to pdf.

With "Selectpdfversion, 1", I have a pdf / A compliance error

With "Selectpdfversion, 2" I have no error, but the value of form fields are not displayed.

The macro I am using is as follows:


    Sub convertirPDF()
    Dim Adresse As String
    Dim props As Variant, propsFiltre As Variant
       propsFiltre = CreateProperties(Array("SelectPdfVersion",1 ))
       props = CreateProperties(Array("FilterName", "writer_pdf_Export", "FilterData", propsFiltre() ))
       Adresse = convertToURL("le chemin et le nom du fichier PDF avec l'extention")
       ThisComponent.storeToURL(Adresse, props())
    End Sub

    Function CreateProperties(propList() As Variant) As Object
    Dim n as long, x as long
       n = UBound(propList)
       if n < 0 then
          CreateProperties = Array()
       else
          if (n and 1) = 0 then
             MsgBox("Erreur : nombre impair d'arguments", 16, "CreateProperties")
          else
             Dim p(n\2) As New com.sun.star.beans.PropertyValue
             for x = 0 to n\2
                p(x).Name = propList(2*x)
                p(x).Value = propList(2*x +1)
             next
             CreateProperties = p()
          end if
       end if
    End Function
Comment 7 Buovjaga 2022-04-26 11:29:50 UTC
I confirm. Same result when selecting the A-1b profile manually from VeraPDF (LibreOffice doesn't have A-1a export profile).

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 37613bffe4621c444e5a34678bafb2c3a875263d
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 26 April 2022
Comment 8 QA Administrators 2024-04-26 03:18:01 UTC Comment hidden (obsolete)
Comment 9 Xisco Faulí 2026-02-25 13:05:38 UTC
Still reproducible in

Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: a8ae0abbd646443a65dc2e5f44c395fb5a454a29
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded