swap annotations and notes to a new copy of the underlying PDF possible?

edited 4 days ago
Hi,
while working with a PDF in zotero, I discoverd that a bunch of pages were scanned incompletly. I then scanned it again and made sure the new PDF has the same page structure.

Yes, I could split my annotations between the two copies of the article. But I would preferre to swap the incomplete scann with the newone without losing all the annotations.

So is there a way to *insert* (or whatever you would call it) the new scan in lieu of the old one with the old annotations now being attached to the new PDF?

Thanks
  • You can just test this out (keeping the old PDF as a copy so you can swap it back in). I'd expect it to not work well because annotations are anchored by location and obviously once you insert new pages, that gets changed.
  • The PDF are both appended to their entry. So how, technically, would I do that. Where do I find them. Yes, most likely in (linux) ~/zotero/storage/* . But I have there about 100 entries with cryptic names. Is there an easy way to find the items name in zotero? And would I simply interchange their names?
  • right-click --> show file shows you the file in your file manager of choice
  • Ok, thanks, I now found them both. But to me it seems the annotations are NOT stored in the document folder, but elsewhere.
    So how can I detach the old PDF from and slip the new PDF under the old annotitions (whoms storage place I not even know)? By doing what?
  • I'm not sure what your question is? You just replace the old PDF with the new one.
  • i.e. rename the existing file with something like -old, copy in the new file and give it the same filename.
  • edited 3 days ago
    Thanks to both of you.

    It worked, and once I understood the relevant part of zotero's internal structure it was easy to replace the old file with the newone. The only hurdle was the fact that the new scan was geometrically different from the first ... which initially did not work due to the fact that annotations are linked to its document based on its geometry.

    With the help of AI I created a py-script which adapts the mediabox of a PDF while preserving the textlayer.

    I could insert it in zotero and slip it in the respective folder under the name of the old file. All annotations are in the right place ;-) .

    A new scan would have been way easier und less time consuming ... but I wanted to know :)

    PS: If someone is interested in the script, just let me know ... I'll post a link.
  • edited 2 days ago
    For Zotero developers, I would be interested in the original request of this discussion, at least for the next issue.

    Once I linked a pdf to an item, I may change the attachment title by hand, and I may change the pdf filename in function on the item metadata. However, if I want to rename the pdf file, to my knowledge I must delete the link and re-link again with the new pdf filename, lossing then all the attachment annotations.

    Would there be some way to keep the annotations or at least renaming by hand a file attachment without having to do the described process?

    Thanks!
  • @iagogv Renaming by hand through Zotero and not through the file manager works for me.
  • First: The purpose of my action was *not* renaming but *replace* a partially bad scan with a goodone without losing the annotations. Renaming was a neccessary part of the exchange. And this applies to a file which was *appended*. (There are three other ways to connect a file to an entry!)

    The whole file geometry part has nothing to do with all of this.

    But I really would like to know why appended files all show as "PDF" and not by their name in the middle panel? And there is no way to rename them. Why can't they be shown with their actual name (as each following file is)?
  • edited 2 days ago
    thanks for the info!

    Still, if I could choose, I would prefer to have the filename instead of "PDF" or the like. The parent item and its child items are not the same, none of their names are a redundancy to their parent. It's like index card and book. Both carry the book title.

    I can (and most likely have to) live with it. But do I like it, no; do I consider it neccessary or helpfull, not at all;
  • edited 2 days ago
    And there is no way to rename them.
    You absolutely can rename the attachment by selecting it and then clicking on the attachment title in the right-hand panel.
    Still, if I could choose, I would prefer to have the filename instead of "PDF" or the like
    dstillman has said they're planning on adding an option to show the filename instead of the attachment title in the middle panel, but no ETA on this, I don't think it's a huge priority in development.

    Edit: @iagogv -- in case that's not clear from poettli's post, that's also how you'd change the filename of the attachment, except you click into the Filename, no the Title field and just edit that.
Sign In or Register to comment.