Link to home
Start Free TrialLog in
Avatar of drtopserv
drtopservFlag for Israel

asked on

Integrate line into code .NET

Hi,
I need to manipluate this code to be able to open a pdf in internet explorer with parameter :
http://example.org/doc.pdf#page=3&pagemode=thumbs
pagemode parameter let PDF file opened in explorer with thumbs list in acrobat.
I would like to intergate this thing into this code:
byte[] docStream = (byte[])Session["docToShowData"];
                string docFormat = (string)Session["docToShowContentType"];
                Response.BinaryWrite(docStream);
                Response.ContentType = docFormat;
Avatar of MogalManic
MogalManic
Flag of United States of America image

I do not think it is possible to control the behavior of Acrobat PDF reader from the server side.  From the servers point of view, there is no way of knowing which PDF viewer the user has installed (the user could be a phone, mac, linux...)

The only thing you can control on the server side is the content type (Application/PDF) and content disposition (it can be an attachment which in most browsers will open the PDF as a pop-up).

You may be able to control the PDF on the client side using Javascript:
  http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
Avatar of drtopserv

ASKER

Firstly thnx MogalManic for ur reply,
will let us assume (and it is in a real situation), that we have only clients with win7/xp and internet explorer 9
is it possible to merge your solution (using javascript) with my above code to force acrobat adobe reader v9.2 to open as a listview as a thumb ?
ASKER CERTIFIED SOLUTION
Avatar of MogalManic
MogalManic
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
well, thnx alot MogalManic.
in the line you wrote :
 <a target="popup" href="PDFViewer.ashx#pagemode=thumbs?path=PDFFiles/MyDoc.PDF">Click Here to open PDF</a>
there is "path", which i don`t have , that`s becuase the process I do , get binary.write from "EMC DOCUMENTUM server"
and display it to the user.
there is no specific line mentioning the path for the pdf file.
do u have any idea?
That was an example.  I did not assume that the document was coming from a database, so I just presented the easiest idea. In your implementation of the PDFViewer.ASHX, you would supply the EMC DOCUMENTUM  key(s) that would be required for you to open the document.
THNX alot MogalManic,
It workS now :}}