将文件夹中的所有文件合并为pdf [英] Combine all files in a folder as pdf

查看:177
本文介绍了将文件夹中的所有文件合并为pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前的问题是,我必须从根文件夹开始查看每个文件夹,如果存在一个文件,则将其另存为pdf,并将文件夹名称保存在其他位置。如果存在多个文件,则将其合并为一个文件,将其另存为pdf文件,并将文件夹名称保存在其他位置。



示例:

 -根文件夹
-文件夹1
-FileA.tif
-FileB.tif
-Folder2
-FileC.tif

-结果文件夹
-Folder1.pdf(包含FileA.tif和FileB.tif合并为一个pdf)
-Folder2.pdf(包含FileC.tif as pdf)

我当前正在使用Acrobat 9 Professional。我知道我可以手动执行此操作,但是我必须对数百个文件夹执行此操作,并且每个文件夹都包含一个或多个文件。



我最好的解决方法是使用Acrobat Javascript在Windows XP上。



我要弄清楚的事情是是否可以执行以下操作:




  • 对于根文件夹中的每个文件夹

  • 对于文件夹中的每个文件(也保存文件夹名称)

  • 合并文件(我想我可以根据我看到的一些例子进行管理)。



我认为这将为我提供一个良好的开端。 p>

任何帮助将不胜感激。

解决方案

GhostView 是可以处理PDF文件的命令行程序。几年前,我使用它将成千上万个PDF文件连接成一个PDF进行下载。它可以将多种文件类型转换为PDF,此外,您还可以根据需要将所有PDF安全选项应用于最终PDF。如果将其包装为产品,则需要商业版本。


My current problem is that starting from the root folder I have to look into each folder and if one file exists then save it as a pdf with the folder name in a different location. If more then one file exists then combine this into one file, save it as a pdf with the folder name in a different location.

Example:

- Root Folder
    - Folder1
        - FileA.tif
        - FileB.tif
    - Folder2
        - FileC.tif                          

- Result Folder
    - Folder1.pdf (Contains FileA.tif and FileB.tif combined into one pdf)
    - Folder2.pdf (Contains FileC.tif as pdf)

I am currently using Acrobat 9 Professional. I know I can do this manually, but I have to do this for hundreds of folders and each folder has one or more files.

My preffered solution would be in Acrobat Javascript on Windows XP.

Somethings that I am trying to figure out is if I can do some sort of:

  • For each folder in Root Folder
  • For each file in folder (Save the folder name too)
  • Combine files (I think I can mange this based on some examples I have seen)

I think that would give me a good start.

Any help would be greatly appreciated.

解决方案

GhostView is a command-line program that can manipulate PDF files. Years ago, I used this to concatenate thousands of PDF files into a single PDF for download. It can convert multiple file types to PDF, plus you can apply all of the PDF security options to your final PDF as needed. You'll need the commercial version if you're packaging this for a product.

这篇关于将文件夹中的所有文件合并为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆