在Android Studio中,要使用PDFBox从PDF文件中提取原始字符串文本,你可以遵循以下步骤:
implementation 'org.apache.pdfbox:pdfbox:2.0.24'
implementation 'org.apache.pdfbox:fontbox:2.0.24'
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;
public String extractTextFromPDF(String filePath) {
    String text = null;
    try {
        PDDocument document = PDDocument.load(new File(filePath));
        PDFTextStripper stripper = new PDFTextStripper();
        text = stripper.getText(document);
        document.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return text;
}
String filePath = "path_to_your_pdf_file";
String extractedText = extractTextFromPDF(filePath);
System.out.println(extractedText);
确保替换"path_to_your_pdf_file"为你想要提取文本的实际PDF文件的路径。
这样,你就可以在Android Studio中使用PDFBox从PDF文件中提取原始字符串文本了。记得在使用PDFBox时,要处理可能抛出的IOException。