Incorrect coordinates in footer
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.7k
- Forks
- 579
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Hello
This is more of a discussion than an issue, but just to check if i'm doing something wrong. I'm generating a PDF using MPDF and trying to get coordinates for text in the footer. For some reason specifically the footer elements return invalid coordinates. For the footer element it's returning a negative value for the coordinates, as if it's outside the page.
I'm wondering if I'm passing insufficient amount of data or something to the main method or if you have any other advice.
Here's the code snippet
$parser = new \Smalot\PdfParser\Parser();
$pdf = $parser->parseContent($content);
$pages = $pdf->getPages();
foreach ($pages as $pageNumber => $page) {
foreach ($page->getDataTm() as $item) {
# getting a negative value for some of the footer items
}
}
Thank you
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided Parser->parseContent(), getPages(), and page->getDataTm() call chain, then reproduce the reported negative footer coordinates using a representative PDF. The issue provides no PDF, source file, or test; done would require determining whether the coordinates are incorrect and documenting a reproducible correction or expected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100