Set Scaling When Extract Text #1047
ArunaAcharya
started this conversation in
Ask for help with specific PDFs
Replies: 1 comment
-
Hi @ArunaAcharya, and thanks for your interest in this library. Without access to the PDF or another sample PDF that demonstrates your situation, it will be difficult to give specific advice. But one thing you might try is to set the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I will not be able to share the PDF because it is a confidential document. I have a machine generated pdf from where I have to extract text using pdf plumber. let's say in a table there are columns X Y and Z. Sometimes the element in X is very long and it gets overlapped with Y and it gets very difficult to use regex on those overlapped text. Is there any way that I can modify the scaling of the pdf according to my need so that the text won't overlap. one of my solutions was this but it is not very effective because I have to set the scaling as per the template.
def PDFTextState__init__scale_fix(self: PDFTextState) -> None: self.font: Optional[PDFFont] = None self.fontsize: float = 0 self.charspace: float = 0 self.wordspace: float = 0 self.scaling: float = 44 self.leading: float = 0 self.render: int = 0 self.rise: float = 0 self.reset() PDFTextState.__init__ = PDFTextState__init__scale_fix
Beta Was this translation helpful? Give feedback.
All reactions