Hello there,

On Fri, Feb 19, 2010 at 10:10 PM, Omar Chiyean <[email protected]> wrote:
> Is there a way to see how is character encoded the pdf that is being
> stripped??
>

PDFTextStripper textStripper = new PDFTextStripper(){

    @Override
    public void processTextPosition(TextPosition text){
        super.processTextPosition(text);

        PDFont font = text.getFont();

        Encoding fontEncoding = null;
        try {
            fontEncoding = font.getEncoding();
        } catch(IOException ioe){
            // Ignored
        }

        System.out.println(text.getCharacter() + " (font= " +font+ ",
fontEncoding=" +fontEncoding+ ")");
    }
};

Reply via email to