2021年5月3日星期一

Why iText7 occur error "Unexpected ColorSpace: /CS0."?

I using iText7 Ver7.1.15

This code to get text of page:

PdfReader reader = new PdfReader(inputFile);  PdfDocument pdfDoc = new PdfDocument(reader, writer);  for (int page_no = 1527; page_no <= 1528; page_no++)  {          PdfPage page = pdfDoc.GetPage(page_no);                                       MyLocationTextExtractionStrategy strategy = new MyLocationTextExtractionStrategy();          string currentText = PdfTextExtractor.GetTextFromPage(page, strategy);   }                 

But it occur error:

Unexpected ColorSpace: /CS0.   

I try add source of iText7 and check, target source is the same with answer at: What to do with iText "Unexpected color space /CS0" type of exceptions

enter image description here

Why iText7 still occur error "Unexpected ColorSpace: /CS0."?

https://stackoverflow.com/questions/67378271/why-itext7-occur-error-unexpected-colorspace-cs0 May 04, 2021 at 11:04AM

没有评论:

发表评论