How to use Flyingbee PDF Conversion SDK.
3. Set an executable program as a command in the terminal
5.0 pdf-converter.sh
Update date: 2025-09-19 12:07:50
Try Flyingbee PDF Converter Online for Free, play with PDF to MS Office (.docx, .xlsx, .pptx) conversion on Web.
Powered by Flyingbee PDF Conversion SDK
$ cd "/home/your-name/script-folder/" $ ls # Is there pdf-converter.sh file in current directory pdf-converter.sh $ chmod +x pdf-converter.sh # ✅ Granting executable permissions $ ./pdf-converter.sh # 🔄 execute commandExample Output
🗑️ Cleaning up all .docx files... ✅ All .docx files have been removed. 📦 Found 3 PDF file(s), starting conversion... >>>>>>>>>>>>>>>>>>>> 🔄 Converting (1/3): report_a.pdf >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 🔄 Converting (2/3): summary.pdf >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> 🔄 Converting (3/3): final.pdf >>>>>>>>>>>>>>>>>>>> 🎉 All conversions completed! Processed 3 file(s).
# ============ Bash Script: Convert All PDFs to DOCX/PPTX/XLSX/HTML/CSV/TXT, etc.. ============
#!/bin/bash
# ============ Configuration Section (Please modify according to your setup) ============
PDF_DIR="./" # Directory containing PDF files, "./" means current directory
TOOL_PATH="/home/your-name/sdk-folder/FPPDFConverter.out"
OUTPUT_FORMAT="docx" # Output format (can be changed to pptx, xlsx, html, csv, txt, etc.)
# ======================================================================================
# Enter the PDF directory
cd "$PDF_DIR" || { echo "❌ Failed to enter directory: $PDF_DIR"; exit 1; }
# Remove all existing output format files
echo "🗑️ Cleaning up all .$OUTPUT_FORMAT files..."
rm -f *."$OUTPUT_FORMAT"
echo "✅ All .$OUTPUT_FORMAT files have been removed."
# Gather all PDF files into an array
pdf_files=(*.pdf)
# Check if any PDF file exists
if [[ ! -f "${pdf_files[0]}" ]]; then
echo "⚠️ No PDF files found in the directory."
exit 0
fi
# Count total number of PDFs
total=${#pdf_files[@]}
echo "📦 Found $total PDF file(s), starting conversion..."
# Loop through each PDF and convert
for i in "${!pdf_files[@]}"; do
pdf_file="${pdf_files[$i]}"
index=$((i + 1))
echo ">>>>>>>>>>>>>>>>>>>>"
echo "🔄 Converting file($index/$total): $pdf_file"
echo ">>>>>>>>>>>>>>>>>>>>"
# Execute the conversion command
"$TOOL_PATH" -a PDF2Files -i "$pdf_file" -f "$OUTPUT_FORMAT" -p all
done
echo "🎉 All conversions completed! Processed $total file(s)."
Flyingbee Software
Creative Products
Online Store
Social Connections
We uses cookies to give you the best experience, analyze traffic, and personalize content. By continuing using our Site, you agree to our use of cookies. The information collected might relate to you, your preferences, or your device, and is mostly used to make the site work as you expect it to and to provide a more personalized web experience. However, you can choose not to allow certain types of cookies, which may impact your experience of the site and the services we are able to offer. Read our Privacy Policy or manage your cookie preferences. If you would like to submit an opt-out request with respect to your non-cookie personal information (e.g., your email address), find our support email address to opt-out of sale/sharing/targeting with respect to non-cookie personal information.