[Libreoffice-bugs] [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)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri May 21 22:36:51 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=136923

--- Comment #6 from sl.leblanc at free.fr ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210521/45a3e6ef/attachment.htm>


More information about the Libreoffice-bugs mailing list