免费在线工具
2. 其他免费PDF格式转换工具
免费PDF to HTML格式转换API
1. Java PDF 转 HTML
// Create a client
CPDFClient client = new CPDFClient(publicKey,secretKey);
// Create a task
// Create an example of a PDF tO Html task
CPDFCreateTaskResult result = client.createTask(CPDFConversionEnum.PDF_TO_HTML);
// Get a task id
String taskId = result.getTaskId();
// File handling parameter settings
CPDFToHtmlParameter fileParameter = new CPDFToHtmlParameter();
fileParameter.setIsContainAnnot("1");
fileParameter.setIsContainImg("1");
fileParameter.setPageOptions("2");
// Upload files
client.uploadFile(new File("test.pdf"), taskId, fileParameter);
// Execute task
client.executeTask(taskId);
// query TaskInfo
CPDFTaskInfoResult taskInfo = client.getTaskInfo(taskId);
2. PHP PDF 转 HTML
// Create a client
$client = new CPDFClient('public_key', 'secret_key');
// Create a task
// Create an example of a PDF tO Html task
$taskInfo = $client->createTask(CPDFConversion::PDF_TO_HTML);
// File handling parameter settings
$file = $client->addFile('test.pdf')
->setPageOptions('2')
->setIsContainImg('1')
->setIsContainAnnot('1');
// Upload files
$fileInfo = $file->uploadFile($taskInfo['taskId']);
// Execute task
$client->executeTask($taskInfo['taskId']);
// Query TaskInfo
$taskInfo = $client->getTaskInfo($taskInfo['taskId']);
3. C# PDF 转 HTML
// Create a client
CPDFClient client = new CPDFClient(publicKey,secretKey);
// Create a task
// Create an example of a PDF tO Html task
CPDFCreateTaskResult result = client.CreateTask(CPDFConversionEnum.PDF_TO_HTML);
// Get a task id
string taskId = result.TaskId;
// File handling parameter settings
CPDFToHtmlParameter fileParameter = new CPDFToHtmlParameter();
fileParameter.IsContainImg = "1";
fileParameter.IsContainAnnot = "1";
fileParameter.PageOptions = "2";
// Upload files
client.UploadFile(new FileInfo("test.pdf"), taskId, fileParameter);
// Execute task
client.ExecuteTask(taskId);
// Query TaskInfo
CPDFTaskInfoResult taskInfo = client.GetTaskInfo(taskId);
本站资源均来自互联网,仅供研究学习,禁止违法使用和商用,产生法律纠纷本站概不负责!如果侵犯了您的权益请与我们联系!
转载请注明出处: 免费源码网-免费的源码资源网站 » PDF转HTML:免费工具&代码方式
发表评论 取消回复