Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 683 by
clouds.f...@gmail.com: FPDFText_GetRect returns rects that have some offset
https://bugs.chromium.org/p/pdfium/issues/detail?id=683What steps will reproduce the problem?
1. download the file
https://www.adobe.com/products/postscript/pdfs/PLRM.pdf (attached)
3. run the code
auto page = FPDF_LoadPage(doc, 3); // read the page 4
FPDF_GetPageWidth(page); // width == 531.00
FPDF_GetPageHeight(page); // height == 666.00
auto textpage = FPDFText_LoadPage(page);
uint16_t text[20];
FPDFText_GetText(textpage, 0, 8, text); // text == "Contents"
FPDFText_CountRects(textpage, 0, 8); // return value 1
double left, top, right, bottom;
FPDFText_GetRect(textpage, 0, &left, &top, &right, &bottom);
// left == 137.06, right == 169.84, top == 692.98, bottom == 687.21
What is the expected output? What do you see instead?
The rect { left = 137.06, right = 169.84, top = 692.98, bottom = 687.21 } is expect to be inside { left = 0, right = 531.00, top = 666.00, bottom = 0 }, but 692.98 > 666.00.
I've tried save the document via pdf printer (or save as pdf, which converts the pdf to PDF-1.7 version), but the problem consists.
What version of the product are you using? On what operating system?
the latest master, macOS/Windows
Please provide any additional information below.
Attachments:
PLRM.pdf 7.4 MB
--
You received this message because:
1. The project was configured to send all issue notifications to this address
You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings