TextLineCollection causes crash. Could not resolve type with token 0100001c

I am trying to extract some text from a pdf with the syncfusion pdf package. I'm using this example:

I started the project by opening the Gettingstarted_PDFViewer solution. Then I added the PDF package and tried to extract text.
But when running the app on the phone (building is succesful) the following error occurs: Could not resolve type with token 0100001c

It crashes on this line:
TextLineCollection lineCollection = new TextLineCollection();

I tried all kind of things, but nothing helped so far.
Does anyone else know what this problem is?

Full error:
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not resolve type with token 0100001c (from typeref, class/assembly Syncfusion.Pdf.TextLineCollection, Syncfusion.Pdf.Portable, Version=16.3451.0.21, Culture=neutral, PublicKeyToken=null)
[mono-rt]   at (wrapper dynamic-method) System.Object.23(intptr,intptr)

Kind regards,
Mark


1 Reply

KC Karthikeyan Chandrasekar Syncfusion Team October 4, 2018 11:12 AM UTC

Hi Mark, 
We suspect that you are using .NET Standard project for Text Extraction so this issue occurs. Currently we do not have support for Text Extraction in .NET Standard project, and we have plans to implement this feature in our 2018 Volume – 4 release. We will update you once this feature is implemented. 

As a workaround we suggest you to create Portable project and make use of Text extraction, we have attached a simple sample in Portable for your reference. 

Steps to Create Portable Project: 

  1. Open Visual Studio 2015.
  2. Click New Project to create new project.
  3. Installed -> Templates -> Visual C# -> Cross-Platform
  4. Cross Platform App(Xamarin)
  5. Choose Blank App and Portable Class Library(PCL).
  6. Finally Click OK.

Revert me back if you have any concerns. 
Regards, 
Karthikeyan  


Loader.
Up arrow icon