PDA

View Full Version : Trouble Opening PDF files on local machine from web under SP2 on X


Eric Anderson
September 14th 04, 12:59 AM
I have solved the problem of opening CD-based html pages from my website by
using the "mark of the web" feature. These webpages can have javascript that
runs flash content on the CD. Filenames are passed in the URL for this
purpose.

However, this approach does not work for pdf files (as far as I know, you
can't embed a "mark of the web" in a pdf file).

I thought the solution would be to create a "pdf-setup.htm" file on the CD.
This file is accessed like this:

file:///D:/Media/pdf-setup.htm?FN=Introduction.pdf

This URL is issued by my website (a link), where the CD-ROM that has the pdf
file is in drive D (this is a distance education course).

The pdf-setup.htm file has the "mark of the web", and a javascript that gets
the finename "introduction.pdf" from the URL. It then uses the
window.location function to load the pdf file. Naturally (my bad luck) this
does not work. If I substitute a file name such as test.htm, it works fine
(assuming test.htm has a "mark of the web" in it).

One solution is to "reformat" all of the pdf file content into html files.
This is a huge amount of work. Is there any way to get the javascript to
work, or is there another way to load the pdf file? I am trying to avoid a
major rework of all of the pdf files on our courseware CD's. They are
multi-column and very complex formatting, great with pdf, but not so great
with html without extensive fiddling with tables within tables within
tables...

Any help would be appreciated.

Ramesh [MVP]
September 14th 04, 04:53 AM
Eric,

See:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=ewXOqeEjEHA.1344%40TK2MSFTNGP11.phx.gbl

Both the solutions (Lockdown_Zones and Disable_Local_Machine_Navigate
methods work in SP2)

--
Ramesh, MS-MVP XP Shell/UI
http://www.mvps.org/sramesh2k


"Eric Anderson" > wrote in message
...
I have solved the problem of opening CD-based html pages from my website by
using the "mark of the web" feature. These webpages can have javascript
that
runs flash content on the CD. Filenames are passed in the URL for this
purpose.

However, this approach does not work for pdf files (as far as I know, you
can't embed a "mark of the web" in a pdf file).

I thought the solution would be to create a "pdf-setup.htm" file on the CD.
This file is accessed like this:

file:///D:/Media/pdf-setup.htm?FN=Introduction.pdf

This URL is issued by my website (a link), where the CD-ROM that has the pdf
file is in drive D (this is a distance education course).

The pdf-setup.htm file has the "mark of the web", and a javascript that gets
the finename "introduction.pdf" from the URL. It then uses the
window.location function to load the pdf file. Naturally (my bad luck) this
does not work. If I substitute a file name such as test.htm, it works fine
(assuming test.htm has a "mark of the web" in it).

One solution is to "reformat" all of the pdf file content into html files.
This is a huge amount of work. Is there any way to get the javascript to
work, or is there another way to load the pdf file? I am trying to avoid a
major rework of all of the pdf files on our courseware CD's. They are
multi-column and very complex formatting, great with pdf, but not so great
with html without extensive fiddling with tables within tables within
tables...

Any help would be appreciated.

Eric Anderson
September 14th 04, 05:27 AM
Ramesh:

Sorry, I did not understand how to use that info... However, FYI, I did
discover another answer at a pdf support site. The answer is to embed the
PDF in a webpage with <OBJECT> and <EMBED> tags, just liks flash, and it
works fine (as long as the page has the "mark of the web" ...

Eric

"Ramesh [MVP]" wrote:

> Eric,
>
> See:
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=ewXOqeEjEHA.1344%40TK2MSFTNGP11.phx.gbl
>
> Both the solutions (Lockdown_Zones and Disable_Local_Machine_Navigate
> methods work in SP2)
>
> --
> Ramesh, MS-MVP XP Shell/UI
> http://www.mvps.org/sramesh2k
>
>
> "Eric Anderson" > wrote in message
> ...
> I have solved the problem of opening CD-based html pages from my website by
> using the "mark of the web" feature. These webpages can have javascript
> that
> runs flash content on the CD. Filenames are passed in the URL for this
> purpose.
>
> However, this approach does not work for pdf files (as far as I know, you
> can't embed a "mark of the web" in a pdf file).
>
> I thought the solution would be to create a "pdf-setup.htm" file on the CD.
> This file is accessed like this:
>
> file:///D:/Media/pdf-setup.htm?FN=Introduction.pdf
>
> This URL is issued by my website (a link), where the CD-ROM that has the pdf
> file is in drive D (this is a distance education course).
>
> The pdf-setup.htm file has the "mark of the web", and a javascript that gets
> the finename "introduction.pdf" from the URL. It then uses the
> window.location function to load the pdf file. Naturally (my bad luck) this
> does not work. If I substitute a file name such as test.htm, it works fine
> (assuming test.htm has a "mark of the web" in it).
>
> One solution is to "reformat" all of the pdf file content into html files.
> This is a huge amount of work. Is there any way to get the javascript to
> work, or is there another way to load the pdf file? I am trying to avoid a
> major rework of all of the pdf files on our courseware CD's. They are
> multi-column and very complex formatting, great with pdf, but not so great
> with html without extensive fiddling with tables within tables within
> tables...
>
> Any help would be appreciated.
>
>
>

Ramesh [MVP]
September 14th 04, 05:32 AM
Thanks for the feedback Eric. Can you supply the webpage which explains
this?

--
Ramesh, MS-MVP XP Shell/UI
http://www.mvps.org/sramesh2k


"Eric Anderson" > wrote in message
...
Ramesh:

Sorry, I did not understand how to use that info... However, FYI, I did
discover another answer at a pdf support site. The answer is to embed the
PDF in a webpage with <OBJECT> and <EMBED> tags, just liks flash, and it
works fine (as long as the page has the "mark of the web" ...

Eric

"Ramesh [MVP]" wrote:

> Eric,
>
> See:
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&selm=ewXOqeEjEHA.1344%40TK2MSFTNGP11.phx.gbl
>
> Both the solutions (Lockdown_Zones and Disable_Local_Machine_Navigate
> methods work in SP2)
>
> --
> Ramesh, MS-MVP XP Shell/UI
> http://www.mvps.org/sramesh2k
>
>
> "Eric Anderson" > wrote in message
> ...
> I have solved the problem of opening CD-based html pages from my website
> by
> using the "mark of the web" feature. These webpages can have javascript
> that
> runs flash content on the CD. Filenames are passed in the URL for this
> purpose.
>
> However, this approach does not work for pdf files (as far as I know, you
> can't embed a "mark of the web" in a pdf file).
>
> I thought the solution would be to create a "pdf-setup.htm" file on the
> CD.
> This file is accessed like this:
>
> file:///D:/Media/pdf-setup.htm?FN=Introduction.pdf
>
> This URL is issued by my website (a link), where the CD-ROM that has the
> pdf
> file is in drive D (this is a distance education course).
>
> The pdf-setup.htm file has the "mark of the web", and a javascript that
> gets
> the finename "introduction.pdf" from the URL. It then uses the
> window.location function to load the pdf file. Naturally (my bad luck)
> this
> does not work. If I substitute a file name such as test.htm, it works
> fine
> (assuming test.htm has a "mark of the web" in it).
>
> One solution is to "reformat" all of the pdf file content into html files.
> This is a huge amount of work. Is there any way to get the javascript to
> work, or is there another way to load the pdf file? I am trying to avoid
> a
> major rework of all of the pdf files on our courseware CD's. They are
> multi-column and very complex formatting, great with pdf, but not so great
> with html without extensive fiddling with tables within tables within
> tables...
>
> Any help would be appreciated.
>
>
>

Torgeir Bakken \(MVP\)
September 14th 04, 12:19 PM
Ramesh [MVP] wrote:

> Eric Anderson wrote:
>
>> Sorry, I did not understand how to use that info... However, FYI,
>> I did discover another answer at a pdf support site. The answer
>> is to embed the PDF in a webpage with <OBJECT> and <EMBED> tags,
>> just liks flash, and it works fine (as long as the page has the
>> "mark of the web" ...
>
> Thanks for the feedback Eric. Can you supply the webpage which
> explains this?
Hi

For the 'Mark of the Web' method part:

Local Machine Zone Lockdown - Developer Implications
http://msdn.microsoft.com/security/productinfo/XPSP2/securebrowsing/lockdown_devimp.aspx


*Important*, 'Mark of the Web' is very picky about placement/spaces/
lengths:
http://groups.google.com/groups?selm=Oy0xT%23ZlEHA.1656%40TK2MSFTNGP09.phx. gbl

Eric Anderson (the OP in this tread) found that out in another tread
some days ago:
http://groups.google.com/groups?threadm=a33101c4982b%24a38c40b0%24a601280a% 40phx.gbl


Note this one as well:
http://groups.google.com/groups?selm=41335495%240%2419723%2461fed72c%40news .rcn.com


Mark of the Web is also described in the chapter "Internet Explorer
Local Machine Zone Lockdown" in document 05_CIF_Browsing.doc

05_CIF_Browsing.doc ("Changes to Functionality in Microsoft Windows XP
Service Pack 2, Part 5: Enhanced Browsing Security") can be downloaded
from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=7bd948d7-b791-40b6-8364-685b84158c78&DisplayLang=en

and
How Windows XP Service Pack 2 affects web pages running locally
on your computer
http://www.phdcc.com/xpsp2.htm



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Ramesh [MVP]
September 14th 04, 12:37 PM
Thanks Torgeir. I was particularly interested in the <OBJECT> < EMBED> tags
which Eric was referring to. As for the Active content and the "Mark of the
web", I have it documented here in my site:
http://www.winxptutor.com/lmzunlock.htm

--
Ramesh, MS-MVP XP Shell/UI
http://www.mvps.org/sramesh2k


"Torgeir Bakken (MVP)" > wrote in message
...
Ramesh [MVP] wrote:

> Eric Anderson wrote:
>
>> Sorry, I did not understand how to use that info... However, FYI,
>> I did discover another answer at a pdf support site. The answer
>> is to embed the PDF in a webpage with <OBJECT> and <EMBED> tags,
>> just liks flash, and it works fine (as long as the page has the
>> "mark of the web" ...
>
> Thanks for the feedback Eric. Can you supply the webpage which
> explains this?
Hi

For the 'Mark of the Web' method part:

Local Machine Zone Lockdown - Developer Implications
http://msdn.microsoft.com/security/productinfo/XPSP2/securebrowsing/lockdown_devimp.aspx


*Important*, 'Mark of the Web' is very picky about placement/spaces/
lengths:
http://groups.google.com/groups?selm=Oy0xT%23ZlEHA.1656%40TK2MSFTNGP09.phx. gbl

Eric Anderson (the OP in this tread) found that out in another tread
some days ago:
http://groups.google.com/groups?threadm=a33101c4982b%24a38c40b0%24a601280a% 40phx.gbl


Note this one as well:
http://groups.google.com/groups?selm=41335495%240%2419723%2461fed72c%40news .rcn.com


Mark of the Web is also described in the chapter "Internet Explorer
Local Machine Zone Lockdown" in document 05_CIF_Browsing.doc

05_CIF_Browsing.doc ("Changes to Functionality in Microsoft Windows XP
Service Pack 2, Part 5: Enhanced Browsing Security") can be downloaded
from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=7bd948d7-b791-40b6-8364-685b84158c78&DisplayLang=en

and
How Windows XP Service Pack 2 affects web pages running locally
on your computer
http://www.phdcc.com/xpsp2.htm



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Google