Close

cut, copy, paste operations

A project log for PDF Merge

Overlay synchronized spreadsheet calculations on PDF forms

lion-mclionheadlion mclionhead 11/08/2023 at 03:270 Comments

The mane problem with clipboard operations is what goog sheets copies can either be a link or plain text.  What pdfmerge needs to copy is the relative X, Y, font size, the text, the link, multiple text objects.  Thus all the paste operations need to handle 2 cases: when the clipboard contains a JSON of text objects & when it contains plain text.  A paste operation for a new text object needs to create all the copied objects in the same relative positions.  A paste operation overwriting a single text area needs to write the 1st text in the clipboard.

Thus we have ways of copying multiple text objects with the same relative positions to other positions & pages.

Replacing just the text in an existing object with a copy of another object.

Replacing the text in an existing text object with copied plain text.

Pasting plain text as a new text object.

Of course links to goog sheet cells can still be pasted as new text objects or pasted over existing text objects.

It can't paste a range of goog sheet cells.  That would entail a whole suite of formatting commands to get the right line spacing.

Discussions