Code Monkey home page Code Monkey logo

kevin2li / pdf-guru Goto Github PK

View Code? Open in Web Editor NEW
1.4K 12.0 123.0 80.66 MB

A Multi-purpose PDF file processing tool with a nice UI that supports merge, split, rotate, reorder, delete, scale, crop, watermark, encrypt/decrypt, bookmark, extract, compress, etc.

License: GNU Affero General Public License v3.0

Go 9.30% NSIS 1.67% HTML 0.06% Vue 80.20% TypeScript 5.77% CSS 0.10% JavaScript 2.44% Python 0.14% Inno Setup 0.33%
pdf pdf-converter pdf-toolbox pdf-watermark pdfkit wails go python3 vue3

pdf-guru's Introduction

PDF Guru

  • PDF Guru
  • 国内用户可访问:https://gitee.com/Kevin234/PDF-Guru

    项目介绍

    PDF Guru是一个通用型PDF文件处理工具,包含PDF合并、拆分、旋转、水印、加密、转换等20多项常用功能,完全开源,个人免费使用,界面简洁,简单易用。

    虽然目前网上关于PDF处理的工具有很多,但是都有一些缺点:

    1. 专业的PDF编辑软件对于高级一点的功能(添加水印、页面编辑等)需要收费或限制功能
    2. 在线PDF工具类网站需要上传PDF到服务器处理再下载,有泄露隐私风险
    3. 各大编程语言的PDF处理库虽然可以免费实现一些高级功能,但是需要一定的编程经验,使用没有图形界面程序方便
    4. 部分小众工具虽然可以满足部分特殊需求,但是功能较为单一

    由于PDF处理是一个很常见的需求,为了绕开上述这些限制,提高工作效率,诞生了此项目。

    本项目具有如下优势:

    1. 完全本地化:无需联网,不必担心隐私泄露
    2. 功能丰富:支持包括PDF批量合并、拆分、添加水印、加密/解密、提取、OCR识别在内的20余项功能
    3. 跨平台:支持在Windows、Mac、Linux设备上使用
    4. 开源免费
    5. 界面美观简洁,使用简单
    6. 插件化:根据需要选择是否安装额外组件,减小安装包体积

    应用截图

    • MacOS

    • Windows

    • Linux

    上手指南

    安装

    • 二进制安装

    下载地址: 飞书链接:https://ybu95w493r.feishu.cn/docx/Xu3NdUub9ojwA7xrI5NcqdApnQb?from=from_copylink 密码:4C%5$9t;

    • 编译安装
    1. 安装go环境、node环境和python环境
    # 确认go安装成功
    go version
    
    # 确认 "~/go/bin" 位于PATH环境变量中
    echo "export PATH=$PATH:$HOME/go/bin" >> $HOME/.bashrc
    source $HOME/.bashrc
    echo $PATH | grep go/bin
    
    # 确认nodejs安装成功
    npm --version
    1. 编译项目
    git clone https://github.com/kevin2li/PDF-Guru.git
    cd PDF-Guru
    ROOT=$(pwd)
    go install github.com/wailsapp/wails/v2/cmd/wails@latest
    go mod tidy
    
    # 安装前端依赖
    cd ${ROOT}/frontend
    npm install
    
    # 安装后端环境
    cd ${ROOT}/thirdparty
    pip install -r requirements.txt
    pyinstaller -F -w pdf.py
    mkdir ${ROOT}/build/bin
    
    # 1) for darwin, linux
    cp dist/pdf ocr.py convert.py ${ROOT}/build/bin
    
    # 2) for windows
    cp dist/pdf.exe ${ROOT}/build/bin
    cp ocr.py ${ROOT}/build/bin
    cp convert.py ${ROOT}/build/bin
    
    cd $ROOT
    wails dev # 开发预览
    wails build # 编译

    build/bin目录打包,运行PDF Guru即可。

    额外安装(可选)

    软件中大部分功能可直接使用,无需安装额外东西,但是部分功能如ocr相关功能等因打包进来会导致安装包太大,供有需要的用户自行安装依赖环境。需要额外安装的功能会在软件中用蓝色标签标注,如下:

    tag

    Python环境

    如果你需要使用到OCR相关功能(识别PDF书签、提取表格等),可以继续此部分的设置。

    项目使用了PaddleOCR提供ocr文字识别服务,因此需要安装paddleocr环境,并在软件“首选项”中指定虚拟环境中python解释器路径。具体步骤如下:

    1. 安装python环境(推荐miniconda)
    2. 创建虚拟环境,并安装paddleocr
    # 创建环境
    conda create -n ocr python=3.10
    
    # 激活环境
    conda activate ocr
    
    # 安装paddlepaddle和paddleocr
    pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple
    pip install "paddleocr>=2.0.1" -i https://pypi.tuna.tsinghua.edu.cn/simple
    1. 查看环境中python解释器路径

    可以通过conda env list命令查看ocr环境的绝对路径, 注意下面的{用户名}请根据自己实际情况进行替换。

    • windows

    如:C:\Users\{用户名}\miniconda3\envs\ocr\
    则python解释器路径为:C:\Users\{用户名}\miniconda3\envs\ocr\python.exe

    • Mac

    如:/Users/{用户名}/miniconda3/envs/ocr
    则python解释器路径为:/Users/{用户名}/miniconda3/envs/ocr/bin/python

    • Linux

    如:/home/{用户名}/miniconda3/envs/ocr
    则python解释器路径为:/home/{用户名}/miniconda3/envs/ocr/bin/python

    1. 在PDF Guru的“首选项”中配置装有paddleocr的python路径

    首选项

    Pandoc

    Pandoc是一种开源的命令行工具,可用于将各种文档格式之间进行转换。

    https://pandoc.org/installing.html

    如果看到带有pandoc标记的功能,需要先安装pandoc

    使用

    总体说明

    1. 页码格式
    举例 含义
    1 第1页
    1-3 第1-3页(包含第3页)
    1-N 第1页到最后一页(包含最后一页)
    1-3,7,9-10 第1-3页、第7页和第9-10页,注意使用英文逗号分隔多个页码区间
    1. 页码编号

    所有需要填页码的地方都是从1开始编号

    1. 路径格式

    全部使用绝对路径,类似:C:\Users\kevin\Downloads\test.txt, 注意不要用引号包裹路径。

    如何快速获取文件绝对路径?

    1. Windows下可以选中目标文件后使用Ctrl+Shift+C快速复制文件绝对路径。
    2. MacOS下可以选中目标文件后使用Command+Opion+C快速复制文件绝对路径。

    软件会自动检测路径是否存在,不合法的路径将不会被通过,也不会进行继续的处理。

    如果想批量操作,可以使用通配符*。 例如批量对PDF文件进行旋转,路径可以填C:\Users\kevin\Downloads\*.pdf,将会匹配C:\Users\kevin\Downloads目录下所有的PDF文件。除少数功能(插入/替换等)外,大部分都支持批量操作。

    1. 坐标

    所有需要填坐标的地方(如设置锚框等)都是以左上角点为原点。

    具体功能

    1. PDF插入/替换

    插入:支持插入空白页和插入其他文件两种选项。

    替换:用目标PDF的指定页码范围来替换源PDF中指定的页码范围(此处的页码范围只支持11-3两种方式)

    1. PDF合并

    将多个PDF文件合并为一个整体PDF文件,支持自定义排序方式。

    1. PDF拆分

    将大的PDF文件拆分为若干个小的文件,支持多种拆分方式,如均匀分块、自定义范围、按目录级别拆分等。

    1. PDF旋转

    将PDF指定页面范围进行旋转。

    1. PDF删除

    删除PDF中的指定页面。

    1. PDF重排

    对PDF的页面顺序进行重排列。

    1. PDF裁剪

    对PDF页面进行裁剪。

    1. PDF缩放

    对PDF页面进行缩放。

    1. PDF分割

    将PDF页面拆分成若干个子页面,支持网格均匀分割和自定义分割方式。

    1. PDF组合

    将多个PDF页面合并为单个页面。

    1. 页眉页脚

    设置PDF的页眉页脚。

    1. 页码设置

    为PDF文件添加页码,内置了多种页码样式,也支持自定义页码样式。

    1. 文档背景

    为PDF文档设置背景,支持使用颜色和图片作为背景。

    1. PDF水印

    为PDF文档添加水印,也提供了多种方式去除PDF文档水印(仅为提升阅读体验使用,切勿滥用侵权)

    添加水印:支持文本、图片、PDF文档三种形式的水印添加,其中文本水印支持字体、字号、颜色、不透明度等多种属性控制,支持设置多行水印等。

    去除水印:支持多种水印去除方式,可根据实际情况选择合适的方式(不保证绝对有效)。

    视频教程: https://www.bilibili.com/video/BV1Qz4y1E7vq/

    1. PDF加密/解密

    给PDF文档设置密码,包括打开密码和权限密码。也支持对PDF文档进行解密并恢复权限。

    1. PDF书签

    支持提取PDF书签、写入PDF书签,甚至使用ocr技术自动识别PDF书签(需要额外安装paddleocr环境)

    视频教程:https://www.bilibili.com/video/BV1Wx4y1o7P6/

    1. PDF提取

    提取PDF文档中的页面、文本、图片等

    1. PDF压缩

    对PDF文档进行压缩减小体积。

    1. PDF转换

    提供PDF与其他格式之间的转换。部分转换需要pandoc(需要额外安装)的支持。

    1. OCR识别

    对PDF页面进行OCR识别,也支持对图片的OCR识别。

    1. 双层PDF制作

    此功能依赖tesseract ocr,下载地址:https://github.com/UB-Mannheim/tesseract/wiki

    依赖安装:https://tesseract-ocr.github.io/tessdoc/#binaries

    语言包下载:

    放到安装目录的tessdata目录下(默认为C:\Program Files\Tesseract-OCR\tessdata)即可。

    1. 首选项

    对于额外安装的功能需要在此处进行配置,即填写外部工具的可执行文件路径。

    FAQ

    1. macOS显示应用程序“PDF Guru Anki”无法打开

    如下:

    解决方法

    打开终端,切换到应用安装目录,输入以下命令:

    cd <解压目录(可拖拽文件夹到终端填充路径)>
    sudo chmod +x core/pdf.bin
    sudo chmod +x "PDF Guru Anki.app/Contents/MacOS/PDF Guru Anki"
    1. macOS显示应用程序已损坏或“无法验证开发者”
    sudo spctl  --master-disable

    然后,打开【系统偏好设置】,选择【隐私与安全性】,在【安全性】下选择【任何来源】选项。

    再次尝试打开,如果还不行,继续执行下面命令:

    sudo xattr -r -d com.apple.quarantine "<安装目录>/PDF Guru Anki.app"

    再次尝试打开,应当可以了。

    1. windows下应用程序被杀毒软件误删

    解决方法

    打开windows安全中心,将程序安装目录设置为免检测。具体步骤如下:

    打开“病毒威胁防护设置”

    打开排除项

    添加程序安装目录为排除项

    Star History

    Star History Chart

    Authors

    @Kevin2li

    License

    This project is licensed under the AGPL-3.0 License - see the LICENSE file for details

    Acknowledgments

    pdf-guru's People

    Contributors

    kevin2li avatar

    Stargazers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    Watchers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    pdf-guru's Issues

    制作双层pdf

    : Traceback (most recent call last): File "dual_layer.py", line 15, in make_dual_layer_pdf FileNotFoundError: [Errno 2] No such file or directory: 'config.json'

    直接下载的二进制软件,已经配置了如下路径,并下载了中文包(可能是因为通过homebrew安装的缘故?
    image
    image

    书签的提取机制请教

    Hello Kevin,

    想请教下,书签是如何提取的,是对文档内容进行扫描还是识别文档的前几页,判断是否存在目录再根据目录进行提取?

    谢谢

    使用基于字体属性生成标签的功能时报错

    报错如下:
    处理失败!
    : 命令执行失败!2024-03-02 23:41:59.739 | DEBUG | main::399 - Namespace(bookmark_which='detect', input_path='C:\Users\ms-ml\Downloads\����˼��ʷ һ�������Ե��ӽ� (1).pdf', output=None, page_range='31-N', type='font', which='bookmark') 2024-03-02 23:41:59.746 | ERROR | main::551 - Traceback (most recent call last): File "bookmark.py", line 261, in find_title_by_rect_annot File "fitz\fitz.py", line 7094, in annots File "fitz\fitz.py", line 6400, in load_annot File "fitz\fitz.py", line 6301, in _load_annot RuntimeError: xref 2010 is not an annot of this page During handling of the above exception, another exception occurred: Traceback (most recent call last): File "pdf.py", line 460, in File "bookmark.py", line 379, in find_title_by_rect_annot UnboundLocalError: local variable 'toc' referenced before assignment usage: pdf.exe [-h] {merge,split,delete,insert,replace,rotate,reorder,encrypt,decrypt,change_password,bookmark,watermark,compress,resize,extract,cut,combine,crop,convert,mask,bg,header_footer,page_number,dual,sign,annot} ... positional arguments: {merge,split,delete,insert,replace,rotate,reorder,encrypt,decrypt,change_password,bookmark,watermark,compress,resize,extract,cut,combine,crop,convert,mask,bg,header_footer,page_number,dual,sign,annot} merge �ϲ� split ���� delete ɾ�� insert ���� replace �滻 rotate ��ת reorder ���� encrypt ���� decrypt ���� change_password �޸����� bookmark ��ǩ watermark ˮӡ compress ѹ�� resize ���� extract ��ȡ cut �ָ� combine ���� crop �ü� convert ת�� mask ���� bg ���� header_footer ҳüҳ�� page_number ҳ�� dual ˫��PDF sign ǩ�� annot ��ע optional arguments: -h, --help show this help message and exit : exit status 1

    原文件:
    经济**史 一种批判性的视角 (1)_提取.pdf

    运行报错如下


    Translated Report (Full Report Below)

    Incident Identifier: 8967D817-8DFD-42F0-A364-621F21C606BE
    CrashReporter Key: A586B257-715A-4D1A-AF67-37857BC12F22
    Hardware Model: MacBookPro15,1
    Process: PDF Guru [26148]
    Path: /private/var/folders/*/PDF Guru.app/Contents/MacOS/PDF Guru
    Identifier: com.wails.PDF Guru
    Version: 1.0.0 (1.0.0)
    Code Type: X86-64 (Native)
    Role: Background
    Parent Process: launchd [1]
    Coalition: com.wails.PDF Guru [29067]

    Date/Time: 2023-07-26 11:21:43.7193 +0800
    Launch Time: 2023-07-26 11:21:40.8308 +0800
    OS Version: macOS 13.4 (22F66)
    Release Type: User
    Report Version: 104

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000000000c8
    Exception Codes: 0x0000000000000001, 0x00000000000000c8
    VM Region Info: 0xc8 is not in any region. Bytes before following region: 140737486843704
    REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
    UNUSED SPACE AT START
    --->
    shared memory 7fffffe8f000-7fffffe90000 [ 4K] r-x/r-x SM=SHM
    Termination Reason: SIGNAL 11 Segmentation fault: 11
    Terminating Process: exc handler [26148]

    Triggered by Thread: 0

    Thread 0 Crashed:
    0 ??? 0x7ff80cda1ed4 ???

    Thread 0 crashed with X86 Thread State (64-bit):
    rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x00007ff80ce07ec6 rdx: 0x0000000000000000
    rdi: 0x000000000000000f rsi: 0x0000000000006624 rbp: 0x00007ff7bfeffaf0 rsp: 0x00007ff7bfeff870
    r8: 0x00007ff8507d83c0 r9: 0x0000000000000170 r10: 0x0000000000000000 r11: 0x0000000000000246
    r12: 0x00007ff84ea48600 r13: 0x000000000cd04000 r14: 0x0000000000000000 r15: 0x00007ff80cd9c000
    rip: 0x00007ff80cda1ed4 rfl: 0x0000000000010246 cr2: 0x00000000000000c8

    Logical CPU: 0
    Error Code: 0x00000004 (no mapping for user data read)
    Trap Number: 14

    Binary Images:
    0x1017c1000 - 0x10185cfff () <9e98a840-a3ac-31c1-ab97-829af9bd6864> ???
    0x0 - 0xffffffffffffffff ??? (
    ) <00000000-0000-0000-0000-000000000000> ???

    Error Formulating Crash Report:
    dyld_process_snapshot_get_shared_cache failed

    EOF


    Full Report

    {"app_name":"PDF Guru","timestamp":"2023-07-26 11:21:43.00 +0800","app_version":"1.0.0","slice_uuid":"00000000-0000-0000-0000-000000000000","build_version":"1.0.0","platform":0,"bundleID":"com.wails.PDF Guru","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.4 (22F66)","roots_installed":0,"name":"PDF Guru","incident_id":"8967D817-8DFD-42F0-A364-621F21C606BE"}
    {
    "uptime" : 140000,
    "procRole" : "Background",
    "version" : 2,
    "userID" : 501,
    "deployVersion" : 210,
    "modelCode" : "MacBookPro15,1",
    "coalitionID" : 29067,
    "osVersion" : {
    "train" : "macOS 13.4",
    "build" : "22F66",
    "releaseType" : "User"
    },
    "captureTime" : "2023-07-26 11:21:43.7193 +0800",
    "incident" : "8967D817-8DFD-42F0-A364-621F21C606BE",
    "pid" : 26148,
    "cpuType" : "X86-64",
    "roots_installed" : 0,
    "bug_type" : "309",
    "procLaunch" : "2023-07-26 11:21:40.8308 +0800",
    "procStartAbsTime" : 147537764764810,
    "procExitAbsTime" : 147540652778614,
    "procName" : "PDF Guru",
    "procPath" : "/private/var/folders/*/PDF Guru.app/Contents/MacOS/PDF Guru",
    "bundleInfo" : {"CFBundleShortVersionString":"1.0.0","CFBundleVersion":"1.0.0","CFBundleIdentifier":"com.wails.PDF Guru"},
    "storeInfo" : {"deviceIdentifierForVendor":"934931D5-E1C8-51F3-B8A1-4BC58E8B0F3C","thirdParty":true},
    "parentProc" : "launchd",
    "parentPid" : 1,
    "coalitionName" : "com.wails.PDF Guru",
    "crashReporterKey" : "A586B257-715A-4D1A-AF67-37857BC12F22",
    "codeSigningID" : "",
    "codeSigningTeamID" : "",
    "codeSigningValidationCategory" : 0,
    "codeSigningTrustLevel" : 0,
    "wakeTime" : 4415,
    "bridgeVersion" : {"build":"20P5058","train":"7.5"},
    "sleepWakeUUID" : "9A34525C-0B51-46A5-AD92-5FAC98A5D9FA",
    "sip" : "disabled",
    "vmRegionInfo" : "0xc8 is not in any region. Bytes before following region: 140737486843704\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n shared memory 7fffffe8f000-7fffffe90000 [ 4K] r-x/r-x SM=SHM ",
    "exception" : {"codes":"0x0000000000000001, 0x00000000000000c8","rawCodes":[1,200],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x00000000000000c8"},
    "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":26148},
    "vmregioninfo" : "0xc8 is not in any region. Bytes before following region: 140737486843704\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n shared memory 7fffffe8f000-7fffffe90000 [ 4K] r-x/r-x SM=SHM ",
    "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":1,"thread_set_state":0,"task_for_pid":1},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
    "faultingThread" : 0,
    "threads" : [{"triggered":true,"id":3142654,"instructionState":{"instructionStream":{"bytes":[137,165,120,255,255,255,72,141,5,175,128,163,67,139,56,69,49,228,137,254,49,210,185,255,255,255,255,232,251,155,7,0,72,141,61,37,133,202,65,72,141,117,200,72,141,85,192,232,138,52,2,0,132,192,15,132,243,1,0,0,72,139,93,200,76,141,37,69,103,202,65,73,139,60,36,190,112,1,0,0,232,190,151,7,0,65,137,198,133,192,15,133,118,1,0,0,139,131,200,0,0,0,133,192,116,10,73,139,12,36,137,129,200,0,0,0,72,139,67,16,72,141,149,0,254,255,255,76,137,58,72,141,13,17,24,8,0,233,130,1,0,0,73,139,60,36,232,1,174,4,0,132,192,15,133,100,3,0,0,72,141,61,166,132,202,65,232,133,50,2,0,132,192,15,133,80,3,0,0,76,137,231,232,219,46,0,0,72,141,53,249,23],"offset":96}},"threadState":{"r13":{"value":214974464},"rax":{"value":0},"rflags":{"value":66118},"cpu":{"value":0},"r14":{"value":0},"rsi":{"value":26148},"r8":{"value":140704479019968},"cr2":{"value":200},"rdx":{"value":0},"r10":{"value":0},"r9":{"value":368},"r15":{"value":140703344214016},"rbx":{"value":0},"trap":{"value":14,"description":"(no mapping for user data read)"},"err":{"value":4},"r11":{"value":582},"rip":{"value":140703344238292,"matchesCrashFrame":1},"rbp":{"value":140702053825264},"rsp":{"value":140702053824624},"r12":{"value":140704448022016},"rcx":{"value":140703344656070},"flavor":"x86_THREAD_STATE","rdi":{"value":15}},"frames":[{"imageOffset":140703344238292,"imageIndex":1}]}],
    "usedImages" : [
    {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4319875072,
    "size" : 638976,
    "uuid" : "9e98a840-a3ac-31c1-ab97-829af9bd6864",
    "name" : ""
    },
    {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
    }
    ],
    "vmSummary" : "ReadOnly portion of Libraries: Total=6056K resident=0K(0%) swapped_out_or_unallocated=6056K(100%)\nWritable regions: Total=9008K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=9008K(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8192K 1 \nVM_ALLOCATE 13.6M 4 \nVM_ALLOCATE (reserved) 232K 2 reserved VM address space (unallocated)\n__DATA 16K 1 \n__DATA_CONST 32K 1 \n__DATA_DIRTY 16K 1 \n__LINKEDIT 340K 3 \n__TEXT 5720K 2 \nshared memory 4K 1 \n=========== ======= ======= \nTOTAL 83.8M 17 \nTOTAL, minus reserved VM space 83.6M 17 \n",
    "legacyInfo" : {
    "threadTriggered" : {

    }
    },
    "logWritingSignature" : "742a70f72b93361e22f26c694248ef784b4c1f50",
    "trialInfo" : {
    "rollouts" : [
    {
    "rolloutId" : "6112d17137f5d11121dcd4e2",
    "factorPackIds" : {

      },
      "deploymentId" : 240000329
    },
    {
      "rolloutId" : "6391cacc75b0720ff1f8c695",
      "factorPackIds" : {
        "COREOS_ICD" : "63957f508061fa721c8edc4a"
      },
      "deploymentId" : 240000007
    }
    

    ],
    "experiments" : [

    ]
    },
    "reportNotes" : [
    "dyld_process_snapshot_get_shared_cache failed"
    ]
    }

    Model: MacBookPro15,1, BootROM 1968.120.12.0.0 (iBridge: 20.16.5058.0.0,0), 6 processors, 6-Core Intel Core i7, 2.2 GHz, 16 GB, SMC
    Graphics: Intel UHD Graphics 630, Intel UHD Graphics 630, Built-In
    Graphics: Radeon Pro 555X, Radeon Pro 555X, PCIe, 4 GB
    Display: Color LCD, 2880 x 1800 Retina, Main, MirrorOff, Online
    Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2400 MHz, SK Hynix, HMA81GS6AFR8N-UH
    Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2400 MHz, SK Hynix, HMA81GS6AFR8N-UH
    AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x7BF), wl0: Dec 9 2022 16:56:24 version 9.30.492.0.32.5.87 FWID 01-3a11ec19
    Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
    Network Service: Wi-Fi, AirPort, en0
    USB Device: USB31Bus
    USB Device: iPhone
    USB Device: T2Bus
    USB Device: Touch Bar Backlight
    USB Device: Touch Bar Display
    USB Device: Apple Internal Keyboard / Trackpad
    USB Device: Headset
    USB Device: Ambient Light Sensor
    USB Device: FaceTime HD Camera (Built-in)
    USB Device: Apple T2 Controller
    Thunderbolt Bus: MacBook Pro, Apple Inc., 47.5
    Thunderbolt Bus: MacBook Pro, Apple Inc., 47.5

    关于优化添加书签功能的小建议

    添加的书签基本上都是定位在每一页的最下面(而不是最上面),每次在目录里点了一下跳转到对应的页码后还要再往上滑动一下,能不能调整一下,定位在每一页的开头,感觉更符合直觉一些

    pdf转docx

    image

    如图,无法转换

    网络方面用上魔法和不用魔法都没用

    去错PDF水印报错

    在用 PDF水印-去除水印-(可编辑)文字水印,出现了以下报错,我尝试pip install defusedxml,但该报错仍出现。

    image

    运行windows-cli版程序报错

    Traceback (most recent call last):
    File "pdf.py", line 192, in
    File "pdf.py", line 43, in main
    AttributeError: 'Namespace' object has no attribute 'which'

    PDF合并功能报错

    : Traceback (most recent call last): File "merge.py", line 34, in merge_pdf File "merge.py", line 34, in AttributeError: 'NoneType' object has no attribute 'group'
    image

    双层PDF制作功能中,页码范围选项报错

    软件版本v1.0.13,系统为win11。
    提示如下:

    处理失败! : 命令执行失败!usage: pdf.exe [-h] {merge,split,delete,insert,replace,rotate,reorder,encrypt,decrypt,change_password,bookmark,watermark,compress,resize,extract,cut,combine,crop,convert,mask,bg,header_footer,page_number,dual,sign,annot} ... pdf.exe: error: unrecognized arguments: --page_range F:\TEST.pdf : exit status 2

    页码范围留空时可以正常运行。

    PDF合并报错

    : Traceback (most recent call last): File "merge.py", line 68, in merge_pdf File "fitz\fitz.py", line 4629, in save RuntimeError: cannot remove file 'E:\ppddfff\1\1': Permission denied

    尝试使用管理员模式运行

    图片转换为pdf报错

    使用从飞书下载的二进制版本报错“连接服务器超时”
    4b87f1f23421aa61002a58dbbce9ef7c

    自己编译的版本python报错
    屏幕截图 2024-01-12 211421

    内容如下:
    : Traceback (most recent call last): File "convert.py", line 158, in convert_svg2pdf new_path_list = sorted(new_path_list, key=lambda x: int(re.search(r"\d+$", Path(x).stem).group())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "convert.py", line 158, in new_path_list = sorted(new_path_list, key=lambda x: int(re.search(r"\d+$", Path(x).stem).group())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'group'

    编译环境:
    Python 3.12.0 in conda
    Windows11
    go version go1.21.6 windows/amd64
    npm version 10.2.4

    去水印功能出错

    去水印功能的内容水印和可编辑文字水印都出错,软件版本v1.0.13,系统win11
    PDF_Guru_8e9iVNVloz
    PDF_Guru_iAZd0bSExr

    Mac端打开意外退出


    Translated Report (Full Report Below)

    Incident Identifier: 57CA6429-A273-46D9-85DD-C15BE9AA702A
    CrashReporter Key: 8459976F-B334-E42B-0477-43206B3BAB27
    Hardware Model: MacBookPro15,3
    Process: PDF Guru [38683]
    Path: /private/var/folders/*/PDF Guru.app/Contents/MacOS/PDF Guru
    Identifier: com.wails.PDF Guru
    Version: 1.0.0 (1.0.0)
    Code Type: X86-64 (Native)
    Role: Default
    Parent Process: launchd [1]
    Coalition: com.wails.PDF Guru [5549]

    Date/Time: 2023-08-03 15:50:41.1973 +0800
    Launch Time: 2023-08-03 15:50:41.1104 +0800
    OS Version: macOS 13.3 (22E252)
    Release Type: User
    Report Version: 104

    Exception Type: EXC_BAD_ACCESS (SIGSEGV)
    Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000000000c8
    Exception Codes: 0x0000000000000001, 0x00000000000000c8
    VM Region Info: 0xc8 is not in any region. Bytes before following region: 140737487400760
    REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
    UNUSED SPACE AT START
    --->
    shared memory 7ffffff17000-7ffffff18000 [ 4K] r-x/r-x SM=SHM
    Termination Reason: SIGNAL 11 Segmentation fault: 11
    Terminating Process: exc handler [38683]

    Triggered by Thread: 0

    Thread 0 Crashed:
    0 ??? 0x7ff809b01ed4 ???

    Thread 0 crashed with X86 Thread State (64-bit):
    rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x00007ff809b67ec6 rdx: 0x0000000000000000
    rdi: 0x000000000000000f rsi: 0x000000000000971b rbp: 0x00007ff7bfeff5b0 rsp: 0x00007ff7bfeff330
    r8: 0x00007ff84d52f0c0 r9: 0x0000000000000170 r10: 0x0000000000000000 r11: 0x0000000000000246
    r12: 0x00007ff84b7a0600 r13: 0x0000000009a64000 r14: 0x0000000000000000 r15: 0x00007ff809afc000
    rip: 0x00007ff809b01ed4 rfl: 0x0000000000010246 cr2: 0x00000000000000c8

    Logical CPU: 2
    Error Code: 0x00000004 (no mapping for user data read)
    Trap Number: 14

    Binary Images:
    0x1017c9000 - 0x101864fff () ???
    0x0 - 0xffffffffffffffff ??? (
    ) <00000000-0000-0000-0000-000000000000> ???

    Error Formulating Crash Report:
    dyld_process_snapshot_get_shared_cache failed

    EOF


    Full Report

    {"app_name":"PDF Guru","timestamp":"2023-08-03 15:50:41.00 +0800","app_version":"1.0.0","slice_uuid":"00000000-0000-0000-0000-000000000000","build_version":"1.0.0","platform":0,"bundleID":"com.wails.PDF Guru","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.3 (22E252)","roots_installed":0,"name":"PDF Guru","incident_id":"57CA6429-A273-46D9-85DD-C15BE9AA702A"}
    {
    "uptime" : 56000,
    "procRole" : "Default",
    "version" : 2,
    "userID" : 501,
    "deployVersion" : 210,
    "modelCode" : "MacBookPro15,3",
    "coalitionID" : 5549,
    "osVersion" : {
    "train" : "macOS 13.3",
    "build" : "22E252",
    "releaseType" : "User"
    },
    "captureTime" : "2023-08-03 15:50:41.1973 +0800",
    "incident" : "57CA6429-A273-46D9-85DD-C15BE9AA702A",
    "pid" : 38683,
    "cpuType" : "X86-64",
    "roots_installed" : 0,
    "bug_type" : "309",
    "procLaunch" : "2023-08-03 15:50:41.1104 +0800",
    "procStartAbsTime" : 56128830493362,
    "procExitAbsTime" : 56128916918339,
    "procName" : "PDF Guru",
    "procPath" : "/private/var/folders/*/PDF Guru.app/Contents/MacOS/PDF Guru",
    "bundleInfo" : {"CFBundleShortVersionString":"1.0.0","CFBundleVersion":"1.0.0","CFBundleIdentifier":"com.wails.PDF Guru"},
    "storeInfo" : {"deviceIdentifierForVendor":"4794C209-6599-53F5-A11F-93DA5C0251FA","thirdParty":true},
    "parentProc" : "launchd",
    "parentPid" : 1,
    "coalitionName" : "com.wails.PDF Guru",
    "crashReporterKey" : "8459976F-B334-E42B-0477-43206B3BAB27",
    "throttleTimeout" : 2147483647,
    "codeSigningID" : "",
    "codeSigningTeamID" : "",
    "codeSigningValidationCategory" : 0,
    "codeSigningTrustLevel" : 0,
    "wakeTime" : 2083,
    "bridgeVersion" : {"build":"20P4252","train":"7.4"},
    "sleepWakeUUID" : "23D7663F-78C0-4473-98F6-EEEC85A7B8F4",
    "sip" : "enabled",
    "vmRegionInfo" : "0xc8 is not in any region. Bytes before following region: 140737487400760\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n shared memory 7ffffff17000-7ffffff18000 [ 4K] r-x/r-x SM=SHM ",
    "exception" : {"codes":"0x0000000000000001, 0x00000000000000c8","rawCodes":[1,200],"type":"EXC_BAD_ACCESS","signal":"SIGSEGV","subtype":"KERN_INVALID_ADDRESS at 0x00000000000000c8"},
    "termination" : {"flags":0,"code":11,"namespace":"SIGNAL","indicator":"Segmentation fault: 11","byProc":"exc handler","byPid":38683},
    "vmregioninfo" : "0xc8 is not in any region. Bytes before following region: 140737487400760\n REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> \n shared memory 7ffffff17000-7ffffff18000 [ 4K] r-x/r-x SM=SHM ",
    "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
    "faultingThread" : 0,
    "threads" : [{"triggered":true,"id":816355,"instructionState":{"instructionStream":{"bytes":[137,165,120,255,255,255,72,141,5,175,237,162,67,139,56,69,49,228,137,254,49,210,185,255,255,255,255,232,251,155,7,0,72,141,61,37,5,202,65,72,141,117,200,72,141,85,192,232,138,52,2,0,132,192,15,132,243,1,0,0,72,139,93,200,76,141,37,69,231,201,65,73,139,60,36,190,112,1,0,0,232,190,151,7,0,65,137,198,133,192,15,133,118,1,0,0,139,131,200,0,0,0,133,192,116,10,73,139,12,36,137,129,200,0,0,0,72,139,67,16,72,141,149,0,254,255,255,76,137,58,72,141,13,209,23,8,0,233,130,1,0,0,73,139,60,36,232,1,174,4,0,132,192,15,133,100,3,0,0,72,141,61,166,4,202,65,232,133,50,2,0,132,192,15,133,80,3,0,0,76,137,231,232,219,46,0,0,72,141,53,185,23],"offset":96}},"threadState":{"r13":{"value":161890304},"rax":{"value":0},"rflags":{"value":66118},"cpu":{"value":2},"r14":{"value":0},"rsi":{"value":38683},"r8":{"value":140704425898176},"cr2":{"value":200},"rdx":{"value":0},"r10":{"value":0},"r9":{"value":368},"r15":{"value":140703291129856},"rbx":{"value":0},"trap":{"value":14,"description":"(no mapping for user data read)"},"err":{"value":4},"r11":{"value":582},"rip":{"value":140703291154132,"matchesCrashFrame":1},"rbp":{"value":140702053823920},"rsp":{"value":140702053823280},"r12":{"value":140704394905088},"rcx":{"value":140703291571910},"flavor":"x86_THREAD_STATE","rdi":{"value":15}},"frames":[{"imageOffset":140703291154132,"imageIndex":1}]}],
    "usedImages" : [
    {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4319907840,
    "size" : 638976,
    "uuid" : "afa3518c-143e-3060-bbe8-624d4ca41063",
    "name" : ""
    },
    {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
    }
    ],
    "vmSummary" : "ReadOnly portion of Libraries: Total=6064K resident=0K(0%) swapped_out_or_unallocated=6064K(100%)\nWritable regions: Total=9008K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=9008K(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8192K 1 \nVM_ALLOCATE 13.6M 4 \nVM_ALLOCATE (reserved) 232K 2 reserved VM address space (unallocated)\n__DATA 16K 1 \n__DATA_CONST 32K 1 \n__DATA_DIRTY 16K 1 \n__LINKEDIT 340K 3 \n__TEXT 5728K 2 \nshared memory 4K 1 \n=========== ======= ======= \nTOTAL 83.8M 17 \nTOTAL, minus reserved VM space 83.6M 17 \n",
    "legacyInfo" : {
    "threadTriggered" : {

    }
    },
    "logWritingSignature" : "72156cbc4f3e471a1c1cc26e16523e46cbb678ac",
    "trialInfo" : {
    "rollouts" : [
    {
    "rolloutId" : "60da5e84ab0ca017dace9abf",
    "factorPackIds" : {

      },
      "deploymentId" : 240000008
    },
    {
      "rolloutId" : "62fe74515312cd4599bd3c80",
      "factorPackIds" : {
        "MYRIAD_BOOSTS" : "62fe74805312cd4599bd3c81"
      },
      "deploymentId" : 240000006
    }
    

    ],
    "experiments" : [
    {
    "treatmentId" : "a092db1b-c401-44fa-9c54-518b7d69ca61",
    "experimentId" : "64a844035c85000c0f42398a",
    "deploymentId" : 400000016
    },
    {
    "treatmentId" : "8ca8349c-e2bc-482c-9ca7-3907b48a5341",
    "experimentId" : "648b5a581b04c12d4127bbb6",
    "deploymentId" : 400000001
    }
    ]
    },
    "reportNotes" : [
    "dyld_process_snapshot_get_shared_cache failed"
    ]
    }

    V1.1.4版本,去除文字水印功能出错

    尝试去除文字水印时出错。
    image

    错误信息如图。
    image

    尝试手工安装pdfrw模块后,仍然出错。
    image

    个人猜测,PDF-Guru应用中已经打包了python解释器,不会调用系统提供的Python包。

    请帮忙fix这个bug。

    UI用的什么框架

    你好!

    初入 GO,想找个UI框架,这个编译完才30多兆,用的是什么呢?
    请稍微提点几句。

    谢谢

    奇偶页合并问题

    比如,我用CS扫描王扫描了8个证件的正反面(共16页)
    扫描时候证件大致都在上半部分。现在需要将正反面合到一个页面里。可以单独添加一个这样的功能吗?

    裁剪全部页面的下半部分,然后拼接成一个页面

    使用通配符*批量ocr时报错

    使用通配符*批量ocr时报错,

    Traceback (most recent call last): File "C:\Users\user\AppData\Local\Temp_MEI139642\guru_server\pdf_toolbox\localocr.py", line 308, in ppocr_json File "fitz\fitz.py", line 4118, in init raise FileNotFoundError(msg) fitz.fitz.FileNotFoundError: no such file: 'D:\files\test*.pdf'

    表单验证没有问题,可以正确识别到文件数量。选中单个文件进行ocr识别功能正常。

    Mac 端运行报错

    Mac 端运行报错,不能正常运行,能否详细描述安装的条件。

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.