Mystery solved. The convert command is not available on my system. Two things occur to me.
First, the installation/use documentation should mention that convert is needed. The last time I tried to install it, I was unsuccessful. Second, the error recovery in the code "system 'convert', file.path, pdf.path" could at least display the error and stop. Craig > On Jan 7, 2016, at 5:48 AM, Sam Ruby <ru...@intertwingly.net> wrote: > > On Wed, Jan 6, 2016 at 9:26 PM, Craig L Russell > <craig.russ...@oracle.com> wrote: >> When I drag/drop, these are the kinds of errors I get on the server console: >> >> Error: Unable to find file. >> Error: Failed to open PDF file: >> >> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/image003.jpg20160106-89526-neygnb.pdf >> Error: Unable to find file. >> Error: Failed to open PDF file: >> >> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/image005.png20160106-89526-17qyeu5.pdf >> Errors encountered. No output created. >> Done. Input errors, so no output created. >> 127.0.0.1 - - [06/Jan/2016:18:23:36 -0800] "POST /actions/drop HTTP/1.1" 200 >> 246 2.1588 >> 127.0.0.1 - - [06/Jan/2016:18:23:37 -0800] "GET >> /201601/16c8ec8707/image003.pdf HTTP/1.1" 200 - 0.4341 >> >> Error: Unable to find file. >> Error: Failed to open PDF file: >> >> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/image001.jpg20160106-89526-8c4ji9.pdf >> Error: Unable to find file. >> Error: Failed to open PDF file: >> >> /var/folders/mx/t44d3_bs437dpnywzk_mwl_0002msd/T/image002.jpg20160106-89526-8e5lqj.pdf >> Errors encountered. No output created. >> Done. Input errors, so no output created. > > Very weird. The messages clearly are coming from pdftk. The file > that can't be found is a temporary file. > > Previously you said drag and drop worked when source and target were > pdfs, but not when they were jpegs. > > What the code in question does is first grab the source and targets > "as_pdf", and then pass both of those files to pdftk for > concatenation. > > Here's the logic for "as_pdf": > > https://github.com/apache/whimsy/blob/secmail/www/secmail/models/attachment.rb#L37 > > It either is going to return "file" or "pdf", and in either case, that > variable is set using Tempfile.new. "file" contains the body of the > original attachment. If that file is an image type, a second > temporary file is created ("pdf"), and both are passed to > ImageMagick's convert as source and target respectively. > > - Sam Ruby Craig L Russell Architect, Oracle http://db.apache.org/jdo 408 276-5638 mailto:craig.russ...@oracle.com P.S. A good JDO? O, Gasp!