sd/qa/unit/data/pdf/BasicHindi.pdf |binary sd/qa/unit/export-tests.cxx | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+)
New commits: commit f19c172b0fd1bcd7fc48e3d7a2af7f51dd71b924 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Sep 29 16:48:10 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed Oct 15 14:24:36 2025 +0200 add test that pdf has expected text and font Change-Id: I5e793fc34c987caf7bd66b510b33720f34e26146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191671 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit faa9aa6d292513f1329851265bb0b63ea6298f88) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sd/qa/unit/data/pdf/BasicHindi.pdf b/sd/qa/unit/data/pdf/BasicHindi.pdf new file mode 100644 index 000000000000..3bcc88f7aba3 Binary files /dev/null and b/sd/qa/unit/data/pdf/BasicHindi.pdf differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index e0a823ca5247..c938c657f1ea 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1111,6 +1111,34 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont) #endif } +CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfHindi) +{ + auto pPdfium = vcl::pdf::PDFiumLibrary::get(); + if (!pPdfium) + return; + UsePdfium aGuard; + + loadFromFile(u"pdf/BasicHindi.pdf"); + + setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); + setImportFilterName(u"OpenDocument Drawing Flat XML"_ustr); + save(u"OpenDocument Drawing Flat XML"_ustr); + + xmlDocUniquePtr pXmlDoc = parseExportedFile(); + + // Check that the English text in here is correct at least + + // ensure the expected content + assertXPathContent(pXmlDoc, + "/office:document/office:body/office:drawing/draw:page/draw:g/draw:frame[3]/" + "draw:text-box/text:p[@text:style-name='P4'][1]", + u"FIRST-YEAR HINDI COURSE"); + + // ensure the expected font name + assertXPath(pXmlDoc, "/office:document/office:automatic-styles/style:style[@style:name='P4']/" + "style:text-properties[@fo:font-family='AcademyEngravedLetPlain']"); +} + CPPUNIT_TEST_FIXTURE(SdExportTest, testEmbeddedText) { createSdDrawDoc("objectwithtext.fodg");
