Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iTextSharp和Xamarin_Xamarin_Xamarin.ios_Xamarin.android_Itext - Fatal编程技术网

iTextSharp和Xamarin

iTextSharp和Xamarin,xamarin,xamarin.ios,xamarin.android,itext,Xamarin,Xamarin.ios,Xamarin.android,Itext,我试图在Xamarin应用程序中使用iTextSharp dll,但我无法编译,因为我收到了以下错误: Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps

我试图在Xamarin应用程序中使用iTextSharp dll,但我无法编译,因为我收到了以下错误:

Error       Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Drawing.dll'
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)   App2.Android    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets   1399    2

您需要使用Xamarin端口

Xam.iTextSharpLGPL(安装包Xam.iTextSharpLGPL)

您可以从NuGet下载这个包

谢谢!现在好了@PieroZito您找到了
Xam.iTextSharpLGPL
的替代方案吗?它基于一个古老版本的iText(于2009年7月7日发布),永远不会得到更新或错误修复。iText软件目前正在研究iText 7的Xamarin端口,该端口将继续更新。请与iText软件公司联系,将您的体重添加到此功能请求中。@PieroZito我使用
Xam.iTextSharpLGPL
(2015年更新),如果您知道其他选项,是否可以提供链接。你上面的评论说,
正在研究
,这并不奇怪,因为Xamarin仍然在研究evolving@GauravKP,我使用的是基于iTextSharp v.4.1.6的旧版本。此版本应该是他们更改许可证后的最后一个LGPL版本。另一个选项可以是PdfBOX,但我收到一些关于重复资源的错误,我发现问题是由IKVM引起的。