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.

Tue Nov 15, 2022 1:49 pm

Hi we are using the Spire.Doc 10.11.0 and Spire.Pdf 8.11.0 with license to manipulate document.
If we apply watermark on the document and then after that try to FindText for redacting or for highlighting , FindText method can't find words even those words do exist in text.
I believe this was working in some previous versions but can't tell you in which. Between each action we are saving document to blob as stream, and getting from stream for new action.
For watermarking pages we are using page.Canvas.DrawRectangle.
Is something change?

bstojanovic
 
Posts: 45
Joined: Mon Sep 28, 2020 2:54 pm

Wed Nov 16, 2022 2:22 am

Hello,

Thanks for your inquiry.
I simulated a pdf and created a console project with .Netframework4.0 to test your scenario. I did note the issue you mentioned. However, to help us fix your issue more accurately, please offer the following message. Thanks for your assistance in advance.
1) Your full test code that can reproduce your issue.
2) Your input Pdf document, you can attach here or send it to us via email ([email protected]).


Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Wed Nov 16, 2022 10:32 am

We try with more then one file, both redact and highlight das not work , FindText can't find any word after watermark. If we do only redact or highlight FindText do find those words.

Here is code for watermark and then highlight :
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"Path\Onelog 11 Implementation Guide.pdf");
string text = "Test";

foreach (PdfPageBase page in doc.Pages)
{

PdfTilingBrush brush = new PdfTilingBrush(new SizeF(page.Canvas.ClientSize.Width / 2, page.Canvas.ClientSize.Height / 3));
brush.Graphics.SetTransparency(0.3f);
brush.Graphics.Save();
brush.Graphics.TranslateTransform(brush.Size.Width / 2, brush.Size.Height / 2);
brush.Graphics.RotateTransform(-45);
brush.Graphics.DrawString(text, new PdfFont(PdfFontFamily.Helvetica, 24), PdfBrushes.Violet, 0, 0, new PdfStringFormat(PdfTextAlignment.Center));
brush.Graphics.Restore();
brush.Graphics.SetTransparency(1);
page.Canvas.DrawRectangle(brush, new RectangleF(new PointF(0, 0), page.Canvas.ClientSize));
}

List<string> dictionary= new List<string> { "Onelog", "Install" };
foreach (PdfPageBase page in doc.Pages)
{
foreach (string word in dictionary)
{
PdfTextFind[] result = page.FindText(word, TextFindParameter.IgnoreCase).Finds;

foreach (PdfTextFind find in result)
{
find.HighLight(Color.Yellow);

}
}
}
doc.SaveToFile(@"path\Onelog 11 Implementation Guide.pdf");

bstojanovic
 
Posts: 45
Joined: Mon Sep 28, 2020 2:54 pm

Thu Nov 17, 2022 1:40 am

Hello,

Thanks for your feedback.
I have logged this issue into our bug tracking system with the ticket number SPIREPDF-5623. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Fri Dec 02, 2022 11:19 am

Hi is there any info about resolving this bug?

bstojanovic
 
Posts: 45
Joined: Mon Sep 28, 2020 2:54 pm

Mon Dec 05, 2022 1:41 am

Hello,

Thanks for your following-up.
This is issue with the number SPIREPDF-5623 has been in test phase. And I have urged our test team to speed up testing your issue. Once the official version inculding the fix is released. I’ll inform you in time.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Dec 15, 2022 8:16 am

Hello,

Hello,

Thanks for your patience!
Glad to inform you that we just released Spire.PDF 8.12.5 which fixes the issue with SPIREPDF-5623.
Please download the new version from the following links to test.
Website download link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget download link: https://www.nuget.org/packages/Spire.Pdf/8.12.5

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Thu Dec 15, 2022 1:14 pm

Hi after allaying spire.pdf 18.12.5 as suggested we have problem converting all documents .doc, .docx, .odt with code :
Document document2=new Document() ;
try {
document2 = new Document(memoryStream, Spire.Doc.FileFormat.docx);//or any of the above formats
}
catch(Exception e)
{
//log
}
With error :
Message "Could not load type 'spr㙛' from assembly 'Spire.Pdf, Version=8.12.5.0, Culture=neutral, PublicKeyToken=663f351905198cb3'." string
We are using for documents Spire .Doc 10.11.9.

please check this as soon as you can because it is not possible for us to use it without converting possibility .

bstojanovic
 
Posts: 45
Joined: Mon Sep 28, 2020 2:54 pm

Fri Dec 16, 2022 9:51 am

Hello,

Thanks for your feedback.
Please kindly note that Spire.Pdf and Spire.Doc are our independent products.If you directly use them together in the same project, there will be dlls conflicts. Please use our Spire.Office and reference the corresponding dlls(Spire.Pdf.dll and Spire.Doc.dll). In addition, the issue with SPIREPDF-5623 is solved in latest version of Spire.Pdf but hasn't been synced to the latest version of Spire.Office. Once the official Spire.Office including this fix is released, I’ll inform you in time.


Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Wed Jan 11, 2023 9:49 am

Hello,

Greeting from E-iceblue.
Has your issue been solved? Could you please give some feedback at your convenience?

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Wed Feb 08, 2023 4:37 pm

Thank you this issue is closed with latest Spire updates.
Regards

bstojanovic
 
Posts: 45
Joined: Mon Sep 28, 2020 2:54 pm

Thu Feb 09, 2023 1:33 am

Hello,

Thanks for your feedback.
If you have any issue in the future, just feel free to contact us.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.PDF

cron