<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Apache Content-Type for PDF in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921897#M32676</link>
    <description>Karl was on the right line with the VMS Apache utilities.&lt;BR /&gt;&lt;BR /&gt;The final solution looks something like this :-&lt;BR /&gt;&lt;BR /&gt;$ APACHE$DCL_BIN := $ APACHE$ROOT:[000000]APACHE$DCL_BIN.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$ APACHE$DCL_ENV := $ APACHE$ROOT:[000000]APACHE$DCL_ENV.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$ APACHE$DCL_RUN := $ APACHE$ROOT:[000000]APACHE$DCL_RUN.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$ APACHE$FLIP_CCL:= $ APACHE$ROOT:[000000]APACHE$FLIP_CCL.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$       !&lt;BR /&gt;$! APACHE$ROOT:[CGI-BIN]GETPDF.COM&lt;BR /&gt;$ REPORT = "WEBREPORT$STORE:AWPFWDRP3_20050823_1686.PDF"&lt;BR /&gt;$ APACHE$FLIP_CCL&lt;BR /&gt;$ WRITE SYS$OUTPUT F$FAO("!AS!/!/","Content-Type: application/pdf")&lt;BR /&gt;$ APACHE$DCL_BIN 'REPORT'&lt;BR /&gt;$!&lt;BR /&gt;&lt;BR /&gt;FLIP_CCL changes the output (SYS$OUTPUT) so that CRLF isn't sent, and DCL_BIN enables you to output binary files in chunks.&lt;BR /&gt;&lt;BR /&gt;All this is of course, very badly documented by Apache!&lt;BR /&gt;&lt;BR /&gt;Rob.&lt;BR /&gt;</description>
    <pubDate>Wed, 31 Aug 2005 02:43:19 GMT</pubDate>
    <dc:creator>Robert Atkinson</dc:creator>
    <dc:date>2005-08-31T02:43:19Z</dc:date>
    <item>
      <title>Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921890#M32669</link>
      <description>Hi all.&lt;BR /&gt;&lt;BR /&gt;I'm trying to output a PDF file through Apache using the DCL code below, but the file is just displayed as text to the browser (MSIE) rather than being launched in Acrobat.&lt;BR /&gt;&lt;BR /&gt;Any ideas how I can make this work?&lt;BR /&gt;&lt;BR /&gt;Rob.&lt;BR /&gt;&lt;BR /&gt;$       !&lt;BR /&gt;$       WS F$FAO("!AS!/!/","Content-type: application/pdf")&lt;BR /&gt;$       WS ""&lt;BR /&gt;$       !&lt;BR /&gt;$       TYPE WEBREPORT$STORE:ALPD_20040729_3F9B.PDF;1&lt;BR /&gt;$       !&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Aug 2005 04:13:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921890#M32669</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2005-08-30T04:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921891#M32670</link>
      <description>do links to pdf files on other web sites work i.e. is IE properly setup to handle this content type?</description>
      <pubDate>Tue, 30 Aug 2005 05:05:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921891#M32670</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2005-08-30T05:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921892#M32671</link>
      <description>Yes.&lt;BR /&gt;&lt;BR /&gt;The code currently loads the file as http://server/webreports/store/filename.pdf, but I want to make the system more secure by hiding the filename and accessing it using some kind of session generated alias.&lt;BR /&gt;&lt;BR /&gt;Rob.</description>
      <pubDate>Tue, 30 Aug 2005 05:21:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921892#M32671</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2005-08-30T05:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921893#M32672</link>
      <description>MSIE tends to ignore the content-type, and just uses the file extension to determine how to treat it.&lt;BR /&gt;&lt;BR /&gt;Try loading the URL in a different browser to see if this is the case.&lt;BR /&gt;&lt;BR /&gt;If so, then you will need to include the .PDF file type to keep MSIE happy.&lt;BR /&gt;&lt;BR /&gt;You may be able to get away with adding a query string to the URL, e.g. something like&lt;BR /&gt;&lt;BR /&gt;http://server/whatever.ext?type=.pdf</description>
      <pubDate>Tue, 30 Aug 2005 12:06:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921893#M32672</guid>
      <dc:creator>Sebastian Bazley</dc:creator>
      <dc:date>2005-08-30T12:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921894#M32673</link>
      <description>Aside from IE issues with content type, PDF is a binary format so using TYPE to include it in your script's output is likely to transfer the data incorrectly.  TYPE will open the file with RMS, which will try to parse out 'records' the data that may not be there.&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Aug 2005 12:40:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921894#M32673</guid>
      <dc:creator>David Jones_21</dc:creator>
      <dc:date>2005-08-30T12:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921895#M32674</link>
      <description>PDF (Portable Document Format) is a way to code the document into an ASCII format that a reader can interpret so it can transform the ASCII file into a presentable display. Readers are platform dependent. There's one for windows, different Unix flavors and one for VMS (but I'm uncertain about the status of that one. Way behind, I guess). You can compare this to the PostScript  (PS) format for printers: if a printer contains the interpreter software, it will print the document as intended, otherwise it will just be the ASCII text - quite meaningless.&lt;BR /&gt;&lt;BR /&gt;TYPE will look at the file as an ASCII file and will not do any interpretation so you will see the text as it is. Try typing a PS file and you'll see the same type of output.&lt;BR /&gt;To read the file on VMS, you need the reader.&lt;BR /&gt;To read it via Apache, I think what you need to do is defining a mime.type line in apache$root:[conf]httpd.conf for PDF, something like:&lt;BR /&gt;&lt;BR /&gt;AddType application/x-acroread .pdf&lt;BR /&gt;&lt;BR /&gt;but I'm not sure what to specify in this case.&lt;BR /&gt;&lt;BR /&gt;Willem</description>
      <pubDate>Wed, 31 Aug 2005 01:46:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921895#M32674</guid>
      <dc:creator>Willem Grooters</dc:creator>
      <dc:date>2005-08-31T01:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921896#M32675</link>
      <description>In the releasenotes is some information about transfering binary data, CSWS include a special APACHE$BIN_DCL for this purpose.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Wed, 31 Aug 2005 01:54:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921896#M32675</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2005-08-31T01:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921897#M32676</link>
      <description>Karl was on the right line with the VMS Apache utilities.&lt;BR /&gt;&lt;BR /&gt;The final solution looks something like this :-&lt;BR /&gt;&lt;BR /&gt;$ APACHE$DCL_BIN := $ APACHE$ROOT:[000000]APACHE$DCL_BIN.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$ APACHE$DCL_ENV := $ APACHE$ROOT:[000000]APACHE$DCL_ENV.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$ APACHE$DCL_RUN := $ APACHE$ROOT:[000000]APACHE$DCL_RUN.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$ APACHE$FLIP_CCL:= $ APACHE$ROOT:[000000]APACHE$FLIP_CCL.EXE_'F$GETSYI("ARCH_NAME")'&lt;BR /&gt;$       !&lt;BR /&gt;$! APACHE$ROOT:[CGI-BIN]GETPDF.COM&lt;BR /&gt;$ REPORT = "WEBREPORT$STORE:AWPFWDRP3_20050823_1686.PDF"&lt;BR /&gt;$ APACHE$FLIP_CCL&lt;BR /&gt;$ WRITE SYS$OUTPUT F$FAO("!AS!/!/","Content-Type: application/pdf")&lt;BR /&gt;$ APACHE$DCL_BIN 'REPORT'&lt;BR /&gt;$!&lt;BR /&gt;&lt;BR /&gt;FLIP_CCL changes the output (SYS$OUTPUT) so that CRLF isn't sent, and DCL_BIN enables you to output binary files in chunks.&lt;BR /&gt;&lt;BR /&gt;All this is of course, very badly documented by Apache!&lt;BR /&gt;&lt;BR /&gt;Rob.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Aug 2005 02:43:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921897#M32676</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2005-08-31T02:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Content-Type for PDF</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921898#M32677</link>
      <description>Rob,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I did some testing. As I have no Apache installed I just write a simple TCPIP service:&lt;BR /&gt;&lt;BR /&gt;$ open/read/write x sys$net&lt;BR /&gt;$ write x F$FAO("!AS!/","HTTP/1.0 200 OK")&lt;BR /&gt;$ write x F$FAO("!AS!/","Content-type: application/pdf")&lt;BR /&gt;$ write x F$FAO("!/")&lt;BR /&gt;$ define sys$output x/nolog&lt;BR /&gt;$ type sys$login:h.pdf&lt;BR /&gt;$ close x&lt;BR /&gt;&lt;BR /&gt;First tests was not succesful. Acrobat complains on the file.&lt;BR /&gt;I save the file on the disk and see that the CR/LF pairs were replaced to one CR. So I did SET FILE/ATTR=(RFM=FIX,LRL=512,MRS=512) on the pdf file. Now works all fine.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Wed, 31 Aug 2005 09:29:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/apache-content-type-for-pdf/m-p/4921898#M32677</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2005-08-31T09:29:51Z</dc:date>
    </item>
  </channel>
</rss>

