Total PDF Converter X是将PDF文件转换为其他格式在Web服务器上的正确解决方案。
Windows
2000/2003/Vista
7/8/10/11
and
2012/2016/2019/2022 Server
and
Docker/Citrix/Wine
Total PDF Converter X 是一款服务器端 SDK,可将 PDF 文件转换为 DOC、RTF、XLS、HTML、XHTML、EPS、PS、TXT、CSV、BMP、JPEG、GIF、WMF、EMF、PNG 和 TIFF — 无需在服务器上安装 Adobe Acrobat、Foxit 或任何外部 PDF 库。它以静默方式运行:无图形界面、无对话框、无弹窗。Total PDF Converter X 同时提供命令行程序和 ActiveX/COM 接口,可直接集成到 ASP、PHP、.NET、Python、Ruby、Java 以及任何支持 COM 的后端中。
输出格式分为三大类:
Total PDF Converter X 完整覆盖各种服务器端场景:受密码保护的 PDF(通过 -Pass "wb-pwd" 传入密码)、批量合并(多个 PDF 合为单个输出文档或一张图像)、逐页提取(将多页 PDF 拆分为 N 个单页文件)、文件夹掩码 + 递归(-Recurse -kfs)处理整个目录树、基于队列文件运行(-list),并可与 Total Folder Monitor 配合,在文件到达时实现热文件夹自动转换。
多线程引擎以最高速度处理批量任务。兼容 IIS、Docker、Citrix 和 Wine。免费试用(30 天试用期,无任何限制),亲自验证它物有所值。
当前支持的部分文件格式转换:
|
|
|
string src = @"C:\test\Source.pdf";
string dest = @"C:\test\Dest.docx";
var cnv = new PDFConverterX();
cnv.Convert(src, dest, "-cDOC -log c:\\test\\PDF.log");
if (!string.IsNullOrEmpty(cnv.ErrorMessage))
throw new Exception(cnv.ErrorMessage);
public static class Function1
{
[FunctionName("Function1")]
public static async Task Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
StringBuilder sbLogs = new StringBuilder();
sbLogs.AppendLine("started...");
try
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
var assemblyDirectoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
assemblyDirectoryPath = assemblyDirectoryPath.Substring(0, assemblyDirectoryPath.Length - 4);
var executablePath = $@"{assemblyDirectoryPath}\Converter\PDFConverterX.exe";
sbLogs.AppendLine(executablePath + "...");
var srcPath = $@"{assemblyDirectoryPath}\src\sample.pdf";
var outPath = Path.GetTempFileName() + ".docx";
startInfo.FileName = executablePath;
if (File.Exists(outPath))
{
File.Delete(outPath);
}
if (File.Exists(executablePath) && File.Exists(srcPath))
{
sbLogs.AppendLine("files exists...");
}
else
sbLogs.AppendLine("EXE & source files NOT exists...");
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = $"\"{srcPath}\" \"{outPath}\" -cDOC";
using (Process exeProcess = Process.Start(startInfo))
{
sbLogs.AppendLine($"wait...{DateTime.Now.ToString()}");
exeProcess.WaitForExit();
sbLogs.AppendLine($"complete...{DateTime.Now.ToString()}");
}
sbLogs.AppendLine("Conversion complete.");
}
catch (Exception ex)
{
sbLogs.AppendLine(ex.ToString());
}
return new OkObjectResult(sbLogs);
}
}
dim C
Set C=CreateObject("PDFConverter.PDFConverterX")
C.Convert "c:\test\source.pdf", "c:\test\dest.docx", "-cDOC -log c:\test\PDF.log"
Response.Write C.ErrorMessage
set C = nothing
dim C
Set C=CreateObject("PDFConverter.PDFConverterX")
Response.Clear
Response.AddHeader "Content-Type", "binary/octet-stream"
Response.AddHeader "Content-Disposition", "attachment; filename=test.docx"
Response.BinaryWrite C.ConvertToStream("C:\www\ASP\Source.pdf", "C:\www\ASP", "-cDOC -log c:\html.log")
set C = nothing
$src="C:\\test\\test.pdf";
$dest="C:\\test\\test.docx";
if (file_exists($dest)) unlink($dest);
$c= new COM("PDFConverter.PDFConverterX");
$c->convert($src,$dest, "-cDOC -log c:\\test\\PDF.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;
require 'win32ole'
c = WIN32OLE.new('PDFConverter.PDFConverterX')
src = "C:\\test\\test.pdf"
dest = "C:\\test\\test.docx"
c.convert(src, dest, "-cDOC -log c:\\test\\PDF.log")
if not File.exist?(dest)
puts c.ErrorMessage
end
import win32com.client
import os.path
c = win32com.client.Dispatch("PDFConverter.PDFConverterX")
src = "C:\\test\\test.pdf"
dest = "C:\\test\\test.docx"
c.convert(src, dest, "-cDOC -log c:\\test\\PDF.log")
if not os.path.exists(dest):
print(c.ErrorMessage)
uses Dialogs, Vcl.OleAuto;
var
c: OleVariant;
begin
c := CreateOleObject('PDFConverter.PDFConverterX');
c.Convert('c:\test\source.pdf', 'c:\test\dest.docx', '-cDOC -log c:\test\PDF.log');
if c.ErrorMessage <> '' then
ShowMessage(c.ErrorMessage);
end;
var c = new ActiveXObject("PDFConverter.PDFConverterX");
c.Convert("C:\\test\\source.pdf", "C:\\test\\dest.docx", "-cDOC");
if (c.ErrorMessage != "")
alert(c.ErrorMessage)
use Win32::OLE; my $src = "C:\\test\\test.pdf"; my $dest = "C:\\test\\test.docx"; my $c = CreateObject Win32::OLE 'PDFConverter.PDFConverterX'; $c->convert($src, $dest, "-cDOC -log c:\\test\\PDF.log"); print $c->ErrorMessage if -e $dest;
"目前为止,该工具运行正常,能够通过 Windows 计划任务中的命令行将 PDF 文件转换为 Excel 文件。如果遇到任何问题,我一定会与你们联系。"
Sofiane Hamri
Independent Developer
"非常感谢你们的所有帮助。Total PDF Converter X 工作得非常出色。这是一次急需的修复 — 你们某竞争对手的产品在通过 Windows 服务运行时会卡死。你们的配合和迅速响应真正帮我们救了急,使我们能够按时完成客户的交付期限。"
Michael J. Balmer
Lead Integration Engineer, www.QuestDiagnostics.com
"客户以数十种供应商模板向我们发送 PDF 发票;我们将明细行提取到 XLS 供会计系统使用。Total PDF Converter X 配合 -cXLS 加上 -FirstRowIsHeader,生成的电子表格非常干净,而其他竞品给出的却是混乱的合并单元格。在我们的硬件上吞吐量约为每分钟 200 张发票,已稳定生产运行五年。我们替换掉了一条原先基于 Acrobat 自动化的流水线,那条流水线遇到任何格式错误的 PDF 都会卡死;而它内置的解析器对同样的文件毫无怨言。"
Aleksei P.
Senior Backend Developer at an invoice-processing platform
"客户提供的 PDF 取证材料以案件特定的密码加密。Total PDF Converter X 通过 -Pass 在同一次调用中完成解锁与转换,因此我们的流水线无需单独的解密步骤。-cExtract 为每页生成一个 PNG,用于审阅工具的缩略图条。在 Windows Server Core 上无界面运行,不需要 Acrobat,四年生产使用中没有出现任何授权方面的意外。"
Yaiza R.
DevOps Engineer at a legal e-discovery platform
"我们将 Total PDF Converter X 通过免版税许可证打包进了我们的文档管理产品。一次性的项目费用仅相当于 Aspose.PDF 或 PDFTron 按开发者订阅价的一小部分。我们的安装包负责分发并注册 ActiveX,应用程序直接调用它,最终用户只看到我们自己的界面。32 位 ActiveX 的限制让我们花了几天时间重做流水线,但当我们咨询变通方案时,技术支持响应非常迅速。"
Mateusz B.
Independent Software Vendor
Developers and IT teams that integrate PDF conversion into server applications via ActiveX and command line
Add PDF-to-DOC and PDF-to-image conversion to your web app
Web developers integrate Total PDF ConverterX via ActiveX into ASP, PHP, or .NET applications. Users upload PDF files through a browser, the server converts them to DOC, XLS, HTML, or images silently with no GUI, and delivers the result — ready-to-use sample code is included to speed up integration.
Convert PDFs automatically within document management systems
Document management and enterprise content platforms use Total PDF ConverterX to convert uploaded PDFs to TIFF for archival, to text for full-text indexing, or to images for preview thumbnails. The SDK plugs into existing workflows with minimal code changes and handles password-protected PDFs when credentials are supplied.
Convert thousands of PDFs on servers without user interaction
Enterprise IT teams run Total PDF ConverterX via command line in scheduled batch jobs. Incoming PDFs are converted to DOC for editing, CSV for data extraction, or EPS for prepress — all unattended. Multi-page PDFs can be split into individual page files or combined into a single output document per folder.
Convert PDF files to TIFF, JPEG, and EPS for print workflows
Print shops and prepress departments convert PDF files to high-quality TIFF, JPEG, or EPS images on production servers. Control paper orientation, output quality, and image size per job. Process multi-page PDFs as individual page images or combine several PDFs into one multi-page TIFF for imposition.
Embed PDF conversion into your desktop or server software
Software vendors embed Total PDF ConverterX into their own products to add PDF export capabilities without building a conversion engine from scratch. The ActiveX interface provides all conversion features through simple API calls, and hundreds of developers have already integrated it into commercial applications.
Total PDF ConverterX 附带 PDFConverterX.exe,这是一个可以从脚本、计划任务、CI 运行器或任何后端服务驱动的控制台二进制程序。标志集与 GUI 版的 PDFConverter.exe 一致;完整参考请参阅命令行文档。下面的配方涵盖了我们最常从 SDK 客户那里听到的场景。
最简单的调用方式 —— 一个源文件、一个输出、一个目标格式。当您需要从传入的 PDF 中获得可编辑的 Word 文档时非常理想。
PDFConverterX.exe "C:\pdfs\report.pdf" "C:\out\report.doc" -cDOC
财务报表、发票和报告通常以 PDF 形式到达,但需要落入 Excel。将转换器指向文件夹掩码,让它处理每个文件。
PDFConverterX.exe "C:\pdfs\*.pdf" "C:\out\" -cXLS
用于全文搜索索引、NLP 管道或将内容传递到另一个工具。-e 在页面之间插入换页字符,因此您可以稍后将结果拆分回页面。
PDFConverterX.exe "C:\pdfs\*.pdf" "C:\out\" -cTXT -e
缩略图、预览图像或 OCR 的输入 —— 以打印质量 DPI 光栅化每页。-s 每页写入一个图像;模板控制文件命名。
PDFConverterX.exe "C:\pdfs\brochure.pdf" "C:\out\" -cPNG -dpi 300 -s -t "[Name].page#.png"
将 -cPNG 替换为 -cJPG,并添加 -jq 85 以控制 JPEG 质量。
仅提取您实际需要的页面 —— 例如,长报告第 1 至 3 页的执行摘要。
PDFConverterX.exe "C:\pdfs\report.pdf" "C:\out\summary.pdf" -cPDF -p "1-3"
页面列表也接受单个数字和组合,例如 -p "1,3,5-7,10"。
将一个文件夹的 PDF 转换为 HTML 页面,以便它们可以由 Web 堆栈直接提供、由搜索引擎索引或嵌入到 CMS 中。
PDFConverterX.exe "C:\pdfs\*.pdf" "C:\www\docs\" -cHTML
文档存储库很少存在于一个平面文件夹中。-Recurse 遍历子目录;-kfs 在输出端重新创建相同的树,而不是将所有内容展平到一个桶中。
PDFConverterX.exe "C:\archive\*.pdf" "C:\out\archive\" -cDOC -Recurse -kfs
对于期望每个案件文件一个 TIFF 的文档归档系统。-combine 将所有源合并到一个输出中;-tc G4FAX 选择每个查看器都接受的标准黑白传真压缩。
PDFConverterX.exe "C:\pdfs\case123\*.pdf" "C:\archive\case123.tif" -cTIF -combine -tc G4FAX -dpi 300
一旦 PDFConverterX.exe 作为服务或计划作业运行,了解发生了什么的唯一方法就是日志。-verbosity detail 每个文件写一行;-logmode append 在多次运行之间保留历史。
PDFConverterX.exe "C:\pdfs\*.pdf" "C:\out\" -cDOC -log "C:\logs\pdfconv.log" -verbosity detail -logmode append
当工作进程写入队列文件而转换器消耗它时,您不希望将文件路径编码到命令行本身。-list 从文本文件中读取文件掩码(每行一个)。
PDFConverterX.exe -list "C:\queues\batch.txt" "C:\out\" -cRTF
对于需要具有法律约束力的签名 PDF 的工作流 —— 合同、发票、受监管的文档。提供您的 .pfx 证书、其密码以及有关签署事件的可选元数据。
PDFConverterX.exe "C:\pdfs\contract.pdf" "C:\out\contract-signed.pdf" -cPDF -PFXFile "C:\certs\company.pfx" -PFXPass "secret" -SignLoc "Wilmington, DE" -SignRes "Approved"
|
|
|
-Pass "workbook-pwd" 解锁)、加密 PDF(40 位、128 位、256 位 AES)、嵌入字体、矢量图形、栅格图像和表格。输出格式涵盖 DOC、DOCX、RTF、XLS、CSV、HTML、XHTML、TXT、EPS、PS、JPEG、PNG、BMP、GIF、TIFF(单页或多页)、WMF、EMF。new COM("PDFConverter.PDFConverterX"),在 .NET 中使用 new PDFConverterX(),在 Python 中使用 win32com.client.Dispatch("PDFConverter.PDFConverterX"),在 Ruby 中使用 WIN32OLE.new('PDFConverter.PDFConverterX')。或者,可从任何进程、调度器或 Shell 脚本中调用 PDFConverterX.exe 命令行程序。同时还支持通过 ConvertToStream 直接进行流式输出,便于 ASP/PHP 网页响应。-cExtract 将每一页 PDF 写入为独立的输出文件(非常适合生成缩略图或逐页审阅),而默认行为是为每个输入 PDF 生成一个输出文件。-combine 将多个输入 PDF 合并为单个输出文档或一个多页 TIFF。-rn "1-3,7" 可指定特定页面。-sort name 用于在合并整个文件夹时控制输入顺序。-cXLS 将 PDF 中的表格数据提取为 Excel 格式,在源 PDF 含有可识别表格时保留列结构。-cCSV 以自定义分隔符写入相同的数据(欧洲区域使用 -separator ";",引号字符使用 -comma '"')。再结合 -FirstRowIsHeader,可将扫描报告和对账单 PDF 直接转换为可用于电子表格的数据,无需手动整理。