mirror of
https://github.com/astefanutti/decktape.git
synced 2024-08-18 02:30:23 +03:00
Add timeout to pdf buffering for slide
This commit is contained in:
parent
385363bb09
commit
3114e7ef32
@ -63,6 +63,12 @@ parser.script('decktape').options({
|
||||
default: 20000,
|
||||
help: 'Timeout in milliseconds to use when waiting for the slide deck page to load',
|
||||
},
|
||||
bufferTimeout: {
|
||||
full: 'buffer-timeout',
|
||||
metavar: '<ms>',
|
||||
default: 30000,
|
||||
help: 'Timeout in milliseconds to use when waiting for a slide to finish buffering (set to 0 to disable)',
|
||||
},
|
||||
screenshots : {
|
||||
default : false,
|
||||
flag : true,
|
||||
@ -387,6 +393,7 @@ async function exportSlide(plugin, page, pdf, context) {
|
||||
printBackground : true,
|
||||
pageRanges : '1',
|
||||
displayHeaderFooter : false,
|
||||
timeout : options.bufferTimeout,
|
||||
});
|
||||
await printSlide(pdf, await PDFDocument.load(buffer, { parseSpeed: ParseSpeeds.Fastest }), context);
|
||||
context.exportedSlides++;
|
||||
|
Loading…
Reference in New Issue
Block a user