ryanemax 1456b7c6b4 fix: merge pdf img преди 2 месеца
..
Dockerfile 935443ec4f fix: work manager преди 4 месеца
README.md 1456b7c6b4 fix: merge pdf img преди 2 месеца

README.md

Office专用服务器

依赖环境

apt update
apt install docker.io

/etc/docker/daemon.json

# https://oz4vi93h.mirror.aliyuncs.com
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://oz4vi93h.mirror.aliyuncs.com"]
}
EOF
# 备用源地址
{
  "registry-mirrors": [
    "https://docker.m.daocloud.io"
  ]
}
# 重启设置源
systemctl daemon-reload
systemctl restart docker
# 下载镜像
docker pull gotenberg/gotenberg

核心服务

服务1:coolwsd

服务2:gotenberg

# 后台启动 haproxy代理
sudo docker run -d -p 3000:3000 gotenberg/gotenberg
sudo docker run -d -p 3001:3000 gotenberg/gotenberg
sudo docker run -d -p 3002:3000 gotenberg/gotenberg
sudo docker run -d -p 3003:3000 gotenberg/gotenberg
# 直接运行
sudo docker run --rm -p 3000:3000 gotenberg/gotenberg
 location /docs/ {
        rewrite ^/docs/(.*)$ /$1 break;  # 去掉/docs/前缀

        proxy_pass http://localhost:3000;  # 反向代理到本地的3000
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

依赖安装

cp -rf fonts/* /usr/share/fonts/ fc-cache -f -v sudo apt install ghostscript sudo apt install

sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev libopenjp2-7-dev libwebp-dev

安装python2.7

wget https://mirrors.huaweicloud.com/python/2.7.18/Python-2.7.18.tar.xz tar -xf Python-2.7.18.tar.xz

cd Python-2.7.18 ./configure --with-pydebug make -s -j16

/etc/profile

export PATH=$PATH:/home/user/python/Python-2.7.18/

ln -s /root/lib/Python-2.7.18/python /usr/bin/

test

scp final.pdf root@server.fmode.cn:/var/www/miner-manager/

FAQ:合成pdf图片丢失问题

  • 1.删除所有目录书签链接
  • 2.导出:关闭超链接选项导出