Hello,
Thanks for your feedback.
Our Test Team is compiling a temporary Spire.Office version for you. Once it is available, I will inform you at the first time.
Sincerely,
Lisa
E-iceblue support team
System.TypeInitializationException: The type initializer for 'sprួ' threw an exception. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at sprួ..cctor()
public void SpreadsheetPDFTest()
{
string strFileName = @"\\Mac\Dropbox\Source\source\Grain Silo\Test Data\staff list.xlsx.pdf";
string strTarget = @"\\Mac\Dropbox\Source\source\Grain Silo\Test Data\Redacted\staff list.xlsx.pdf";
string strSearchText = @"(\b)(Co-Founder)(\b)";
Spire.Pdf.PdfDocument pdf = new PdfDocument(strFileName);
TextFindParameter tfp = new TextFindParameter();
tfp = TextFindParameter.Regex;
foreach (PdfTextFind text in pdf.Pages[0].FindText(strSearchText, tfp).Finds)
{
text.ApplyHighLight(System.Drawing.Color.Gold);
}
pdf.SaveToFile(strTarget);
pdf.Dispose();
} public void SpreadsheetPDFTest()
{
string strXLSFileName = @".\staff list 2.xlsx";
string strFileName = @".\staff list.xlsx.pdf";
string strTarget = @".\staff list.xlsx.pdf";
string strSearchText = @"(\b)(Co-Founder)(\b)";
Spire.Xls.Workbook workbook = new Workbook();
// Convert XLSX to PDF
workbook.LoadFromFile(strXLSFileName);
workbook.SaveToFile(strFileName, Spire.Xls.FileFormat.PDF);
workbook.Dispose();
// Highlight PDF
Spire.Pdf.PdfDocument pdf = new PdfDocument(strFileName);
TextFindParameter tfp = new TextFindParameter();
tfp = TextFindParameter.Regex;
foreach (PdfTextFind text in pdf.Pages[0].FindText(strSearchText, tfp).Finds)
{
text.ApplyHighLight(System.Drawing.Color.Gold);
}
pdf.SaveToFile(strTarget);
pdf.Dispose();
}