Ex: Text = "小径油穴付き超硬ドリル 2Dタイプ
Small Diameter Carbide Drill with Internal Coolant Supply
(2D t ype) "
Result =
- Code: Select all
小S径a油 き超硬ド ル 2D
m ll Diam穴付eter Carbide Drilリl with Interタイnal Coプolant Supply
(2D type)
- Code: Select all
string strTargetPage = @"D:\admin\SpirePDF\p14.pdf";
Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
doc.LoadFromFile(strTargetPage);
PdfTableExtractor extractor = new PdfTableExtractor(doc);
PdfTable[] tableLists = extractor.ExtractTable(0);
if (tableLists != null && tableLists.Length > 0)
{
int iTable = 0;
foreach (PdfTable table in tableLists)
{
iTable += 1;
int iTotalRow = table.GetRowCount();
int iTotalCol = table.GetColumnCount();
//Loop though the row and colunm
for (int iRow = 0; iRow < iTotalRow; iRow++)
{
for (int iCol = 0; iCol < iTotalCol; iCol++)
{
//Get text from the specific cell
string text = table.GetText(iRow, iCol);
}
}
}
}
Note: i try with Ver 8.1.0, it extract ok.
Sample data: https://drive.google.com/file/d/1ACR5Mb ... share_link