Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

PDF files
dlieffrig
#1 Posted : Tuesday, 24 January 2012 2:59:23 AM(UTC)
Rank: Member

Joined: 4/11/2011(UTC)
Posts: 4
Location: Belgium

Hello,

Maybe can you help me ?

1) How is it possible to open a PDF file directly into a PDF reader like Adobe Reader and not in control of visualization GSP.

2) If not how to open the PDF in a new window so if the user uses "Enlarge PDF to fit browser window" closes the window and that he left the gallery. The user does not always think to go back one page.

A big thank you for your help.

Best regards.

Dominique
Roger Martin
#2 Posted : Tuesday, 24 January 2012 10:09:58 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

To a large extent the browser decides what to do when a user clicks a PDF link, not the website. For example, Chrome forces you to download the file and open it in the desktop PDF viewer (like Adobe Reader), but other browsers open it within the browser window if a PDF viewing plug-in is installed.

You can, however, tell the browser to open the PDF file in a new window/tab by editing the HTML template. Open the database table gs_BrowserTemplate and look for the record where MimeType='application/pdf'. Then edit the hyperlink in the HtmlTemplate column to include target="_blank", like this:

<p><a href="{MediaObjectUrl}" target="_blank">Enlarge PDF to fit browser window</a></p><iframe src="{MediaObjectUrl}" frameborder="0" style="width:680px;height:600px;border:1px solid #000;"></iframe>

Restart the IIS app pool after editing the record to force the app to reload the template. You can make other changes to further customize the rendering as desired.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Ernie
#3 Posted : Wednesday, 25 January 2012 1:31:26 PM(UTC)
Rank: Member

Joined: 20/01/2012(UTC)
Posts: 4
Location: texas

I tried doing that with the PDF seems it gets stuck and will not download the whole file
Roger Martin
#4 Posted : Thursday, 26 January 2012 7:36:32 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

It is hard to imagine how adding target="_blank" causes the file to get stuck, so I don't really know what to suggest. I tried it on my system and it worked. Try it with other PDF files. Do they all get stuck?

I think you may have something else going on...
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Ernie
#5 Posted : Thursday, 26 January 2012 8:11:04 AM(UTC)
Rank: Member

Joined: 20/01/2012(UTC)
Posts: 4
Location: texas

Your right Roger, I did some more checking, took a while to find the answer,

The web site has nothing to to do with the Hang of a PDF, it seems adobe has made some changes after 8.3 that causes a problem with the viewing of a PDF in IE browsers. IF the files are tiny the browser view works fine

My work around was to go into the PDF reader or standard adobe under prefences and then internet and remove view in browser (all 3 check marks), this will open the reader instead of viewing thru a browser. Download speed is great now for PDF files

Thanks for your reply , it pushed me to look for more answers
dlieffrig
#6 Posted : Thursday, 26 January 2012 2:33:24 PM(UTC)
Rank: Member

Joined: 4/11/2011(UTC)
Posts: 4
Location: Belgium

Hello Roger,

A big thank you for your reply.

Very good weekend.

Dominique Lieffrig
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.