Create HTML that links 100 PDF files in a folder

I would like to publish my wife's recipes on our website, hoping she can then have access from the iPhone. I have about a 100 and really don't want to use iWeb to create 100 hyperlinks to a file, especially since she is continuously adding recipes.
Does anyone have a hint that could help generate such a page?

Does anyone have a hint that could help generate such a page?
Try AppleScript, it's easier than you think. Here is a short script:
-- start script
on run
    tell application "Finder"
        -- ask for folder contains PDFs
        set recipesFolder to choose folder with prompt "Please select the folder that contains recipe PDFs"
        -- get all files name
        set recipeFileNames to name of every file in recipesFolder whose name extension is "pdf"
        -- convert folder path to POSIX so can be used with Unix command
        set posixFolderPath to POSIX path of recipesFolder
    end tell
    set DOCTYPE to "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>My Recipes</title></head><body>"
    set closeTags to "</body></html>"
    -- write DOCTYPE
    do shell script "/bin/echo " & quoted form of DOCTYPE & " > " & quoted form of (posixFolderPath & "My Recipes.html")
    -- write page title
    do shell script "/bin/echo " & quoted form of "<br/>My Recipes<br/><br/>" & " >> " & quoted form of (posixFolderPath & "My Recipes.html")
    repeat with recipeFileName in recipeFileNames
        -- write recipes entries
        do shell script "/bin/echo '<li><a href=\"" & recipeFileName & "\">" & recipeFileName & "</a><br/>'" & " >> " & quoted form of (posixFolderPath & "My Recipes.html")
    end repeat
    -- write close tags
    do shell script "/bin/echo " & quoted form of closeTags & " >> " & quoted form of (posixFolderPath & "My Recipes.html")
end run
-- end script
Launch Script Editor, it can be found in /Application/AppleScript/ folder, copy& paste the script, I added comments above each line. You can run the script from Script Editor or save it as an application (File menu --> Save as..). Run the script, it'll do the following:
1) prompt you to locate the folder which contains the PDFs
2) make 'My Recipes.html' file in the same folder, that way you can upload the whole folder to you host.
Be sure you *do not* have any file with the name 'My Recipes.html'.
*If you're unsure of anything post back or make back up your important stuff (aka everthing you home folder).*
Now, the script generates a very raw page with a list of PDF files and links to them.
But potentially, AppleScript can generate html page with different catagories... such as: vegan, veggies or carnivore dishes... or French, Thai or Indonesian dishes... etc, etc... great for searching!
But, you need to add those key words in the PDF file's Spotlight Comments (in Finder select an item, then hit command+i, you'll see comments field at the top on info pane).
Spotlight Comments is meta data for Finder to find things (data base indexing).
Lastly, you can automate all these by using AppleScript's Folder Action

Similar Messages

  • Links to pdf files created in DW not working

    Linking a pdf file to an html page where the expectation is that clicking on the link will display the pdf file in the browser is common. A page that I created would not display my linked pdf files. Google searches suggest this is a common problem with perhaps a variety of causes.
    I found that the solution to my problem was to remove my "mark of the web" statement. When this <!-- saved from url=(0014)about:internet --> appeared on my web page, pdf links would not open in my browser; when I removed the "mark of the web," all worked fine.

    Personally I always download pdfs for offline reading.
    I do, too.
    As a courtesy, I always tell site visitors what they are clicking on and the file size.   If you want to force a download, you can zip the PDF file ahead of time, and post a link to the zip file.
    <a href="#">a PDF.zip (20kb)</a>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • How to create link for pdf file in discoverer worksheet

    Hi All,
    I would like to create a link for pdf file into discoverer report (worksheet).
    So that i can open linked pdf file using worksheet link.
    Can any one tell me about this?
    Thanks
    Ravi

    Hi,
    I think the best way to do this is to use a database directory so that you can access your pdf file as a bfile. Then create a mod_plsql procedure that sets the mime type and downloads the pdf file. You then create a calculation in the EUL then returns the URL to your mod_plsql procedure. You can then include this calculation as a hyperlink in your worksheet.
    It is not as difficult as it sounds. Please let me know if you need anymore details.
    Rod West

  • I've recently noticed that since the last upgrade any links to pdf files on websited no longer work. All I get is a blank white page or a blank black page when I click on these links. Can I fix this?

    I've recently noticed that since the last upgrade any links to pdf files on websited no longer work. All I get is a blank white page or a blank black page when I click on these links. Can I fix this?

    YAY!! I have Safe mode!!
    um, now what?

  • How to create a link to multiple links in pdf file

    how to create a link to multiple links or a button to multiple links in pdf file. this links is goto diferent pages, no web. sorry for my english.

    You can print to PDF from the Print Module .
    Do you have Adobe Acrobat?
    Otherwise install (free) Bullzip Free PDF printer.
    http://www.bullzip.com/

  • I have a main fillable form.  From this main form the user may need additional forms.  I want to create checkboxes that link to these additional forms.  This part I believe I know how to do (Properties/Actions/Open a File).  What I want to add is a javasc

    I have a main fillable form.  From this main form the user may need additional forms.  I want to create checkboxes that link to these additional forms.  This part I believe I know how to do (Properties/Actions/Open a File).  What I want to add is a javascript to the checkbox that when the new file (or form) opens some of the data (the repetitive data like name, date, etc.) from the main form is placed into the form opened where the same form fields exist.  Is this possible?

    Yes, but then it all has to be done using a script. You can't use the built-in Open A File command.

  • Linking to PDF files in HTMLResources.zip file with Windows 8.1 Viewer

    I have followed the instructions from 'DPS Tips' regarding creating a HTML Resources folder and compressing  the PDF files etc... It works on IOS Viewer but it doesn't work on Windows 8.1 Viewer.
    Is linking to PDF files in HTMLResources.zip file  support for Windows Viewer?
    Thanks

    Hi Bob,
    I do not understand, you're telling me that if I set my default browser to Chrome on Windows 8.1, the Viewer works with, or does the Indesign Folio Preview works?

  • RH9 TOC Links to PDF files are quirky

    I have a project that consists of TOC book links to PDF files. In RH6 I always just manually popped them into the \!SSL!\WebHelp folder and linked to them from TOC books because importing them into the project took days. Or 20 minutes at least. Some of these files were 300 pages, so I manually loaded the smaller files too, to maintain procedural consistency. Either way, manually loading them is fastest so it just makes sense.
    I'm doing this in RH9, and it works just fine in the live project. The problem is in Robohelp. No sooner do I close the project and reopen it, but all the books have question marks with crosses through them as if they have broken links. They do not.  The links are STILL fine, and when I compile the project they open, just as they should. In RH6 this wasn't remotely an issue.
    Is this a bug? I went back and redid the links twice before realizing it wasn't me, it was Robohelp. So whenever I open a project that has a TOC book link to an outside file, like a .pdf, or .ppt, or xls or whatever, is this going to happen? I lose visual clues for the broken links because they ALL appear to be broken?

    Hi Maureen
    I used to encounter this all the time with RoboHelp X5. And it coaxed me into developing what I feel is an interesting and more reliable approach.
    Have you noticed that even on a fast intranet it seems to take an inordinate amount of time to open a PDF? I mean, with most of your topics, the user clicks and nearly instantly something happens. The topic generally loads right up in the topic pane. But a PDF, Word document or other file seems to take eons to load. Well, comparatively.
    So I developed this thing I referred to as a "docfetch". Basically, I created regular RoboHelp topics. Linked those topics to the books pages or whatever. Then configured those topics to redirect to the PDF, Word document or other.
    The expected benefit was that because I was now actually linking to topics in the project, those funky mysteriously broken links in the TOC disappeared. The unexpected side benefit was that users then saw an immediate response to clicking the link. I configured each of these topics to present some verbiage to the effect that they should please wait as the document was being opened. This put a stop to users reporting that things were "broken" as they then saw an immediate response.
    The code you need will be placed in the HTML of the topic. Just insert it somewhere in the Head area.
    <meta HTTP-EQUIV=refresh CONTENT="3;URL=File_Name.pdf">
    Of course you will want to adjust it to suit your own needs. For example, the line above is configured for a 3 second delay. You may want a shorter (or longer) delay. And you would adjust File_Name.pdf to reflect the path and file name of the PDF (or other file) you are linking to.
    Hope this helps... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Linking a PDF file to Word Press

    Hello,
    I really need some support in how to link a pdf file
    (Acrobat.com) that I've already created to my blogsite in Word
    Press. Can anybody PLEASE guide me in understanding the steps? I've
    already downloaded the file and saved it on my computer. Now I'm
    trying to copy the HTML code or access the URL, but neither seems
    to work when I click on buttons. What am I supposed to do?
    Any help and support would be appreciated!
    Thanks so much -
    Dorit

    Hello Dorit,
    Thank you for your post. I'll be glad to try to help you with
    sharing a .pdf file via your blog.
    Start at Acrobat.com and choose My Files. Next, click the
    file you want to embed in your blog. On the right side of the page,
    choose Copy Embed Code. The necessary HTML code to embed the
    preview is
    automatically copied onto the clipboard. I can understand
    that this would be confusing as there is no indication after you
    click the buttons that anything happened... but the code is now on
    your clipboard. Open the HTML file - your WordPress blog - and
    paste (CTRL+V on Windows machines) the code into the file.
    Hope this helps! Please let me know if you run into any
    trouble with this process.
    Kind Regards,
    Michelle

  • Links to PDF files with relative paths from a Captivate 4 project

    I'm creating a presentation in Captivate 4 (I'm making an exe file) with some links to PDF files; the links are buttons with the 'open URL or file' set. The presentation will be distributed in CDs and obviously the links will not work for they point to an absolute path in my PC. Is there another way to display external files? thanks

    "file:\file folder\filename" is not a relative path.  It's still an absolute path because you're specifying the path all the way from the root drive, whether you used a drive letter or not.
    A relative path shows where to find the other file in relation to the file that is calling it.
    Relative paths look like this:
    myDoc.doc (if the file is in the same directory as the file calling it)
    folderName/myDoc.doc (if the file is inside a folder in the same directory as the file calling it)
    ../myDoc.doc (if the file is located in the parent directory above the file that is calling it)
    ../../myDoc.doc (if the file is located two levels above the file that is calling it)
    etc
    Here's a tutorial that explains it better: http://www.communitymx.com/content/article.cfm?cid=230ad

  • Insert/link a PDF file in MM02 transaction.

    hi
    I would like to know if it is possible to insert/link a PDF file in MM02 transaction.
    Please let me now something.

    Hi Vale,
      I think that it would be possible to insert the pdf file to the MM02 transaction: Please try following the below steps:
    1) Follow the path : MM02 -> System -> Service for Object -> Create -> Create External Document (URL).
    2) You will get a popup saying "Create a link for Web page".
    3) Fill in the required details as per the requirement. Give the appropriate title, Location for the file to be attached ( Path ),
    4) Click on Execute button, SAVE.
    Note: Please remember to provide the file extension like .pdf while attaching the file. Else the file wont be displayed when you try to display the attached file.
    Thanks
    Pawan

  • Links in PDF files will be opened in a new browser window?

    Hi all,
    I'm opening PDF files in a browser. I'd really like links in PDF files will be opened in a new window as html. My browsers was configured to allow opening new pages in a new window (FireFox: Tools\Options\Tabs\ New pages should be opened in: New window ;IE 7: Tools\Internet Options\Tabs Settings\Open links from another programs in: A new window)
    Please tell me any additional step I have to done
    Thanks much
    Luong To

    Thank you Bob! We will try out tests again today.

  • Can we put a link to PDf file in MAM application ?

    Hi ALL,
    can we put a link to PDf file in MAM application ?
    Regards,
    Vipin

    Hi JO ..  satya  .. and everbdy,
    Apologies for not updating the Forum. I was travelling soemwhere , so couldnt get connected to internet.
    Regarding Topic,
    yes, you guys are correct , i dont have a PDF Viewer in my pocket pc , so PDf files wont open .
    So, i started testing -- opening pwd files in Pocket pc via MAM. but it is also not happening:(
    JO , i didnt get any kind of error when i tried to open to document via < href > in MAM .
    i also checked that document might have opened but it is not in Foreground . So, i went to memory and checked the opened programs/files . It wasnt there.
    Regards,
    Vipin

  • Use PHP to convert html page to a pdf file for email

    I want to use my php scripts to send an email (with a pdf attachment) of the web page that is being viewed.
    My problem I have no way to convert the html page to a pdf file without the end user being prompted to (1) naming the file (2) saving it
    Is there a program or a way i can save the html as "auto_name.pdf" file on the server without user input?
    I have Adobe Acrobat 6.0 Professional on server

    There are lots of good Html to Pdf conversion tools for developers, both free and paid. I'd suggest to take a look at PD4ML Html to Pdf converter - it has lots of features (CSS support, page layout presets, etc.) and can be obtained for free for non commercial usage. There is also a topic at Stackoverflow with a list of such converters.

  • How do I convert a document created in Pages to a pdf file?

    How do I convert a document created in Pages to a pdf file?

    The same way that you would do it for any application, print menu or export menu.

Maybe you are looking for