0

它存在吗?我尝试使用 iTextSharp,但它不起作用。这个小代码示例是错误的:

 IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication();
        Document document = new Document();

        string path = "/first.pdf";

        PdfWriter.GetInstance(document, store.CreateFile( path));

        document.Open();
        document.SetPageSize(PageSize.A4);
        Paragraph p = new Paragraph("Working with pdfs");
        document.Close();

错误信息是:

无法加载文件或程序集“系统,版本=2.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089”或其依赖项之一。该系统找不到指定的文件。

有谁能够帮我?工作示例代码,工作 dll,任何东西......

4

2 回答 2

0

NuGet 的 iTextSharp 没有为 Windows Phone CLR 编译。不知道有没有官方的。您可以尝试将 iTextSharp 源代码 ( http://sourceforge.net/p/itextsharp/code/564/tree/branches/iTextSharp_5_4_2/ ) 编译为可移植类库,或使用非官方源代码,如http://itextsharpsl.codeplex .com/

于 2013-07-09T15:19:31.337 回答
0

看起来您没有将段落“添加”到文档中。:)

document.Add(p);
于 2013-08-07T10:01:15.590 回答