opening a client application from a server?

Discussion in 'Perl Misc' started by ccc31807, May 7, 2009.

  1. ccc31807

    ccc31807 Guest

    This relates to the post I made last week about working with
    WordProcessingML. That part turned out to be easy -- as easy as
    writing a CGI script and dynamically updating the HTML from a
    database. WordProcessingML is no different from XHTML and does pretty
    good at creating Word documents.

    Here's the question: The client has a requirement that the users
    create a Word document on a web enabled app and open it in the client
    browser. I can create the word document and open it on the server
    (using this command -- exec("c:/Program Files/Microsoft Office/
    OFFICE12/winword.exe", "c:/TEST1.DOC")) but I can't get Word to open
    the file on the client. I can write the .doc file to a directory and
    give the client to the directory over the internet, but that doesn't
    meet the requirement.

    I've tried creating hyperlink like <a href="test.doc">Here is your
    Word document</a> but that doesn't work either.

    I'm about to tell my client that I can't meet this requirement ...
    I've been trying since Monday and have about given up. Any ideas?

    Thanks, CC.
     
    ccc31807, May 7, 2009
    #1
    1. Advertising

  2. ccc31807 <> wrote:

    > Here's the question: The client has a requirement that the users
    > create a Word document on a web enabled app and open it in the client
    > browser. I can create the word document and open it on the server
    > (using this command -- exec("c:/Program Files/Microsoft Office/
    > OFFICE12/winword.exe", "c:/TEST1.DOC")) but I can't get Word to open
    > the file on the client.



    If I'm understanding you correctly, then you do not have a Perl problem.

    If you send the appropriate (application/word?) Content-Type, then a
    client on Windows, with Word installed, should be able to open it
    no problem.


    --
    Tad McClellan
    email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
     
    Tad J McClellan, May 7, 2009
    #2
    1. Advertising

  3. ccc31807

    smallpond Guest

    On May 7, 4:00 pm, Tad J McClellan <> wrote:
    > ccc31807 <> wrote:
    > > Here's the question: The client has a requirement that the users
    > > create a Word document on a web enabled app and open it in the client
    > > browser. I can create the word document and open it on the server
    > > (using this command -- exec("c:/Program Files/Microsoft Office/
    > > OFFICE12/winword.exe", "c:/TEST1.DOC")) but I can't get Word to open
    > > the file on the client.

    >
    > If I'm understanding you correctly, then you do not have a Perl problem.
    >
    > If you send the appropriate (application/word?) Content-Type, then a
    > client on Windows, with Word installed, should be able to open it
    > no problem.
    >


    Here's an example showing the headers which IE opens fine:

    wget -S http://www.ahrq.gov/QUAL/diabqguide.doc
    --17:36:37-- http://www.ahrq.gov/QUAL/diabqguide.doc
    Resolving www.ahrq.gov... 77.67.91.107
    Connecting to www.ahrq.gov|77.67.91.107|:80... connected.
    HTTP request sent, awaiting response...
    HTTP/1.0 200 OK
    Content-Length: 1694208
    Content-Type: application/msword
    Last-Modified: Fri, 30 May 2008 17:20:13 GMT
    Accept-Ranges: bytes
    ETag: "10bb8b6b79c2c81:6b7"
    Server: Microsoft-IIS/6.0
    p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"
    X-Powered-By: ASP.NET
    Date: Thu, 07 May 2009 21:36:37 GMT
    Connection: keep-alive
    Length: 1694208 (1.6M) [application/msword]
    Saving to: `diabqguide.doc.1'
     
    smallpond, May 7, 2009
    #3
  4. ccc31807

    ccc31807 Guest

    On May 7, 4:00 pm, Tad J McClellan <> wrote:
    >
    > If I'm understanding you correctly, then you do not have a Perl problem.


    It's very possible that it's an Apache problem, but maybe not. I can
    invoke Word and open the .doc file in an ordinary Perl script, like
    this: eval("c:/.../winword.exe" "c:/.../wordprocessingml.doc")

    However, it doesn't work in a CGI script, and frankly I don't know
    enough about Windows to troubleshoot it. I'm meeting with my client
    tomorrow morning, and either I'll get it to work before then or I'll
    suggest some alternatives.

    > If you send the appropriate (application/word?) Content-Type, then a
    > client on Windows, with Word installed, should be able to open it
    > no problem.


    My job entails producing a lot of reports in various formats (csv,
    pdf, txt, etc) and I have a lot of experience giving users access to
    these formats. Producing the Word document with WPML was easy, but now
    I'm stuck with producing files that I can't seen to open. Ignorance
    isn't bliss!

    CC
     
    ccc31807, May 8, 2009
    #4
  5. ccc31807 <> wrote:
    >On May 7, 4:00 pm, Tad J McClellan <> wrote:
    >>
    >> If I'm understanding you correctly, then you do not have a Perl problem.

    >
    >It's very possible that it's an Apache problem, but maybe not.


    No, it's not an Apache problem, either. It's an HTTP problem.

    >I can
    >invoke Word and open the .doc file in an ordinary Perl script, like
    >this: eval("c:/.../winword.exe" "c:/.../wordprocessingml.doc")
    >
    >However, it doesn't work in a CGI script, and frankly I don't know


    Oh yes, it does work in a CGI script. Given proper permissions the
    script will/should happily invoke Word ---- on the server! Most likely
    not what you had in mind.

    >enough about Windows to troubleshoot it.


    Has nothing to do with Windows but everything with how HTTP works.

    >I'm meeting with my client
    >tomorrow morning, and either I'll get it to work before then or I'll
    >suggest some alternatives.
    >
    >> If you send the appropriate (application/word?) Content-Type, then a
    >> client on Windows, with Word installed, should be able to open it
    >> no problem.

    >
    >My job entails producing a lot of reports in various formats (csv,
    >pdf, txt, etc) and I have a lot of experience giving users access to
    >these formats. Producing the Word document with WPML was easy, but now
    >I'm stuck with producing files that I can't seen to open. Ignorance
    >isn't bliss!


    So, what Content-Type did you try?

    jue
     
    Jürgen Exner, May 8, 2009
    #5
  6. ccc31807

    ccc31807 Guest

    jue, thanks for your comments.

    On May 7, 8:46 pm, Jürgen Exner <> wrote:
    > No, it's not an Apache problem, either. It's an HTTP problem.


    This is what I can't understand. I import a big glob of data from a
    database into my script, generate many csv files, or txt files, or pdf
    files, or xml file, etc., and generate links. The browsers, IE but FF
    as well will happily open a csv file in Excel (assuming that the
    client is a Windows machine with Office installed), open a pdf file in
    Acrobat, open a txt file in the browser window, and so on.

    I ASSUMED(!) that a doc file would work the same way, that is, open
    natively in Word on a machine running Office. It doesn't, and I don't
    know enough to understand why it doesn't.

    > Oh yes, it does work in a CGI script. Given proper permissions the
    > script will/should happily invoke Word ---- on the server! Most likely
    > not what you had in mind.


    Right. What I had in mind was writing an OUTFILE to a directory and
    creating a link to the file. I frequently create HTML files
    dynamically from a script (similar to what I suppose eBay, Amazon,
    Google, and all the rest do) and the links work flawlessly. Invoking
    Word on the server is useless, you are right about that.

    > Has nothing to do with Windows but everything with how HTTP works.
    > So, what Content-Type did you try?


    I didn't. When I produce csv, pdf, etc., I don't specify any Content-
    Type. I just create the files and they open the way they should. XML
    is very picky, and Word demands a PERFECT(!) XML file to open,
    otherwise it throws an error, and I suspect that an attempt to
    incorporate a Content-Type element in the XML would create a problem.
    Besides, I don't understand why a Content-Type is necessary.

    I don't mind admitting ignorance, but I'm not stupid, and I do learn
    -- slowly but surely.

    CC
     
    ccc31807, May 8, 2009
    #6
  7. ccc31807 <> wrote in
    news::

    > On May 7, 4:00 pm, Tad J McClellan <> wrote:
    >>
    >> If I'm understanding you correctly, then you do not have a Perl
    >> problem.

    >
    > It's very possible that it's an Apache problem, but maybe not. I can
    > invoke Word and open the .doc file in an ordinary Perl script, like
    > this: eval("c:/.../winword.exe" "c:/.../wordprocessingml.doc")


    What is this new wave of people thinking that a web server can invoke a
    specific application on a client computer?

    I am simply blown by this failure to grasp the most basic elements of
    how things fit together.

    > However, it doesn't work in a CGI script, and frankly I don't know
    > enough about Windows to troubleshoot it.


    You do not need to know anything about Windows.

    >> If you send the appropriate (application/word?) Content-Type, then a
    >> client on Windows, with Word installed, should be able to open it
    >> no problem.

    >
    > My job entails producing a lot of reports in various formats (csv,
    > pdf, txt, etc) and I have a lot of experience giving users access to
    > these formats.


    How is a Word document different from any of those formats? Tad has just
    told you how to solve your problem.

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, May 8, 2009
    #7
  8. "A. Sinan Unur" <> wrote in
    news:Xns9C04DBD74FE17asu1cornelledu@127.0.0.1:

    > I am simply blown by this failure ...

    ^
    away

    *Sigh*

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, May 8, 2009
    #8
  9. ccc31807 <> wrote:
    >jue, thanks for your comments.
    >
    >On May 7, 8:46 pm, Jürgen Exner <> wrote:
    >> No, it's not an Apache problem, either. It's an HTTP problem.

    >
    >This is what I can't understand. I import a big glob of data from a
    >database into my script, generate many csv files, or txt files, or pdf
    >files, or xml file, etc., and generate links. The browsers, IE but FF
    >as well will happily open a csv file in Excel (assuming that the
    >client is a Windows machine with Office installed), open a pdf file in
    >Acrobat, open a txt file in the browser window, and so on.


    Which IMNSHO is a major mistake of the browser. The browser should never
    assume a file type based on the last 3 characters of a file name.

    >I ASSUMED(!) that a doc file would work the same way, that is, open
    >natively in Word on a machine running Office. It doesn't, and I don't
    >know enough to understand why it doesn't.
    >
    >> Has nothing to do with Windows but everything with how HTTP works.
    >> So, what Content-Type did you try?

    >
    >I didn't. When I produce csv, pdf, etc., I don't specify any Content-
    >Type. I just create the files and they open the way they should. XML
    >is very picky, and Word demands a PERFECT(!) XML file to open,
    >otherwise it throws an error, and I suspect that an attempt to
    >incorporate a Content-Type element in the XML would create a problem.


    You don't incorporate it into the XML, you set the Content-Type in the
    HTTP response header just as Tad explained already.
    And no, it really has nothing to do with Perl.

    >Besides, I don't understand why a Content-Type is necessary.


    Because it tells the browser what to do with that particular HTTP
    response.

    jue
     
    Jürgen Exner, May 8, 2009
    #9
  10. ccc31807

    ccc31807 Guest

    > > I am simply blown by this failure ...
    >
    >                    ^
    >                   away
    >
    > *Sigh*


    Reminds me of a very crude example of how capitalization or the lack
    thereof can change the meaning, as in, "I helped my Uncle Jack off a
    horse."

    CC
     
    ccc31807, May 8, 2009
    #10
  11. Jürgen Exner <> wrote:
    >ccc31807 <> wrote:
    >>jue, thanks for your comments.
    >>
    >>On May 7, 8:46 pm, Jürgen Exner <> wrote:
    >>> No, it's not an Apache problem, either. It's an HTTP problem.

    >>
    >>This is what I can't understand. I import a big glob of data from a
    >>database into my script, generate many csv files, or txt files, or pdf
    >>files, or xml file, etc., and generate links. The browsers, IE but FF
    >>as well will happily open a csv file in Excel (assuming that the
    >>client is a Windows machine with Office installed), open a pdf file in
    >>Acrobat, open a txt file in the browser window, and so on.

    >
    >Which IMNSHO is a major mistake of the browser. The browser should never
    >assume a file type based on the last 3 characters of a file name.

    [...]
    >>Besides, I don't understand why a Content-Type is necessary.

    >
    >Because it tells the browser what to do with that particular HTTP
    >response.


    Following up on my own post:

    You may want to check the configuration of your brower(s).
    In Firefox see "Options" -> "Applications".

    For me "Microsoft Word Document" is set to "Always ask" and that's
    exactly what my Firefox does, I just tested it. Uploading a FooBar.doc
    file to a web site, accessing the corresponding URL in Firefox and a
    dialog pops up asking what Firefox should do with that file, open it, in
    which application, or saving it.

    jue
     
    Jürgen Exner, May 8, 2009
    #11
  12. ccc31807

    ccc31807 Guest

    On May 7, 9:36 pm, "A. Sinan Unur" <> wrote:
    > What is this new wave of people thinking that a web server can invoke a
    > specific application on a client computer?


    It's not the web server that invokes the application on the client.
    The client requests a file, the server sends the file if it's there,
    and the client is responsible for finding the correct application to
    open the file. You can request all sorts of documents from a web
    server: gif, jpg, wav, avi, mpeg, mp3, txt, html, xml, pdf, rtf, and
    so on. All the web server does is deliver the file. It's up to the
    client to do something with it.

    > How is a Word document different from any of those formats? Tad has just
    > told you how to solve your problem.


    Okay, maybe I am dense. Let's say I produce the following file like
    this, which will place a file named 'outfile.xml' in the current
    directory:

    open OUTFILE, '>', 'outfile.xml';
    print OUTFILE qq(<?xml version="1.0" encoding="utf-8" ?>
    <document>
    <name>
    <first>Barack</first>
    <middle>H.</middle>
    <last>Obama</last>
    </name>
    <occupation>President</occupation>
    </document>);
    close OUTFILE;

    If I create a hyperlink on an HTML page, like
    <a href="outfile.xml">XML DOC</a>
    a user can click the link, and the web server will return outfile.xml
    to the browser.

    If I give the file an xls extension, on a Windows machine running IE
    the file will open in Excel.

    I just don't understand where I should specify the content type. BTW,
    I have done something like this every day for years, sometimes
    producing as many as several hundred files, and I've never, not once,
    specified a content type. Either I've been real, real lucky, or I
    don't need to specify a content type.

    I'm not trying to be abusive or ugly or insulting or obstinate. I just
    don't understand, and I'm asking for help.

    Thanks, CC.
     
    ccc31807, May 8, 2009
    #12
  13. ccc31807 <> wrote:
    >On May 7, 9:36 pm, "A. Sinan Unur" <> wrote:
    >> What is this new wave of people thinking that a web server can invoke a
    >> specific application on a client computer?

    >
    >It's not the web server that invokes the application on the client.
    >The client requests a file, the server sends the file if it's there,
    >and the client is responsible for finding the correct application to
    >open the file. You can request all sorts of documents from a web
    >server: gif, jpg, wav, avi, mpeg, mp3, txt, html, xml, pdf, rtf, and
    >so on. All the web server does is deliver the file. It's up to the
    >client to do something with it.


    And exactly there was the big misunderstanding. Everyone else was
    assuming you were talking about an embedded document.

    >> How is a Word document different from any of those formats? Tad has just
    >> told you how to solve your problem.


    Actually Tad's solution won't work with those plain files, just like
    mine and Sinan's won't.

    As you said yourself, it is a client configuration thing, the browser
    must be configured to open MS Word.
    In FireFox it's "Options" -> "Applications", in other browsers it's
    probably some other location.

    jue
     
    Jürgen Exner, May 8, 2009
    #13
  14. ccc31807 <> wrote in
    news::

    > On May 7, 9:36 pm, "A. Sinan Unur" <> wrote:
    >> What is this new wave of people thinking that a web server can invoke
    >> a specific application on a client computer?

    >
    > It's not the web server that invokes the application on the client.


    Exactly. However, you snipped what you said in your post. My response
    above was directed to the following nonsensical remark by you:

    >>> It's very possible that it's an Apache problem, but maybe not. I can
    >>> invoke Word and open the .doc file in an ordinary Perl script, like
    >>> this: eval("c:/.../winword.exe" "c:/.../wordprocessingml.doc")


    1. What is eval doing there?
    2. You are mentioning this in the context of a CGI script running
    on a web server.

    >> How is a Word document different from any of those formats? Tad has
    >> just told you how to solve your problem.

    >
    > Okay, maybe I am dense. Let's say I produce the following file like
    > this, which will place a file named 'outfile.xml' in the current
    > directory:


    Are you going to create a file for every request?

    > open OUTFILE, '>', 'outfile.xml';
    > print OUTFILE qq(<?xml version="1.0" encoding="utf-8" ?>
    > <document>
    > <name>
    > <first>Barack</first>
    > <middle>H.</middle>
    > <last>Obama</last>
    > </name>
    > <occupation>President</occupation>
    > </document>);
    > close OUTFILE;
    >
    > If I create a hyperlink on an HTML page, like
    > <a href="outfile.xml">XML DOC</a>
    > a user can click the link, and the web server will return outfile.xml
    > to the browser.


    This is just silly. Just provide the appropriate response headers
    and content in your response.

    But then, you are the one keeps insisting that writing code without a
    plan or design to 'get things done' is the right strategy.

    Now, you want others to help you make money because you haven't
    done your homework and you are up against a deadline.

    Well ...

    What you are asking would be implemented in exactly the same way
    in all languages. Your question is not about Perl.

    Here is your fish. Enjoy.

    #!/usr/bin/perl

    use strict;
    use warnings;

    use CGI::Simple;

    my $cgi = CGI::Simple->new;

    print $cgi->header(
    -type => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
    -attachment => 'report.docx',
    ),
    <<EO_DOCX;
    <?xml version="1.0"?>
    <?mso-application progid="Word.Document"?>
    <w:wordDocument
    xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
    <w:body>
    <w:p>
    <w:r>
    <w:t>Hello, World.</w:t>
    </w:r>
    </w:p>
    </w:body>

    </w:wordDocument>
    EO_DOCX





    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, May 8, 2009
    #14
  15. ccc31807 <> wrote:


    > Let's say I produce the following file like
    > this,



    How the file is produced in not relevant, so I snipped it.


    > If I create a hyperlink on an HTML page, like
    ><a href="outfile.xml">XML DOC</a>
    > a user can click the link, and the web server will return outfile.xml
    > to the browser.
    >
    > If I give the file an xls extension, on a Windows machine running IE
    > the file will open in Excel.



    Sounds like your server is not configured to know what content
    type goes with an extension of .doc.


    > I just don't understand where I should specify the content type.



    In the HTTP headers, specifically in a header named "Content-Type".

    If you have a CGI program where you've slurped in the contents of
    the Word file into $doc, then this should do it:

    print "Content-Type: application/msword\n\n";
    print $doc;

    If it is a static link like in your example above, then you must
    have your server configured to send the correct Content-Type header.

    My apache, for instance, uses the /etc/mime.types file
    to associate a file extension with a content-type.

    grep msword /etc/mime.types
    finds:
    application/msword doc

    If the CGI approach above works, yet the link approach does not work,
    then you can be pretty sure that the root cause of your problem has to
    do with web server configuration.

    It most certainly has nothing to do with Perl...


    --
    Tad McClellan
    email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
     
    Tad J McClellan, May 8, 2009
    #15
  16. ccc31807

    ccc31807 Guest

    On May 7, 10:33 pm, Jürgen Exner <> wrote:
    > And exactly there was the big misunderstanding. Everyone else was
    > assuming you were talking about an embedded document.


    This is my fault. I should have been clearer. The requirement is to
    produce a Word document merging data obtained as a result of querying
    a database with a template, so that the user can open the file in Word
    and edit it if necessary. I'm using the browser as the interface to
    the database, and the client wants to use a hyperlink to allow the
    user to open the document.

    > As you said yourself, it is a client configuration thing, the browser
    > must be configured to open MS Word.
    > In FireFox it's "Options" -> "Applications", in other browsers it's
    > probably some other location.


    Thanks for the suggestion. I'll try it in the morning.

    CC.
     
    ccc31807, May 8, 2009
    #16
  17. ccc31807

    ccc31807 Guest

    On May 7, 10:44 pm, "A. Sinan Unur" <> wrote:
    > 1. What is eval doing there?


    Sorry for the confusion. This is actually from an old script that
    opened Word for another purpose, and I (perhaps confusedly)
    resurrected it as a desperate measure.

    > 2. You are mentioning this in the context of a CGI script running
    >    on a web server.


    Yes, see my reply to jue.

    > But then, you are the one keeps insisting that writing code without a
    > plan or design to 'get things done' is the right strategy.


    I don't recall ever saying this. I have stated that I use ad hoc
    methods for short scripts less than about 50 lines or so. but this is
    different from just throwing code on the wall to see if any sticks.
    Once you write the same code several hundred times, you don't need to
    plan it -- you can do it in your sleep.

    > Now, you want others to help you make money because you haven't
    > done your homework and you are up against a deadline.


    Hey, any port in a storm. ;-)

    > Here is your fish. Enjoy.


    Which defeats the purpose. I'm /NOT/ writing a script to produce an
    output file for a web server. I /AM/ producing the output file to
    write to the file system. The 'eval' point you made above came from a
    script that (1) queried a database, (2) parsed the data and stuffed it
    into a hash, (3) created the outfile from the data, (4) invoked Word,
    and (5) exited. It wasn't a CGI script and didn't use a browser for an
    interface, but was run from the command line and didn't involve a web
    server.

    Anyway, Sinan, thanks for your help. I haven't run your code, but am
    curious if it will actually work in Word 2007. So far, I haven't
    gotten Word to open a document produced with WPML with a docx
    extension, but Word 2007 works fine with a plain doc extension.

    CC.
     
    ccc31807, May 8, 2009
    #17
  18. ccc31807 <> wrote in news:625c32aa-1068-40e8-bb0c-
    :

    > On May 7, 10:44 pm, "A. Sinan Unur" <> wrote:


    >> Here is your fish. Enjoy.

    >
    > Which defeats the purpose. I'm /NOT/ writing a script to produce an
    > output file for a web server.


    Huh? Are you playing games here?

    The subject line says:

    Re: opening a client application from a server?

    In addition, your original post states clearly:

    >>> ccc31807 <> wrote in news:c64106fd-a0b6-4361-a72a-

    :

    >>> as easy as writing a CGI script and dynamically updating the
    >>> HTML from a database. WordProcessingML is no different from
    >>> XHTML and does pretty good at creating Word documents.
    >>>
    >>> Here's the question: The client has a requirement that the users
    >>> create a Word document on a web enabled app and open it in the
    >>> client browser. I can create the word document and open it on the
    >>> server (using this command -- exec("c:/Program Files/Microsoft
    >>> Office/ OFFICE12/winword.exe", "c:/TEST1.DOC")) but I can't get Word
    >>> to open the file on the client. I can write the .doc file to a
    >>> directory and give the client to the directory over the internet,
    >>> but that doesn't meet the requirement.



    > I /AM/ producing the output file to write to the file system.


    Which file system? Where do you think your client is going to save the
    file after s/he has edited it?

    > I haven't run your code, but am curious if it will actually work in
    > Word 2007.


    I don't know. I have Word 2003.

    And, of course, I tested the script before posting it.

    Sinan

    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, May 8, 2009
    #18
  19. l v <> wrote:
    >If you are dynamically creating the document, you don't need to write it
    >to the file system and generate a link in a web page for the user to
    >click on. You can simply send the document directly to the client
    >browser *if* you send the proper html content type.


    Thank you, I think you very nicely explained the basic assumption
    everyone was making.
    One minor point: it would be a content type in the HTTP header and just
    to make absolutely sure: it would not be set to "HTML".

    jue
     
    Jürgen Exner, May 8, 2009
    #19
  20. l v <> wrote in
    news:p:

    > ccc31807 wrote:
    >> On May 7, 10:44 pm, "A. Sinan Unur" <> wrote:


    ....

    >>> Here is your fish. Enjoy.

    >>
    >> Which defeats the purpose. I'm /NOT/ writing a script to produce an
    >> output file for a web server. I /AM/ producing the output file to
    >> write to the file system.

    ....

    > Not to put words in what Sinan and Jurgen are saying.
    >
    > If you are dynamically creating the document, you don't need to write
    > it to the file system and generate a link in a web page for the user
    > to click on. You can simply send the document directly to the client
    > browser *if* you send the proper html content type.


    Minor nit:

    s/html content type/content type/

    Sinan
    --
    A. Sinan Unur <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, May 8, 2009
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGFyYWcgSm9zaGk=?=

    Opening Office Application on client

    =?Utf-8?B?UGFyYWcgSm9zaGk=?=, Jan 21, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    308
    =?Utf-8?B?UGFyYWcgSm9zaGk=?=
    Jan 21, 2004
  2. Rob Nicholson
    Replies:
    3
    Views:
    469
    Steven Cheng[MSFT]
    May 13, 2005
  3. -
    Replies:
    2
    Views:
    404
    Alan Krueger
    Jul 29, 2005
  4. prachi
    Replies:
    0
    Views:
    325
    prachi
    Jun 4, 2008
  5. fniles
    Replies:
    0
    Views:
    278
    fniles
    Apr 26, 2009
Loading...

Share This Page