PDF files attached to Project

PDF files attached to Project

5
NewbieNewbie
5

    May 10, 2012#1

    Hi,

    is there a way to add PDF files to a project but have them opened with Adobe Reader/external app? Development projects invariably rely on pdf specs etc. and keeping them organized is a pain. If I could hook them to my projects this would be a massive time saver.

    Ron

    6,686585
    Grand MasterGrand Master
    6,686585

      May 11, 2012#2

      It is possible to add PDF files to a project. But double clicking on a PDF file on Project tab results by default in opening the PDF file in hex edit mode in UE/UES. But you can workaround this behavior. Create a user tool via Advanced - Tool Configuration with following settings:

      Tab Command:
      Menu item name: Open PDF
      Command line: "full name of PDF reader" "%f"
      Working directory: let it empty
      Toolbar bitmap/icon (file path): let it empty or specify full name of a *.bmp or *.ico file containing a PDF icon

      Tab Options:
      Program Type: Windows program
      Save active file: unchecked
      Save all files first: unchecked

      Tab Output:
      Command output (DOS Commands): Append to existing
      Show DOS box: unchecked
      Capture output: unchecked
      Replace selected text with: No replace

      Next use Macro - Delete All to delete all currently loaded macros from RAM if there are any loaded. Then click on Macro - Edit Macro.

      In the macro editor click on button New Macro. Use as name CheckFileExt and uncheck the 2 macro properties below the name. Press OK. Back in the macro editor, replace the 3 commands by following code:

      IfExtIs "pdf"
      RunTool "Open PDF"
      EndIf


      Close the macro editor with button Close. The compare of "pdf" with file extension of the file is done not case-sensitive. The name of the user tool is case-sensitive.

      Use Macro - Save All to save the macro into a macro file with name OnFileLoad.mac.

      Open Macro - Set Macro for File Load/Save. Browse to macro file OnFileLoad.mac. Enter on Macro name to run on load the macro name CheckFileExt and enter 1 for # of times. Close the dialog with OK.

      Now when you open a PDF file in UE/UES, it is automatically opened in your PDF reader too. After switching back to UE/UES you have to press Ctrl+F4 to close the PDF file opened in hex edit mode.

      Do not use command CloseFile NoSave in the macro below command RunTool "Open PDF". This results frequently in crashes of UE/UES as I found out on testing what I have written here. It looks like the IDM developers has not taken into account that a macro executed on every file load closes the file as this is an action which is definitely not what can be expected for a macro on file load.


      You could add the PDF files for reading also as project tools by specifying on the command line of the project tool the PDF reader and as parameter the PDF file to open. For each PDF file of a project one project tool would be necessary for this approach.