Blog Post

PSPDFKit Libraries 1.4 for Java and .NET: Text Extraction, Trial Flow, Modernization

We’re thrilled to announce the release of PSPDFKit Libraries 1.4 for Java and .NET. This release includes text extraction, a smoother getting started and trial experience, a modernized example project using .NET 5, and plenty of bug fixes.

Extract Text

In this release, we added a flexible text extraction API to the Page classes for Java and .NET. You can now call GetTextLines on a Page, which will return a TextBlock containing the text string and position for each line of text on the page.

Using the text extractor is easy:

var document = new Document(new FileDataProvider("documentWithText.pdf"));
var textLines = document.GetPage(0).GetTextLines();
foreach (var textLine in textLines)
{
    Console.WriteLine(textLine.GetText());
    var linePosition = textLine.GetRect();
    // .. do something with `linePosition`..
}
PdfDocument document = PdfDocument.open(new FileDataProvider(new File("documentWithText.pdf")));
List<TextBlock> textLines = document.getPage(0).getTextLines();
for (TextBlock textLine : textLines) {
    System.out.println(textLine.getText());
    Rect linePosition = textLine.getRect();
    // .. do something with `linePosition`..
}
val document = PdfDocument.open(FileDataProvider(File("documentWithText.pdf")))
val textLines = document.getPage(0).textLines
for (textLine in textLines) {
    println(textLine.text)
    val linePosition = textLine.rect
    // .. do something with `linePosition`..
}

Check out our text extraction guides for Java and .NET for more details.

Smooth Trial Flow

With this release, we’ve made it easier to get started and try our product. Using the new initializeTrial() method allows you to try the libraries without a license key! Check out our brand-new Get Started guides for step-by-step instructions on how to get up and running quickly with PSPDFKit.

.NET 5

For our PSPDFKit for .NET customers, you can now run our Catalog example application with .NET 5.

Final Notes

We’ve been hard at work on some important bug fixes and performance improvements to include in this release. Check out the changelogs for Java and .NET for more details.

Author
Amit Nayar Android Team Lead

Amit would rather spend his time making pizza, poking campfires, eating cheese and crisps, or climbing trees, but sadly he has to write great software to help save the world from deforestation. It’s a hard life, but someone’s gotta do it.

Explore related topics

Related products
Share post
Free trial Ready to get started?
Free trial