PDF webpage display: Question about opening a Chinese file using the PDF plug-in for object tags (Web Development)

Source: Internet
Author: User

 

 

Embed object tags into ie using the PDF plug-in
<Div id = showdiv
Style = "Z-INDEX: 0; left: 10px; width: 10px; position: absolute; top:-30px; Height: 10px">
<Object classid = "CLSID: CA8A9780-280D-11CF-A24D-444553540000" width = "1000" Height = "700" border = "0" Top = "-10" name = "pdf">
<Param name = "toolbar" value = "false">
<Param name = "_ version" value = "65539">

 

<Param name = "_ extentx" value = "20108">

 

<Param name = "_ extenty" value = "10866">

 

<Param name = "_ stockprops" value = "0">

 

<Param name = "src" value = "<% = filename %>">
</Object>
<Input type = button name = print value = "print" onclick = "pdf. Print ()">
<Input type = button name = test value = "close" onclick = "window. Close ()">
</Div>

When the filename variable is an English name, such as 123.small, 123.pdf will be admitted to the same directory, but it cannot be opened when it is a Chinese name (such as: office software product testing standard and evaluation standard set.
Solution
Use the getrealpath ("./") of JSP;

Use server. mappath ("./"). Replace ('\', '/') of Asp.net ('\\','/');

The combination of the current path and filename can be found in the value to solve the Chinese problem.

It takes a long time to test this problem. I hope that it will be helpful if you encounter such a similar problem later.

If it is useful, just like it!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.