Releases: fraserxu/electron-pdf
Releases · fraserxu/electron-pdf
v1.1.7
v1.1.6
v1.1.5
New Features
- #159 - For export jobs that are provided more than one resource, the job now resets the arguments to their original state before processing each resource.
- New Events added:
window.termination
emits an object withid
andlifespan
when a window is forcefully terminated. Theid
is the Electron.BrowserWindow id.job.render.loadurl
emits an object withurl
of the resource about to be loaded into the window and rendered.
Fixes
- #163 - If a window remains open past a certain threshold (default: 5 minutes) it is automatically closed. The following two env properties are now supported:
ELECTRONPDF_WINDOW_CLEANUP_INTERVAL
- in milliseconds, default 30 seconds; how often to check if open windows are hungELECTRONPDF_WINDOW_LIFE_THRESHOLD
- in milliseconds, default 5 minutes
Breaking Changes
- In versions prior to 1.1.5 if you provided a custom
pageSize
object for PDF rendering and set thelandscape
option it it, the job would flip the dimensions. This is undesirable, and now the landscape option will be ignored for any job that has the pageSize set.
1.1.1 Release
1.1.0 Release
Features
- #132 - new
observeReadyEvent
available on the Job API- Sample Usage:
job.observeReadyEvent( (detail) => {
return new Promise( (resolve,reject) => {
if( detail && detail.landscape ){
job.changeArgValue('landscape', true)
}
resolve()
})
})
1.0.0 Release
This is the first major release, from 1.0.0 forward semver will be followed.
Breaking Changes from 0.13
- Promises were introduced to better deal with markdown conversion, and now
PDFExporter .createJob
returns a promise instead of a job object. You should update your code accordingly,
for example:
exporter.createJob(source, target, options).then( job => {
job.on('job-complete', (r) => {
console.log('pdf files:', r.results)
// Process the PDF file(s) here
})
job.render()
})
Fixes
- Issue #129 - Markdown generation was
broken and PDF files had suffixes at the end of the filename