Files
java-word-pdf/wordpdf-core/pom.xml
T
Pjandro f3ff218686
PR checks / web (pull_request) Successful in 9s
PR checks / java (pull_request) Successful in 5m26s
Main: tests, deploy, autotests / web (push) Successful in 9s
Main: tests, deploy, autotests / images-web (push) Successful in 23s
Main: tests, deploy, autotests / java (push) Successful in 1m30s
Main: tests, deploy, autotests / images-app (push) Successful in 49s
Main: tests, deploy, autotests / deploy (push) Successful in 2m13s
Main: tests, deploy, autotests / autotests (push) Successful in 17s
Main: tests, deploy, autotests / rollback (push) Has been skipped
feat(core): собственный рендер OMML→PNG и полный FOP-конфиг шрифтов
Замена JEuclid/AWT-ветки формул на детерминированный растер только
бандл-шрифтами jar (без fontconfig); FOP-конфиг дополняется всеми
бандл-начертаниями при каждом declare — иначе общая FopFactory
замораживает fopconf первого документа и теряет глифы.

MathModel/MathRenderer: OMML (§22.1) → дерево боксов → PNG 300 dpi
(только GlyphFont/fontbox, без java.awt.Font); метрики боксов равны
габариту paint (пределы nary/sPre не обрезаются канвой). Unsupported
конструкция или переполнение бюджета — текстовая деградация (m:t).
Inline-картинка опускается раном w:rPr/w:position на базовую линию
строки (FOP ставит инлайн-графику нижним краем на базу; AUDIT-FIX
baseline-shift). Байтовое правило 6 MathFallbackNormalizer (перед
GlyphCoverage) срезает unsupported-формулы до загрузки docx4j; формула
в wps:txbx уходит в docx4j-фолбэк mathText.

JEuclid исключён из pom (de.rototor jeuclid-core/jeuclid-fop); порядок
zip-правил сдвинут (MathFallback → 6). Порядок сканов шрифтов закрыт
гейтом FontsBundledOnlyInvariantTest + BundledFontAliases (единый
алиас-реестр вместо рефлексивных мутаций реестра).

Счётчики: 63 класса / 1004 теста (core 57/956, app 6/48); JaCoCo
BRANCH core 0.8518. Доки: pipeline/render-limitations/repo-map/
testing/doc-bridge/MEM_USAGE_UPGRADE синхронизированы.
2026-11-20 23:51:40 +03:00

149 lines
7.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.pjandro</groupId>
<artifactId>java-word-pdf</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>wordpdf-core</artifactId>
<name>wordpdf-core</name>
<description>Библиотека: конвертация docx в PDF (docx4j + FOP, шрифты внутри jar)</description>
<dependencies>
<!-- docx4j: чтение/запись docx, маппинг шрифтов -->
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j-core</artifactId>
</dependency>
<!-- Реализация JAXB для docx4j -->
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j-JAXB-ReferenceImpl</artifactId>
</dependency>
<!-- Пайплайн экспорта: docx -> XSL-FO -> Apache FOP -> PDF -->
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j-export-fo</artifactId>
<!-- JEuclid (MathML-рендер FOP) исключён: формулы OMML больше не
доходят до FO — DrawingPreRenderer заменяет каждую math-узел
собственным растером (MathModel/MathRenderer) или текстом, а
MathFallbackNormalizer (правило 6) срезает unsupported до
загрузки. Jeuclid тянул AWT-менеджер шрифтов (fontconfig —
падение на без-fontconfig хостах) и системные шрифты в вывод;
инвариант «шрифты только бандла» пинит
FontsBundledOnlyInvariantTest. -->
<exclusions>
<exclusion>
<groupId>de.rototor.jeuclid</groupId>
<artifactId>jeuclid-fop</artifactId>
</exclusion>
<exclusion>
<groupId>de.rototor.jeuclid</groupId>
<artifactId>jeuclid-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Простой логгер в консоль (slf4j). Обязателен: без него docx4j
пишет предупреждение прямо в выходной PDF. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<!-- Чистый Java-парсер TTF (глиф-движок GlyphFont): метрики и
отрисовка глифов без java.awt.Font — рантайму не нужен
fontconfig (OpenJDK/Linux требует его при любом обращении
к java.awt.Font). -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
</dependency>
<!-- Мост commons-logging -> slf4j для fontbox -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<!-- Используется DependencyGuard (проверка совместимости classpath);
транзитивно приходит от docx4j-core, объявлена явно как контракт
интеграции — потребитель видит её в своём дереве зависимостей -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</dependency>
<!-- ============ Тесты ============ -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<!-- Извлечение текста из полученного PDF для проверки в тестах -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<scope>test</scope>
</dependency>
<!-- Apache POI: только для одноразовой генерации готовых .docx
для тестов (см. SampleDocxGenerator). В рантайм не используется. -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Тестовый jar с готовыми .docx из src/test/resources/samples:
используется тестами wordpdf-app. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>test-jar</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Гейт покрытия ядра: к общему LINE 0.90 (корневой pluginManagement)
добавлен BRANCH 0.85 — только для core; у wordpdf-app бранчи ниже
порога, общий rule в корне остаётся LINE-only. -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>check</id>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.90</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.85</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>