pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Basharat Ali <b...@groundswellgroup.ca>
Subject TXT2PDF
Date Tue, 29 Jul 2014 15:15:56 GMT
Hi,
I am using the PDFBOX utility to convert TXT to PDF files. I have developed script as under:

echo " Remove Old TXT File List " >> $LogFileDir/ConvertTxtToPdf.log
rm $ConversionScriptDir/TxtFileList.out
echo " Remove Old PDF File List " >> $LogFileDir/ConvertTxtToPdf.log
rm $ConversionScriptDir/PDFFileslist.out
echo " Make List of TXT Files we are going to convert to PDF " >> $LogFileDir/ConvertTxtToPdf.log
ls -a $TxtFilesDir|grep .TXT > $ConversionScriptDir/TxtFileList.out
echo " TXT File Listing is Complete " >> $LogFileDir/ConvertTxtToPdf.log
echo " Reading TXT File Listing " >> $LogFileDir/ConvertTxtToPdf.log
touch $ConversionScriptDir/PDFFileslist.out
while read line;
do
     PDFOutFile=`echo $line|cut -d '.' -f 1`
     java -jar $PdfConvertorDir/pdfbox-app-1.8.6.jar TextToPDF $PdfFilesDir/$PDFOutFile.PDF
$TxtFilesDir/$line
     echo " TXT File Converted to PDF = $line " >> $ConversionScriptDir/PDFFileslist.out
done < $ConversionScriptDir/TxtFileList.out
echo " All TXT to PDF Conversion is completed successfully. Please verify the PDF Files at::
$PdfFilesDir "


This is taking about 1 hour to convert 2000 files. I have about 1 million such files so it
means it will take 500 hours. Can we have some quicker solution to convert the TXT files to
PDF in less time.
Thanks
Bash


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message