我知道PDF24能够将PDF转换成JPG。但我不明白如何使用pdf24-Creator.exe命令行从PDF转换为JPG?
我更喜欢使用PDF24而不是Imagick,因为PDF24转换得更好、更快(手动)。
有人能告诉我我做错了什么吗?
@For /R "C:\Users\vladi\PDF_TO_JPG\" %%G In (*.pdf) Do @For %%H In ("%%~dpG.") Do @"%ProgramFiles%\PDF24\pdf24-Creator.exe" -outputFile "%%~nG_.jpg"
我只是想从forder中的图像列表中创建一个pdf。这是代码:
file_path = input('file path of the images: ')
list = os.listdir(file_path)
pdfimages = [
Image.open(file_path + f)
for f in list
]
print('=== Images used to create the PDF ===\n' +'>>> '+str(list))
pdf_path = file_path + pdf
我使用以下命令将一个目录中的所有jpg文件转换并合并为一个pdf文件。
convert *.jpg file.pdf
目录中的文件编号从1.jpg到123.jpg。转换进行得很好,但转换后的页面都搞混了。我希望pdf有从1.jpg到123.jpg的页面,顺序与它们命名的顺序相同。我也尝试使用以下命令:
cd 1
FILES=$( find . -type f -name "*jpg" | cut -d/ -f 2)
mkdir temp && cd temp
for file in $FILES; do
BASE=$(echo $file | se
我很难在浏览器中显示PDF,尽管我正在获取Base64代码,并且使用onlinetool(),我可以看到代码转换为存储在后台的正确的PDF文件。之后,我转换为blob对象,然后当我单击按钮时,它似乎不会在adobe阅读器中打开。
// when the button is pressed, it will call the API to get the PDF document
const headers = new Headers();
headers.append("content-type", "application/json");
我正在使用(MySQL)EAN堆栈开发一个web应用程序。我在MySQL中将png/jpg/pdf保存为BLOB。现在,我可以在Node.js中使用作为缓冲区对象检索它们。
exports.loadUploadedFiles = function(req, res) {
db.File.findAll().success(function(files) {
//res.send(files[0].dataValues.data.toString('ascii')); // I have tried to convert a Buffer to ascii
我正在尝试将一些PDF转换为JPG,并使用pdf2jpg进行此操作。
我运行的代码是:
inputPath = sys.argv[1].replace("\\", "/")
print(inputPath)
# Get parent folder of the file
parentFolder = "/".join(inputPath.split("/")[:-1])
print(parentFolder)
# Convert pdf to jpg in same folder
result = pdf2jpg.conver