Skip to content

Edit PDFs on your own device: text, signatures, form filling, highlights, white-out, merge, split, reorder and rotate pages. In the browser or as a Windows app. English and Turkish.

457 B
Raw Blame
// The only bridge between the web app and the desktop: receive files opened
// with the program, and save through the system dialog.
'use strict';

const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('tlkDesktop', {
  onOpen: (fn) => ipcRenderer.on('open-file', (_e, file) => fn({ name: file.name, bytes: new Uint8Array(file.bytes) })),
  save: (name, bytes) => ipcRenderer.invoke('save-file', { name, bytes })
});