Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/conversion_chaining.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ console.log("Converting PDF to JPG and compressing result files with ZIP\n");

convertapi.convert('jpg', { File: './examples/files/test.pdf' })
.then(function(jpgResult) {
return convertapi.convert('zip', { Files: jpgResult });
return convertapi.convert('zip', { Files: jpgResult }, 'file');
})
.then(function(zipResult) {
return zipResult.saveFiles(dir);
Expand Down
4 changes: 2 additions & 2 deletions examples/convert_url_to_pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
var convertapi = require('../lib')(process.env.API_TOKEN);

// Example of converting Web Page URL to PDF file
// https://www.convertapi.com/web-to-pdf
// https://www.convertapi.com/html-to-pdf

var dir = require('os').tmpdir();
var fromFormat = 'web';
var fromFormat = 'html';
var conversionTimeout = 180;

var params = {
Expand Down
4 changes: 2 additions & 2 deletions examples/get_result_file_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
var convertapi = require('../lib')(process.env.API_TOKEN);

// Example of converting Web Page URL to PDF and reading file data as string
// https://www.convertapi.com/web-to-pdf
// https://www.convertapi.com/html-to-pdf

var fromFormat = 'web';
var fromFormat = 'html';
var conversionTimeout = 180;
var https = require('https');
var Stream = require('stream').Transform;
Expand Down
Loading