pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tate, Hongliang Tian(田洪亮) <tatet...@gmail.com>
Subject Why does TextPosition.getHeight() and PDFont.getFontHeight() return 0?
Date Wed, 15 Feb 2012 15:36:22 GMT

   Why are the heights of some TextPosition objects generated from
PDFStreamEngine is 0? In another words, I found that
TextPosition.getHeight() returns 0.

   What I am trying to do is to extract text and their positions and sizes
from PDF.  So I need to know the height of TextPosition object. To repeat
the problem, you can check out the attached PDF. All heights of
TextPosition objects that represent the title string "Accelerating SQL
Database Operations on a GPU with CUDA" are 0. After examining the debug
information, I found PDFont.getFontHeight(byte[] c, int offset, int length)
returned 0 for those TextPosition objects, which is why the height of
TextPosition is 0.

   So why does the TextPosition.getHeight() and PDFont.getFontHeight()
return 0?  Is there a way to work around?

   Thanks ahead.

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message