Bug 139643 - PDF/UA export is missing PDF/UA flag
Summary: PDF/UA export is missing PDF/UA flag
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.2.0 target:7.0.5 target:7.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-15 13:17 UTC by Dustin Matzel
Modified: 2021-01-18 17:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dustin Matzel 2021-01-15 13:17:58 UTC
Description:
The new PDF/UA function should allow PDF export with PDF/UA flag, but the flag is missing in the created PDF.
Accordingly to the blog entry of this feature, the flag should be there (https://tomazvajngerl.blogspot.com/2020/01/accessibility-checker-and-support-for.html).

Steps to reproduce:
1. Enable experimental features and restart LO.
2. Open new Writer document and add a title in the preferences.
3. "Export as PDF..." with "Universal Accessibillity (PDF/UA)" enabled.
4. Test document with PAC3: Error no PDF/UA identifier
5. Manually check XMP metadata with Adobe Acrobat => XMP does not contain PDF/UA identifier.

Reproducible: Always, all OSs
Comment 1 Julien Nabet 2021-01-15 21:13:12 UTC
On pc Debian x86-64 with master sources updated today, I think I could reproduce this.
I say "I think" because I didn't find any online pdf checker.

Anyway, after searching a bit, I think this patch may help:
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index aee37877c7f6..7339c4cbeb19 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5236,7 +5236,7 @@ static void lcl_assignMeta(const OUString& aValue, OString& aMeta)
 // emits the document metadata
 sal_Int32 PDFWriterImpl::emitDocumentMetadata()
 {
-    if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 )
+    if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 && !m_bIsPDF_UA)
         return 0;
 
     //get the object number for all the destinations

Tomaz: any thoughts here?
Comment 2 Tomaz Vajngerl 2021-01-16 13:11:50 UTC
Julien, you nailed it... [1] overwrote that part... 

[1] https://cgit.freedesktop.org/libreoffice/core/commit/vcl/source/gdi/pdfwriter_impl.cxx?id=a795886762a6a4aabd601183598c4e6c819bcb1f
Comment 3 Commit Notification 2021-01-16 15:35:55 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1cc0fc1f3cdae597912d7204256427e060fcde61

tdf#139643: fix missing PDF/UA flag

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Julien Nabet 2021-01-16 15:40:35 UTC
Backport waiting for review here:
- 7.1: https://gerrit.libreoffice.org/c/core/+/109399
- 7.0: https://gerrit.libreoffice.org/c/core/+/109400
Comment 5 Commit Notification 2021-01-17 00:08:58 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/07d9819378192231322bb19a61f2cbd469f4611a

tdf#139643: added a test, that checks the PDF/UA metadata is set

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2021-01-17 13:07:14 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/e819872ebc1f7f005cea3916561dae03c43f8552

tdf#139643: fix missing PDF/UA flag

It will be available in 7.0.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2021-01-17 13:08:26 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/f1d7be7863e7d2d5aa3c3008bb9ec04780d5eb95

tdf#139643: fix missing PDF/UA flag

It will be available in 7.1.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Dustin Matzel 2021-01-18 08:40:54 UTC
Can confirm that the bug is fixed in current master daily build. Thanks for the fast fix!
Comment 9 Commit Notification 2021-01-18 10:38:01 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-1-0":

https://git.libreoffice.org/core/commit/1965de60afe96235f99683714fdb6403972bcf45

tdf#139643: fix missing PDF/UA flag

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Julien Nabet 2021-01-18 11:45:19 UTC
Thank you Dustin for your feedback!
Let's put this one to VERIFIED then.