Windows phone 8 在Windows Phone上脱机创建PDF

Windows phone 8 在Windows Phone上脱机创建PDF,windows-phone-8,pdf-generation,windows-phone,itextsharp,Windows Phone 8,Pdf Generation,Windows Phone,Itextsharp,它存在吗?我试图使用iTextSharp,但它不起作用。这个小代码示例是错误的: IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication(); Document document = new Document(); string path = "/first.pdf"; PdfWriter.GetInstance(document, store.Cr

它存在吗?我试图使用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、任何东西……

NuGet的iTextSharp没有为Windows Phone CLR编译。我不确定是否有官方的。您可以尝试将iTextSharp源代码()编译为可移植类库,或使用非官方源代码,如。

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


我认为WP8不存在iTextSharp。如果dll未经批准,NuGet不允许我安装,不是吗?NuGet没有说明您使用哪个dll,因此您可以添加dll。
document.Add(p);