Questions tagged [slate]

Slate is a Python package that can extract text from a PDF file.

Slate, available at https://pypi.python.org/pypi/slate, takes as input a file-like object representing a PDF file and returns the text from the file.

78 questions
1
vote
1 answer

Adding Bootstrap 4 to Slate V1 - Getting two Index in Chrome Developer Tools

I'm a newby when it comes to web development. I have done some development before but not with regards to Web. I understand the basics of what CSS is, what Javascript does and the basic HTML. I've installed Slate, and I've downloaded the Bootstrap…
user654378
  • 29
  • 1
1
vote
1 answer

Is there a way to update a Slate change after the current change completes?

Basically I want to make inlines that can be updated from the end if the cursor/selection is there. However it seems to be overriding changes like deleting from the end an inline. I was attempting to do something like this (with guidance from…
Martin
  • 21
  • 1
  • 4
1
vote
1 answer

Unexpected EOF, using slate to parse PDF file on Python 2.7.12

I picked up O'Reiley's Data Wrangling with Python by Jacqueline Kazil and Katherine Karmul. In ch.5, pg.94, I'm running the following code. import slate pdf = 'EN-FINAL Table 9.pdf' with open(pdf) as f: doc = slate.PDF(f) for page in…
jjjack1
  • 11
  • 1
  • 4
1
vote
0 answers

Python Slate Library: PDF text extraction concatenating words

Just trying to extract the text from a PDF in Python, using the Slate Library and PyPDF2. Unfortunately some PDFs are being output with multiple words merged/concatenated together. This seems to happen intermittently, for example for some PDFs words…
Sam Heather
  • 1,493
  • 3
  • 19
  • 42
1
vote
1 answer

Slate in Python stumbles on foothills

Trying to parse PDFs into text and have been trying to start with Slate. However, just following the basic example posted everywhere, I get the following: >>> import slate >>> with open('pytest.PDF') as fp: ... doc = slate.PDF(fp) ... Traceback…
0
votes
0 answers

onChange is not called when used with userEvent.type from React testing library

I am using RTL with Jest to test a Slate editor. I use .type to emulate a user typing into the editor and expect that Slate's onChange will be called. However, this does not happen. Here's the sandbox where I reproduced the issue. To reproduce the…
George Eracleous
  • 4,278
  • 6
  • 41
  • 50
0
votes
0 answers

Slate Editor - Clickable Image

I want to allow my slate editor to insert an image with the destination URL and make a clickable image to the destination URL: I do not know what the right approach is. Here is my insert image…
DevosJS
  • 21
  • 2
0
votes
0 answers

How to properly redirect subdomains in nginx

I have two nginx files located /etc/nginx/conf.d/ 1st file ` docs.example.conf` server { listen 80; server_name docs.example.su; return 302 https://docs.example.su$request_uri; } server { listen 443 ssl; ssl_certificate…
As65
  • 3
  • 3
0
votes
0 answers

Slate Js - Backspace not working after adding a node element

I'm working on a customization for the Slate editor where a white space is automatically added to the end of a node named "rr-attribute". While the space gets added successfully, an issue arises after the insertion: pressing backspace doesn't remove…
0
votes
0 answers

I want to split a Slate editor input into parts by click split&add button

I have Slate editor input and Split&Add button on react typescript. I want the input to be split into two separate inputs from the point cursor stands. For example, if I have "I want to split this text into two parts. Here is the first part (assume…
0
votes
0 answers

Slate.js with react does not display changes

I am learning Slate.js text editor for react and I have problem. When I for example press button to change text to

nothing is changed in textarea, but when I inspect code in Elements panel of browser I can see changes (element changing from…

0
votes
0 answers

Programmatically get the user's 'Your Files' folder in Palantir Foundry

I need to programmatically retrieve the current user's "Your Files" folder address or resource id in Palantir Foundry. Is it feasible? Any help would be appreciated. Thanks!
0
votes
0 answers

How to render JSON output from Rich-text-editor like (plate) in react js

In a sample project , i want to use a rich-text editor using (plate, slate, tiptap or any other popular text editor). from plate editor getting output in form of Json like this [ { type: 'p', children: [ { text: 'This is editable plain text with…
0
votes
1 answer

My code extracts texts from PDF files, and compares the info. It seems that my code fails while executing Pdfs of large sizes

I am able to use my code to compare PDFs of smaller sizes, but when it is used for large size PDFs it fails and shows all sorts of error messages. Below is my code: ` import pdfminer import pandas as pd from time import sleep from tqdm import…
hexapod
  • 25
  • 6
0
votes
0 answers

I am getting this error - raise ValueError("Unsupported predictor value: %d"%ft) TypeError: %d format: a real number is required, not bytes

I am trying to extract texts from PDF and compare the info, finally saving it as an excel file. But while I am running it, (the code is given below), I get the error. I have provided the whole Traceback. ` import pdfminer import pandas as pd from…
hexapod
  • 25
  • 6