Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sun Nov 11, 2018 4:44 am

Recently purchased product. Using .NET Core in a Azure Function App on a Windows machine. Getting error when calling ".ExtractText();" function. Tells me "System.Drawing Not Supported". I'm using Windows not Linux or OSX.

I have used the installed dll as well as the Nuget. I am also using paid version with key not free version.

The other post similar to this did not help me. Need more detailed answer please or refund!

storydata
 
Posts: 8
Joined: Sun Nov 11, 2018 12:03 am

Mon Nov 12, 2018 2:28 am

Dear storydata,

Thanks for your inquiry.
Do you install System.Drawing.Common?
And our Spire.PDF for .NET Core supports extracting text on Azure. To help us locate your issue quickly and accurately, please provide your input PDF here or send it to us([email protected]) via email. Thanks in advance.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Nov 12, 2018 4:25 pm

Sent pdf to support email. Yes I have System.Drawing.Common installed in the project.

storydata
 
Posts: 8
Joined: Sun Nov 11, 2018 12:03 am

Tue Nov 13, 2018 2:23 am

Hi Parker,

Many thanks for your file via Email.
After testing your case with Spire.PDF Pack(Hot Fix) Version:4.11.5, I could successfully extract text with .NET Core in a Azure App. Did you use this version? If you still have the issue with the version, please share us with following information.
1. The OS and Region information, e.g. Win7 64bit, China/Chinese.
2. A sample runnable project which could show your issue directly.
Thanks in advance.

Best wishes,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Nov 13, 2018 4:38 pm

So I shouldn't use the Nuget package, I should link the dll from the patch?

storydata
 
Posts: 8
Joined: Sun Nov 11, 2018 12:03 am

Wed Nov 14, 2018 1:37 am

Hi Parker,

Sorry to make you confused.
No, you could install our product(Spire.PDF Version:4.11.5) via NuGet. Has your issue been resolved with the latest version? If not, please share the information I mentioned in last post.

Many thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Nov 14, 2018 7:41 pm

I have sent an email to support with a small test project. It was larger than 2 Mib limit so I could post it here. As in the sample project I load the PDF which works but soon as I try to extract text from the reader I get the error.

I have attached screenshots to help also.
The test project uses the local Storage Emulator with a a blob container called "tempblob". The pdf I am trying to read is in the zip I emailed. I hope it helps you help me resolve this issue.

storydata
 
Posts: 8
Joined: Sun Nov 11, 2018 12:03 am

Thu Nov 15, 2018 1:58 am

Hi Parker,

Thanks for your post.
Sorry that we don't receive your email. Could you please send the sample project as well as the detailed StrackTrack text information instead of screenshot to us([email protected]) again? Besides, as for the size limit for attachments, you could upload the sample project using tools(e.g. DropBox or OneDrive) and share us the download link.

Sincerely,
Betsy
E-iceblue support team
Last edited by Betsy.jiang on Thu Nov 15, 2018 2:20 am, edited 1 time in total.
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Thu Nov 15, 2018 2:19 am

Just resent email with test project.

storydata
 
Posts: 8
Joined: Sun Nov 11, 2018 12:03 am

Thu Nov 15, 2018 7:42 am

Hi Parker,

Many thanks for your project.
I have reproduced your issue and logged it in our bug tracking system. We will try our best to fix it. Once there is any update, we will let you know.
Sorry for the inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Nov 16, 2018 9:19 am

Hi Parker,

After further investigation, we need more information to locate your issue.
We could reproduce the error(System.Drawing Not Supported) if we use the target framework .Net Standard 2.0, and there is no option for .Net Core in target framework(Project-->Properties-->Target Framework) when creating a default Azure Function App.
But the sample project you provided is target framework .Net Core 2.1, and I guess you change the framework manually by changing the properties in the file FunctionApp1.csproj, right? Your sample project cannot run successfully, there would be an error like "Cannot trigger the Function1.Function1" at runtime. We searched online and tried to change the target framework to .Net Core 2.1, but failed at runtime. As far as I know, Azure Function App is unable to change the target framework to .Net Core at present.

As for the error you mentioned in the first post, do you use the target framework .Net Standard 2.0? If not, please share a project which could run successfully with target framework .Net Core. And please tell us you encounter the issue locally or on Azure after deploying.
In the meanwhile, we will continue looking into the issue, if there is any update, we will notify you.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Nov 16, 2018 3:50 pm

Hi,

My function was created just like the sample I emailed you, by using the default template from Visual Studio 2017
new_project.png


You can change the target framework under properties. I tried 2.0 and 2.1 as well as I tried your new 4.11.8 which was released today and I still get the error.
properties.png


I assume your component would work with the default packages provided by Visual Studio 2017. I'm not sure what other information I could tell you other than that I simply used the defaults VS 2017 provides with their function project and added Spire.PDF, System.Drawing.Common, and WindowsAzure.Storage via Nuget.

storydata
 
Posts: 8
Joined: Sun Nov 11, 2018 12:03 am

Mon Nov 19, 2018 10:32 am

Hi Parker,

Many thanks for your information and sorry for late reply as weekend.
Sorry that there would be an error when running your sample project, see below:
error.png

I am using VS2017, but the target framework is .Net Standard(Project-->Properties-->Target Framework) and there is no option for .Net core when creating Azure Function App. Please share us following information to investigate further:
1. Does the sample project you provided for me work on your side?
2. What is your VS2017 version? I provide my VS version information, and tool information about Azure. Please share yours.
3. The OS and Region information, e.g. Win7 64bit, China/Chinese.
4. Tell us the issue you submitted in the first post occurs locally or on Azure after deploying.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Nov 21, 2018 6:05 pm

Hi.

Yes the project works for me. I started a new project in VS 2017 added your nuget package. I would suggest you create a new project in your VS2017, add your nuget package and copy the 7 lines of code I sent you in my project.

Answers to your questions.

1. Yes.
2. VS 2017 version 15.9.2. Net Framwork version 4.7.03056
3. Windows 10 64bit, United States/English. <-- Not sure why region matters, if you sell a product worldwide it should work in any region right?
4. It occurs locally and on Azure (US West Region data center).

storydata
 
Posts: 8
Joined: Sun Nov 11, 2018 12:03 am

Thu Nov 22, 2018 11:00 am

Hi Parker,

Many thanks for your information.
I have already created a default Azure Function, yet the framework is .Net standard as I said before. Now I have upgraded to VS2017 version 15.9.2, but unfortunately there is still no target framework .net core when creating a default Azure Function.
I checked with Azure support team, they told me now it is impossible to change framework to .NET core in Azure function. As for your Azure function, I think there is something difference between us.
Below is my Azure Function, please check the framework, and run it and check if it could reproduce the error(System.Drawing Not Supported).
http://www.e-iceblue.com/downloads/demo ... onApp8.zip

Normally, if the framework of your project is indeed .Net core, there would be no error. For testing, I use ASP.NET core Web application with framework .Net core, extracting text from your PDF works fine. Here is a sample project for your kind reference.
http://www.e-iceblue.com/downloads/demo ... onApp8.zip
Could you please use ASP.NET core Web application or .Net core console to solve the issue?
If there is any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDF

cron