0
웹 페이지 URL이 하나 있는데 PDF로 변환하고 싶습니다. 내 웹 페이지에서 abcpdf.net을 사용하고 로컬 호스트에서는 잘 작동하지만 서버에서는 작동하지 않습니다 .I abcpdf.net 6.1 버전을 설치하고 abcpdf.dll을 내 bin 폴더에 추가했습니다. 서버는 Windows Server 2008 R2입니다. 버전 문제가있는 경우 제게 제안 해주십시오.abcpdf.net을 사용하여 aspx 페이지에서 PDF 생성
theDoc.Save(Server.MapPath("report.pdf"));
Response.Redirect("report.pdf");
당신이 당신의 현재 요청의 디렉토리에 report.pdf을 저장해야합니다 : 당신의 문제가있는 것 같다
string projectid = partnerid;
string versionid = DDLVersion.SelectedItem.Text.ToString().Trim();
string serverurl = "http://serverurl/Design/Pro/Previewtopdf.aspx?PID=" + projectid + "&versionID=" + versionid + "";
Doc theDoc = new Doc();
theDoc.Rect.Inset(10, 30);
theDoc.Page = theDoc.AddPage();
int theID;
theID = theDoc.AddImageUrl(serverurl);
while (true)
{
theDoc.FrameRect(); // add a black border
if (!theDoc.Chainable(theID))
break;
theDoc.Page = theDoc.AddPage();
theID = theDoc.AddImageToChain(theID);
}
for (int i = 1; i <= theDoc.PageCount; i++)
{
theDoc.PageNumber = i;
theDoc.Flatten();
}
theDoc.Save(Server.MapPath("report.pdf"));
theDoc.Clear();
Response.Redirect("report.pdf");
작동하지 않는 것으로 정의하거나, 예외를 게시 할 수 있습니까? 또는 얻는 결과와 기대하는 결과를 게시 할 수 있습니까? – SynerCoder
DLL에 대한 모든 참조가 비 GAC인지 확인하십시오. –
@ SynerCoder : 답변 해 주셔서 감사합니다. PDF 파일로 변환하고 싶습니다. 생성 할 때 PDF가 나오지 않습니다. – raje