[LINUX] Batch convert PSD files in directory to PDF

Premise to execute in the parent directory where there is a directory for each psd file (original data) and pdf file (after conversion)


$ ls
psd_dir/ pdf_dir

Use ImageMagick


for file in `ls psd_dir`; do
  #Extension removal
  base=`basename "${file}" .psd`
  #conversion
  convert -flatten -density 300 -compress zip psd_dir/"${base}".psd pdf_dir/"${base}".pdf; 
done

reference -To remove directories and extensions from file names -Convert cover image file to PDF file Resolution 350dpi

Recommended Posts

Batch convert PSD files in directory to PDF
Convert markdown to PDF in Python
Batch convert image files uploaded to MS Forms / Google Forms to PDF
Batch convert all xlsx files in the folder to CSV files
Convert psd file to png in Python
Convert PDF files to PNG files with GIMP
Convert files written in python etc. to pdf with syntax highlighting
Convert FBX files to ASCII <-> BINARY in Python
I made a CLI tool to convert images in each directory to PDF
Convert UTF-8 CSV files to read in Excel
Convert multiple jpg files to one PDF file
Beginners try to convert Word files to PDF at once
How to add page numbers to PDF files (in Python)
Convert PDF to Documents by OCR
Convert A4 PDF to A3 every 2 pages
How to convert 0.5 to 1056964608 in one shot
Bring files in Windows to WSL
Convert PDF to image with ImageMagick
Convert a large number of PDF files to text files using pdfminer
Convert PDF of available stores of Go To EAT in Kagoshima prefecture to CSV
How to convert csv to tsv in CLI
Convert from PDF to CSV with pdfplumber
Pin current directory to script directory in Python
I want to batch convert the result of "string" .split () in Python
Convert PDF attached to email to text format
I made a script in python to convert .md files to Scrapbox format
Convert HEIC files to PNG files with Python
How to convert DateTimeField format in Django
Convert from Markdown to HTML in Python
Convert PDF of Go To EAT member stores in Ishikawa prefecture to CSV
Control files to build in Golang project
Convert PDF of new corona outbreak case in Aichi prefecture to CSV
How to read CSV files in Pandas
Convert absolute URLs to relative URLs in Python
Create an API to convert PDF files to TIF images with FastAPI and Docker
Convert PDF of list of Go To EAT member stores in Niigata prefecture to CSV
How to get a list of files in the same directory with python
Access files in the same directory as the executable
Summary of how to import files in Python 3
How to convert SVG to PDF and PNG [Python]
How to check / extract files in RPM package
How to get the files in the [Python] folder
Batch conversion of Excel files to JSON [Python]
Convert exponential notation float to str in Python
[Small story] Easy way to convert Jupyter to PDF
How to read a file in a different directory
Convert cubic mesh code to WKT in Python
Convert to HSV
How to list files under the specified directory in a list (multiple conditions / subdirectory search)
Convert jupyter notebook .ipynb files to python executable .py files
How to convert / restore a string with [] in python
Convert NumPy array "ndarray" to lilt in Python [tolist ()]
How to know the current directory in Python in Blender
Convert CIDR notation netmask to dotted decimal notation in Python
[Python] Convert PDF text to CSV page by page (2/24 postscript)
How to load files in Google Drive with Google Colaboratory
Convert comma-separated numeric strings to numbers in Pandas DataFrame
Convert callback-style asynchronous API to async / await in Python
How to download files from Selenium in Python in Chrome
How to change static directory from default in Flask
Convert / return class object to JSON format in Python