我正在使用 Itextsharp,但在检索图像时遇到问题。
我在用着
iTextSharp.text.Image Logo2 = iTextSharp.text.Image.GetInstance(Server.MapPath("Images") + "/Logo.png");
但我没有得到预期的结果。我需要的路径应该是d:\webs\site\images
但Server.MapPath()
返回d:\webs\images
。该文件夹丢失,这(显然)在尝试使用 iTextSharpsite
创建时会导致错误。Image
我如何才能MapPath
返回我需要的路径?