免费在线工具

1. PDF to HTML

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);

更多语言

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部