我正在将 pdf 上传到 sharepoint 2010 文档库。当我下载文档时,它与阅读器完美阅读。但是,如果我尝试使用 PdfReader.Open() 读取它,我会收到这样的错误“不需要令牌 {0}”。我用记事本打开了文件,发现在 EOF 指令之后附加了一些附加的元数据。这里是:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:o="urn:schemas-microsoft-com:office:office" __expr-val-dir="ltr" lang="en-us" dir="ltr">
<head><meta http-equiv="X-UA-Compatible" content="IE=8" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta name="progid" content="SharePoint.WebPartPage.Document" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta http-equiv="Expires" content="0" /><title>
</title><link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/layouts.css?rev=aTcoNUf8p1YiDzYCg3%2FLIw%3D%3D"/>
<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/minimalv4.css?rev=QACXwfVflZPCtqqy8xasdg%3D%3D"/>
<script type="text/javascript">
// <![CDATA[
document.write('<script type="text/javascript" src="/_layouts/1033/init.debug.js?rev=%2FOmktAG7ectPWwTJWj46Jg%3D%3D"></' + 'script>');
document.write('<script type="text/javascript" src="/ScriptResource.axd?d=jo-qr0uliogUxPfGJgzwxlqqWGBr4ZQluJCkvu8GepmnwGeFGOBx2X6f7wOlonZsuHJrCfGg7ytQi9ybHdfIl1fvn6n8Vuaq0wsG6vUtnzOGD8fu_G39skSe9cmTWAC6F-_-We2xD8lqcXK1byyw96tPn4EBhYftzRXUJNfk2rFTka_l0&t=ffffffffb868b5f4"></' + 'script>');
document.write('<script type="text/javascript" src="/_layouts/blank.debug.js?rev=jE3bS2JFTB63z3iWgauX9w%3D%3D"></' + 'script>');
document.write('<script type="text/javascript" src="/ScriptResource.axd?d=eK8NeFyqifiHIEBZsFu4DhSSm0KVdY12CSYlSDjGl2uBdrQ2ToscBqrAQ1ddvJKOdrp6VqIT5TQ9OqvDJASGOt1CljJjTdqIcylj3CjCbrU_l0ItIA5uEutZo6JDaaHbjt375r4t5aJWxuHVzPRF7kIr55lO5VXdkDUGYVkEvu5_erFl0&t=ffffffffb868b5f4"></' + 'script>');
// ]]>
</script>
还有更多要展示的,但应该足够了。