Image from File -- not getting updated?

I have a PDF file outside Scrivener. I show this in my document using “Edit/Insert/Image from File”.

When I change the PDF file I still see the old version in Scrivener.

Am I doing something wrong?

Thanks … Sophie

When you insert media into Scrivener, it becomes a part of the project. A duplicate of the PDF is copied into the project folder; in the case of RTF embedding, it becomes a part of the RTFD folder. Thus the original copy outside of Scrivener no longer has anything to do with the project version. If you want to maintain externally editable media links, you’ll have to use the References pane, which simply creates links to existing files. If the original no longer matters, then you should edit the file from within Scrivener. With media, this means right-clicking and choosing to open in an external editor. Changes made will be saved back to the media that is embedded within the project. You will have to toggle the Binder selection for these changes to show up, though.

Oh yes, this will not work for media embedded directly into an RTF. You’ll want to store these in the Binder. As far as I can tell, the only way to edit RTF embedded media is to open the Scrivener project bundle, locate the RTFD file, open that bundle, and then double-click on the media file from there. Such should be a safe thing to do in Scrivener, but that is a lot of hassle for something that could be simply done by storing it in the Binder instead.

I will have a large number of Omnigraffle diagrams, edited quite frequently as the book progresses. From each one I export a PDF version and include that in Scrivener so I can see them as I work e.g. in the main editor view, or full-screen view. I also include the MMD codes ![] etc. so they get included in generated PDF.

Any advice on how I should do this to minimize overhead?

Many thanks … Sophie

I understand where you are coming from with this, as I have a very similar process too (though I don’t really do anything with the exports except visually reference them, and thus use PNG instead of PDF since I don’t need the text). In my own experience of usage, I have trimmed down how much I put into Scrivener as time goes by. I used to dump everything related to the project into the Binder because that is what seemed most logical. Keep the project all together, and keep resources available in splits and so forth. However as time went by I found myself going back to my “use lots of programs at once” way of doing things, and now I hardly store any ancillary media (I still put text references into the project) in the project itself. Naturally, all figures which will be inserted into the book will be stored and linked to from within the Draft. But references to myself, I keep in the source application. I just leave OmniGraffle open off to the side and use Canvases and Layers to keep track of all the specific flow-charts and diagrams. Working this way is somewhat second nature for me, and when the source application is the reference source, you never have to worry about synchronisation issues.

One way to potentially automate this to a degree would be to write a shell script or something that takes exported PDF files and moves them to the appropriate location within the project file. As I said in the other message, this should be safe as embedded media is not externally tracked by Scrivener. If a word changes in a PDF I don’t think it will mess up Scrivener’s search index. I could be entirely wrong on this, and such mucking about in the project structure should definitely be done with solid back-ups in place. But a script that knows A) the name of the exported PDF from OG and B) the name of the associated embedded file in the Scriv project should be able to test for the presence of that file and then move it appropriately.

Does “~/temp/integrate/character_timeline.pdf” exist? I yes, move as “~/Documents/WritingProject.scrivproj/43.rtfd/character_timeline.pdf”.

You’ll have to do a little detective work to locate the correct RTFD number the first time, but these do not get shifted around once they exist in the project, so once the script is set up, it should work without thinking about it from that point on. To find a file, I recommend putting an unlikely string of words into the file you wish to find, wait for Scrivener to auto-save, and then execute grep -R unlikelystring *.

If RTFD embedded PDFs do get indexed into Scrivener’s project search function, then this would probably not be a safe thing to do. But, its the first thing that popped into my head. As with using lots of applications at once instead of one or two, automating my world with shell scripts or Ruby is practically second nature.

Thanks so much for the help! I will try to absorb these insights & incorporate into my workflow.

  • Sophie

Amber … Just to double check a couple of things about your setup:

  • OmniG files stored outside scrivener (both source and PDF)
  • Include PDF versions in Scriv by Insert/Image from File
  • (You tend to) use single OmniG file, separating canvases and layers for each book diagram

Possible automation (adding a bit to yours):

  • check time stamps of OmniG source vs. “corresponding” rtfd-embedded file in .scrivproj
  • if out of date, re-generate new PDF and replace the PDF within .scrivproj
  • keep PDF file names unique within the .scrivproj (less detective work needed)

I will check on Keith about safety of doing this.

Thanks again … Sophie

Just to clarify, I have never tried to do automatic media replacement like this, it was just the first thing that popped into my head. We are lucky that Apple decided to handle embeds like directories to scripts (other than the fact that it makes our media rich RTFs completely incompatible with the rest of the world!)

But yes, that set-up sounds good, assuming the actual injection process does not damage the scriv bundle in the end. I would probably handle things on a simple check-for-presence-and-move basis instead of date stamping, but that is largely because I do not trust Mac date stamps. I’ve seen them do weird things too many times. It’s probably safe in this scenario though since I don’t think there is any way for the embedded PDF to get modified—at least through the Scrivener interface. You might want to test with an RTFD though and make sure that editing and saving an RTFD does not modify embedded files. Otherwise you might run into issues since Scrivener is so zealous about keeping your data saved instead of holding the changes in memory.

Using unique names is a good idea, since it appears the text engine doesn’t rename unless two identically named files end up in the same RTFD.