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.

Mon Apr 12, 2021 1:42 pm

I loading pdf document, converted from docx, using Freespire.Pdf.
Code: Select all
            Spire.Pdf.PdfDocument document = new Spire.Pdf.PdfDocument();
            document.LoadFromFile(filepath);

But when I tried to find text,
Code: Select all
            PdfPageBase page = document.Pages[0];
            var collection = page.FindText("Date", TextFindParameter.WholeWord).Finds;
            PdfBrush brush = new PdfSolidBrush(System.Drawing.Color.Black);

Got unexpected error.
Code: Select all
System.UnauthorizedAccessException: "Access to the path 'C:\WINDOWS\Fonts\Mysql' is denied."

Why it is try to find Mysql on fonts? Why MySQL?

Derpizder1
 
Posts: 2
Joined: Mon Apr 12, 2021 1:37 pm

Tue Apr 13, 2021 3:47 am

Hello,

Thanks for your inquiry!

To help us reproduce and investigate your issue quickly and efficiently, please provide us with your input file, target framework (E.g. .Net Framework 4.6.1), system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese) for reference. You can send them to us via email ([email protected]).

Thanks in advance!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Apr 13, 2021 4:26 pm

Can't provide doc, but about other things.
Doc converted from docx to pdf by Using Word 2016.
I used this pdf to edit.
Windows 10 x64, .NET Core 5

Derpizder1
 
Posts: 2
Joined: Mon Apr 12, 2021 1:37 pm

Wed Apr 14, 2021 3:44 am

Hello,

Thanks for your inquiry!

I created a PDF by Word2016 and then loaded and found the text “Date” by your code with the both FreeSpire.PDF V7.2.0 and latest Spire.PDF V7.3.3 in Windows 10 x64, .NET Core 5, but still not reproduce your issue. Here I also attached my test PDF.
words.zip


First, did you embed the fonts used in your doc file to the PDF when you convert it by the Word2016? If not, I recommend that you could have a try. Second, could you please try your code with the latest Spire.PDF V7.3.3 to see whether the issue still exists? Since the commercial version has more fixes, and maybe it could solve your issue.

If the issue still persists after you trying the above methods, it is likely that the issue you encountered is mainly related to the data in the input file, so your file is very important for us to investigate your issue. You can remove the security data of your input file as long as the modified files could reproduce your issue, and then send it to us via email ([email protected]). We promise to keep your documents confidential, and we will not use it for any other purpose. Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Sun Apr 25, 2021 9:50 am

Hello,

Hope you are doing well!

Has the issue been solved now? Could you please give us some feedback at your convenience?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF