PDF 파일을 렌더링하는 데 응용 프로그램 페이지가 필요한 사용자 지정 웹 파트를 만들고 있습니다.PDF 표시 - 응용 프로그램 페이지 SharePoint
나는 현재 다음 링크를 사용하고 http://support.microsoft.com/kb/306654
그것은 ASP.NET에서 잘 작동하지만 SharePoint의 빈 페이지를 제공합니다.
여기 코드는 다음과 같습니다 ...
Response.ClearContent();
Response.ClearHeaders();
//Set the appropriate ContentType.
Response.ContentType = "Application/pdf";
//Get the physical path to the file.
string FilePath = MapPath("Test.pdf");
//Write the file directly to the HTTP content output stream.
Response.WriteFile(FilePath);
Response.Flush();
Response.End();
은 나를 미치게 만들고, 지난 몇 시간 동안 그것을에서 작업 아이디어 (PDF 파일은 같은 디렉토리에)?
문제는 다음과 같을 수 있습니다. string FilePath = MapPath ("Test.pdf"); . 공유 위치에서 실행 중일 때 파일이 존재합니까? –
@Raj : 그건 문제가 아닙니다. 파일이 같은 폴더에 있습니다. 또한 필자는 ASP.NET에서 작동하는 Byte 배열을 사용하여 PDF를 작성하는 경우에도 동일한 문제에 직면하고 있습니다. – spt3210
ASP.NET에서 작동하지만 웹 파트가 Sharepoint에서도 실행되는 것을 알고 있습니까? 웹 파트에서 모든 코드를 제거하고 Response.Write ("hello")를 입력하십시오. 라인이 실행됩니까? –