3 Replies Latest reply on Dec 1, 2009 3:02 AM by markerline

    How to change the file name of pdf file in html page?

    Prakash Philip

      Hi,
      Actually my requirement is to upload 50 PDF files containing javascript in each file into flex page with the help of one html page.

      i did the the javascript part by using batch processing.

      now i want to call those pdf files one after another without changing the file name in html page

      the code written in html page is

      <html>
          <body>
              <object id="PDFObj"
                      data="http:\\localhost\pdf\20090807 - Batch 630.pdf"
                      type="application/pdf"
                      width="100%"
                      height="100%">
              </object>
              </body>
      </html>

      So every time i have to change that file name to acess another file.

      Is there is any other way to sort this problem????

      Plz anyone help me to sort out this problem with some code or some example.

        • 1. Re: How to change the file name of pdf file in html page?
          markerline Level 4

          I once had a similar task for creating a webpage that I only use on my computer--a webpage that accesses PDF's and SWF's font previews from a list of fonts as "a href's".  What you must do is utilize the power of the command line, whether on a Mac on a PC or on Linux, Linux being the most powerful (although Mac IS Unix).  You must utilize variables, variable replacement, and then a command to print out the results of a "for" or "while" loop to a text file which will be your HTML file with each individual link automatically built into the HTML code.  You will have a list of 50 links.  If you are simply looking for a GOOGLE type functionality where you click on "Next" and "Previous" you will have to dig deeper into variable replacement--this I don't know how to do yet but there are books for command-line shell interpreters.  One shell interpreter is called "bash" (born-again shell) and there is a book on the market which gives a detailed example of how to replace variables in a shell script.  Again, I don't know how it works.  I will try to learn this at a later time when I am more seasoned with the basics of shell scripting.

          • 2. Re: How to change the file name of pdf file in html page?
            markerline Level 4

            I should say the project I worked on far exceeded the number of pages, 50, that you have in your project.

            • 3. Re: How to change the file name of pdf file in html page?
              markerline Level 4

              a hint:

               

              find a command that will output a directory list of your files in the command line that you can then output to a file.  You will need to use variables to put text before and after the filenames (i.e. the HTML coding).