logologo
เริ่มต้น
คู่มือ
การพัฒนา
ปลั๊กอิน
API
หน้าหลัก
English
简体中文
日本語
한국어
Español
Português
Deutsch
Français
Русский
Italiano
Türkçe
Українська
Tiếng Việt
Bahasa Indonesia
ไทย
Polski
Nederlands
Čeština
العربية
עברית
हिन्दी
Svenska
เริ่มต้น
คู่มือ
การพัฒนา
ปลั๊กอิน
API
หน้าหลัก
logologo
ภาพรวม
คำอธิบายการกำหนดค่า

ไวยากรณ์เทมเพลต

การใช้งานพื้นฐาน
การวนซ้ำ

เครื่องมือจัดรูปแบบ

ภาพรวม
การจัดรูปแบบข้อความ
การจัดรูปแบบตัวเลข
การจัดรูปแบบสกุลเงิน
การจัดรูปแบบวันที่
การจัดรูปแบบช่วงเวลา
การจัดรูปแบบอาร์เรย์

ฟังก์ชันขั้นสูง

การกำหนดเงื่อนไข
คุณสมบัติขั้นสูง
คำถามที่พบบ่อย
กรณีการใช้งาน
Next Pageภาพรวม
TIP

เอกสารนี้แปลโดย AI หากมีข้อมูลที่ไม่ถูกต้อง โปรดดูเวอร์ชันภาษาอังกฤษ

#ติดตั้งปลั๊กอิน

โปรดดูเอกสารการติดตั้งและอัปเกรดปลั๊กอินเชิงพาณิชย์ครับ/ค่ะ

#ติดตั้ง LibreOffice (ไม่บังคับ)

การสร้างไฟล์ PDF จำเป็นต้องติดตั้ง LibreOffice ครับ/ค่ะ สามารถดาวน์โหลดได้จากเว็บไซต์ทางการ สำหรับเวอร์ชัน Docker คุณสามารถสร้างสคริปต์ได้โดยตรงในไดเรกทอรี ./storage/scripts ครับ/ค่ะ

mkdir ./storage/scripts
cd ./storage/scripts
vim install-libreoffice.sh

เนื้อหาของไฟล์ install-libreoffice.sh มีดังนี้ครับ/ค่ะ

#!/bin/bash

# Define variables
INSTALL_DIR="/opt/libreoffice24.8"
DOWNLOAD_URL="https://downloadarchive.documentfoundation.org/libreoffice/old/24.8.5.2/deb/x86_64/LibreOffice_24.8.5.2_Linux_x86-64_deb.tar.gz"

# Check if LibreOffice is already installed
if [ -d "$INSTALL_DIR" ]; then
    echo "LibreOffice is already installed, skipping installation."
    exit 0
fi

# Update APT sources
tee /etc/apt/sources.list > /dev/null <<EOF
deb http://mirrors.aliyun.com/debian/ bookworm main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ bookworm main contrib non-free
deb http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free
deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free
deb http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free
EOF

# Update APT and install dependencies
apt-get update

apt-get install -y \
    libfreetype6 \
    fontconfig \
    libgssapi-krb5-2 \
    libxml2 \
    libnss3 \
    libdbus-1-3 \
    libcairo2 \
    libxslt1.1 \
    libglib2.0-0 \
    libcups2 \
    libx11-xcb1 \
    fonts-liberation \
    fonts-noto-cjk \
    wget

rm -rf /var/lib/apt/lists/*

cd /app/nocobase/storage/scripts

# Download and install LibreOffice if not already present
if [ ! -d "./libreoffice" ]; then
    rm -rf libreoffice.tar.gz
    wget --no-check-certificate -O libreoffice.tar.gz $DOWNLOAD_URL
    if [ $? -ne 0 ]; then
        echo "Failed to download LibreOffice."
        exit 1
    fi
    rm -rf libreoffice && mkdir libreoffice
    tar -zxvf libreoffice.tar.gz -C ./libreoffice --strip-components=1
    if [ $? -ne 0 ]; then
        echo "Failed to extract LibreOffice."
        exit 1
    fi
fi

# Install LibreOffice
dpkg -i libreoffice/DEBS/*.deb

ln -s /opt/libreoffice24.8/program/soffice.bin /usr/bin/libreoffice
libreoffice --version

if [ $? -ne 0 ]; then
    echo "Failed to install LibreOffice."
    exit 1
fi

echo "LibreOffice installation completed successfully."

รีสตาร์ทคอนเทนเนอร์ app ครับ/ค่ะ

docker compose restart app
# ดูบันทึก (logs)
docker compose logs app

ตรวจสอบว่าติดตั้งสำเร็จหรือไม่ครับ/ค่ะ

$ docker compose exec app bash -c "libreoffice --version"

LibreOffice 24.8.4.2 bb3cfa12c7b1bf994ecc5649a80400d06cd71002