Skip to content

feat: switch PDF engine to system libdeepin-pdfium - #456

Merged
pengfeixx merged 1 commit into
linuxdeepin:masterfrom
pengfeixx:feat/system-libdeepin-pdfium
Nov 24, 2026
Merged

pengfeixx merged 1 commit into
linuxdeepin:masterfrom
pengfeixx:feat/system-libdeepin-pdfium

Conversation

@pengfeixx

@pengfeixx pengfeixx commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

说明 / Summary

  • 删除内嵌的 3rdparty/deepin-pdfium 源码(pdfium 及封装层,-48 万行),cmake 与 qmake 构建统一改为 pkg-config 链接系统库 deepin-pdfium
  • 依赖 libdeepin-pdfium (>= 2.0) 提供的 fileIdentifier / imageObjectRects 接口(PDF 阅读记录文档标识、夜间模式图片对象蒙版)
  • debian/control:构建依赖改为 libdeepin-pdfium-dev (>= 2.0.0),运行时依赖由 ${shlibs:Depends} 自动生成
  • linglong.yaml:移除内嵌 pdfium 专属构建依赖(libchardet-dev/liblcms2-dev/libopenjp2-7-dev/libicu-dev),depends 增加 libdeepin-pdfium 随包分发,玲珑 runtime check(ldd check)通过

Remove bundled 3rdparty/deepin-pdfium sources and link the system libdeepin-pdfium (>= 2.0) via pkg-config in cmake/qmake builds.

测试建议 / Test

  1. 打开、渲染、缩放、批注并保存 PDF 文档,确认行为与旧版本一致
  2. PDF 页面开启夜间模式;重命名或移动 PDF 后验证阅读记录仍能匹配
  3. 构建 deb 与玲珑包:readelf -d 确认二进制 DT_NEEDED 为 libdeepin-pdfium.so.*,批量打印与 html 转 pdf 功能正常

PMS: TASK-398545

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @pengfeixx, this pull request is too large to review

It changes 1,366 files. Sourcery can review pull requests with up to 300 changed files.

@github-actions

Copy link
Copy Markdown
  • 检测到敏感词export变动
详情
    {
    "export": {
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.cmake": {
            "a": [
                "        pdfium/base/base_export.h "
            ]
        },
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.pri": {
            "a": [
                "    $$PWD/pdfium/third_party/base/base_export.h \\"
            ]
        }
    }
}

@pengfeixx
pengfeixx force-pushed the feat/system-libdeepin-pdfium branch from 7040ab2 to 0236ec6 Compare November 24, 2026 08:16
@github-actions

Copy link
Copy Markdown
  • 检测到敏感词export变动
详情
    {
    "export": {
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.cmake": {
            "a": [
                "        pdfium/base/base_export.h "
            ]
        },
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.pri": {
            "a": [
                "    $$PWD/pdfium/third_party/base/base_export.h \\"
            ]
        }
    }
}

@pengfeixx
pengfeixx force-pushed the feat/system-libdeepin-pdfium branch from 0236ec6 to 597378b Compare November 24, 2026 08:20
@github-actions

Copy link
Copy Markdown
  • 检测到敏感词export变动
详情
    {
    "export": {
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.cmake": {
            "a": [
                "        pdfium/base/base_export.h "
            ]
        },
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.pri": {
            "a": [
                "    $$PWD/pdfium/third_party/base/base_export.h \\"
            ]
        }
    }
}

@pengfeixx
pengfeixx force-pushed the feat/system-libdeepin-pdfium branch from 597378b to 5de5afc Compare November 24, 2026 08:26
@github-actions

Copy link
Copy Markdown
  • 检测到敏感词export变动
详情
    {
    "export": {
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.cmake": {
            "a": [
                "        pdfium/base/base_export.h "
            ]
        },
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.pri": {
            "a": [
                "    $$PWD/pdfium/third_party/base/base_export.h \\"
            ]
        }
    }
}

1. Remove bundled 3rdparty/deepin-pdfium sources and link the system
   library via pkg-config in cmake and qmake builds
2. Require libdeepin-pdfium (>= 2.0) providing the fileIdentifier and
   imageObjectRects APIs
3. Update debian/control and linglong.yaml to depend on libdeepin-pdfium

Influence:
1. Open, render, zoom, annotate and save PDF documents, verify content
   is identical to previous version
2. Toggle night mode on PDF pages and verify reading history still
   matches a PDF after renaming or moving the file
3. Build the deb and linglong packages, verify ldd of the binaries
   resolves libdeepin-pdfium and batch print / html to pdf work

feat: PDF 引擎切换为系统库 libdeepin-pdfium

1. 删除内嵌的 3rdparty/deepin-pdfium 源码,cmake 与 qmake 构建改为
   pkg-config 链接系统库
2. 依赖 libdeepin-pdfium (>= 2.0) 提供的 fileIdentifier/imageObjectRects
   接口
3. 更新 debian/control 与 linglong.yaml,依赖系统 libdeepin-pdfium

Influence:
1. 打开、渲染、缩放、批注并保存 PDF 文档,确认内容与旧版本一致
2. PDF 页面开启夜间模式;重命名或移动 PDF 后验证阅读记录仍能匹配
3. 构建 deb 与玲珑包,验证二进制 ldd 解析到 libdeepin-pdfium,
   批量打印与 html 转 pdf 功能正常

Log: PDF rendering now links the system libdeepin-pdfium library and the package depends on libdeepin-pdfium instead of a bundled copy
PMS: TASK-398545
@pengfeixx
pengfeixx force-pushed the feat/system-libdeepin-pdfium branch from 5de5afc to d5b88a1 Compare November 24, 2026 08:32
@github-actions

Copy link
Copy Markdown
  • 检测到敏感词export变动
详情
    {
    "export": {
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.cmake": {
            "a": [
                "        pdfium/base/base_export.h "
            ]
        },
        "3rdparty/deepin-pdfium/src/3rdparty/pdfium/fx_base.pri": {
            "a": [
                "    $$PWD/pdfium/third_party/base/base_export.h \\"
            ]
        }
    }
}

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, pengfeixx

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pengfeixx
pengfeixx merged commit c92addf into linuxdeepin:master Nov 24, 2026
4 of 9 checks passed
@pengfeixx
pengfeixx deleted the feat/system-libdeepin-pdfium branch November 24, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants