Results 1 to 5 of 5

Thread: Using Webarchive to PDF outside EagleFiler

  1. #1
    New Member
    Join Date
    Jun 2009
    Posts
    2

    Default Using Webarchive to PDF outside EagleFiler

    Hi,

    starting from the AppleScript you provided, I tried to use the functionality to convert webarchives outside EagleFiler to PDFs. Essentially I am calling the cl tool like this:

    do shell script "/Applications/EagleFiler/EagleFiler.app/Contents/Frameworks/WashFramework.framework/Resources/efweb2pdf '/Users/myusername/Desktop/EagleFilerAppleScripts.webarchive' '/Users/myusername/Desktop/EagleFilerAppleScripts.pdf' id"

    This works, i.e. the PDF is created, but after that the cl tool crashes.

    Thread 0 Crashed:
    0 com.apple.CoreFoundation 0x9391bd38 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 0
    1 libobjc.A.dylib 0x90a134e8 objc_exception_throw + 68
    2 com.apple.CoreFoundation 0x9391bc9c +[NSException raise:format:arguments:] + 136
    3 com.apple.CoreFoundation 0x9391bcd4 +[NSException raise:format:] + 52
    4 com.apple.Foundation 0x94941b3c -[NSCFDictionary setObject:forKey:] + 268
    5 efweb2pdf 0x000035a8 -[PDFLoader savePDF:] + 1180
    6 efweb2pdf 0x000030e0 main + 356
    7 efweb2pdf 0x00002a34 _start + 744
    8 efweb2pdf 0x00002744 start + 44

    Judging from the additional argument id, there seems to be a side effect, i.e. the tool tries to hand data to EagleFiler or the database or the like, which it does not have. I am not sure though, since your original script does not seem to hand over data to the tool except the source and target paths.

    Is there a way to call the tool just for conversion, i.e. without any side effects, or could you change it to make this possible?

    BTW, I guess you'd receive a big "Hooray!" if you made this available as a separate command line tool to be included in AppleScripts or Automator Workflows. There are a lot of people out there who would like to get hold of something like this.
    Last edited by Michael Tsai; 06-13-2009 at 05:47 PM. Reason: Added link.

  2. #2

    Default

    It looks like your script should work (and it does, on my Mac). The “id” is included with notifications that the tool posts for EagleFiler, but it’s OK not to listen for them. There may be additional information in the Console log. After it saves the PDF, it adjusts the PDF metadata, and it looks like that’s where the problem is. My guess would be that somehow the page title is nil.

  3. #3
    New Member
    Join Date
    Jun 2009
    Posts
    2

    Default

    Quote Originally Posted by Michael Tsai View Post
    It looks like your script should work (and it does, on my Mac). The “id” is included with notifications that the tool posts for EagleFiler, but it’s OK not to listen for them. There may be additional information in the Console log. After it saves the PDF, it adjusts the PDF metadata, and it looks like that’s where the problem is. My guess would be that somehow the page title is nil.
    Yes, you were close ;-)

    13.06.09 17:04:11 efweb2pdf[15413] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: Author)'

    Anything I could do about this?

  4. #4

    Default

    Quote Originally Posted by johnboy View Post
    Anything I could do about this?
    You should be able to safely ignore the error. I’ll add a workaround to the next version of EagleFiler.

  5. #5

    Default

    Quote Originally Posted by johnboy View Post
    do shell script "/Applications/EagleFiler/EagleFiler.app/Contents/Frameworks/WashFramework.framework/Resources/efweb2pdf '/Users/myusername/Desktop/EagleFilerAppleScripts.webarchive' '/Users/myusername/Desktop/EagleFilerAppleScripts.pdf' id"

    This works, i.e. the PDF is created, but after that the cl tool crashes.
    EagleFiler 1.4.7 fixes this crashing bug.

Similar Threads

  1. Replies: 9
    Last Post: 11-23-2010, 06:34 PM
  2. Replies: 8
    Last Post: 02-11-2009, 01:18 PM
  3. Webarchive to PDF
    By jwyoung5 in forum EagleFiler
    Replies: 5
    Last Post: 10-29-2008, 03:38 PM
  4. Eaglefiler as default .pdf viewer
    By patnpm in forum EagleFiler
    Replies: 4
    Last Post: 07-20-2007, 10:45 AM
  5. New user with EagleFiler 1.2 tag and pdf problems.
    By globetrotterdk in forum EagleFiler
    Replies: 3
    Last Post: 06-08-2007, 03:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •