Comments (4)
Solution: exchange 217 and 403 with each other.
Reason: You get that error because your y1 is smaller than y2.
Hint: in [x1,y1,x2,y2] the following must hold: x1 is smaller than x2 and y1 is bigger than y2.
From the documentation: x1,y1,x2,y2 where (x1, y1) -> top-left and (x2, y2) -> bottom-right in PDF coordinate space. In PDF coordinate space, the bottom-left corner of the page is the origin, with coordinates (0, 0).
from camelot.
@shivohmgupta Can you please post the PDF that raised this issue?
from camelot.
I had the same issue. In my case, the coordinates tool defined the origin as the top left rather than the bottom left corner of the PDF. So, the solution was to "reverse" the y-coordinates by taking the height of the page and subtracting the y-coordinates.
This post was useful: Hopding/pdf-lib#87 (comment)
from camelot.
Would there be a way to detect this sort of error and report it to the user? Even a hint phrase or a reminder that PDF coordinates are defined differently would be useful when debugging. (I ran into this issue and went through 3 Stack Overflow posts and 2 issues before landing here, and the solution worked)
from camelot.
Related Issues (20)
- Match size of Lines mask with Image Table
- mac m1 Ghostscript is not installed. HOT 3
- Difficulties with Multi-line headers. Rows shifted down. HOT 5
- OSS-Fuzz Integration HOT 2
- Error in PyPDF2 3.0.0 HOT 6
- Updated documentation idea / installation screencasts HOT 2
- Release 0.11.0 uses deprecated pandas encoding parameter
- [Feature Request] Replace text
- Strip more than 1 string
- Test failures on ppc64el (PowerPC architecture), linux
- [Feature Request / Question] Use different OCR engine HOT 1
- fail when detect abnormal border table HOT 1
- IndexError in lattice HOT 1
- Tables ignored in lattice mode HOT 1
- if (bbox_intersection_area(ba, bb) / bbox_area(ba)) > 0.8: ZeroDivisionError: float division by zero HOT 6
- How to combine tabular and non-tabular content from a PDF?
- CLI: Margins option not processed
- Camelot Dependency Tree HOT 1
- camelot running infinitely when reading pdf HOT 1
- NotImplementedError: File format not supported HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camelot.