primordic/IssueDupesLite huggingface dataset:
Repository: jquery-archive/PEP

Issue #223: pepjs npm package is unusable
Created: 2015-09-30T00:29:04Z
https://www.npmjs.com/package/pepjs
The package seems to just be a clone of this git repo. If I wanted to use pepjs in my application, I would either have to:

Build pepjs as part of my build, or
Configure something like browserify to understand ES6 import and directly reference pointerevents.js

It would be much more helpful if the pepjs npm package simply contained a copy of https://code.jquery.com/pep/0.3.0/pep.js. It's CommonJS compatible, so it can be easily incorporated without having to use option 1 or 2.
I'd be happy to submit a pull request fixing this for package.json, but wanted to check here first to ensure that I'm not off-base with this issue.

Duplicate issue #202: Published to NPM without dist or "main" field in package.json
Created: 2015-07-07T23:53:59Z
Thank you for your work on this module.
This module is unusable as published on NPM. Modules should probably only be published to NPM with a require-ready version of the module published. I'd advise have an NPM prepublish step that builds and to add a "main" field in your package.json that points to dist/pep.js.

Closing comment (2015-10-28T15:40:34Z): Closing as a duplicate of #223.
Repository: jquery-archive/PEP

Issue #279: PEP event just firing every second time
Created: 2016-04-22T12:21:51Z
Browser: Google Chrome
Version 49.0.2623.112 m (64-bit)
Example: [http://codepen.io/OrellBuehler/pen/aNjwrG]
PEP-Version: 0.4.1
jQuery: 1.9.1
Event-Type: pointerdown
Description: When you first click on an element with a pointerdown listener then the event gets fired. If you then click on the same element the event doesn't get fired(thats the problem). But if you click beside the element and then on the element the event gets fired again.

Duplicate issue #292: PEP skipping first event (pointerdown)
Created: 2016-06-02T07:21:44Z
I have noticed that PEP skips the fist event sometimes. In my cases it happened after clearing a canvas or when showing a Boostrap Modal for the second time (buttons event handlers were only invoked the second time).
The stupid fix below removes the problem but I'm sure it's not the way to go.
  mousedown: function(inEvent) {
            if (!this.isEventSimulatedFromTouch(inEvent)) {
                var p = mouse__pointermap.get(this.POINTER_ID);
                var e = this.prepareEvent(inEvent);
                if (!HAS_BUTTONS) {
                    e.buttons = BUTTON_TO_BUTTONS[e.button];
                    if (p) { e.buttons |= p.buttons; }
                    inEvent.buttons = e.buttons;
                }
                mouse__pointermap.set(this.POINTER_ID, inEvent);
                p=undefined; // The error occurs when p is defined.
                mouse__pointermap.delete(this.POINTER_ID); //Clear it
                if (!p) {
                    _dispatcher.down(e);
                } else {
                    _dispatcher.move(e);
                }
            }
        },

Closing comment (2016-06-02T15:49:12Z): This appears to be a duplicate of #279.
Repository: jquery-archive/PEP

Issue #159: Create release script
Created: 2015-02-06T00:48:14Z
Use jquery-release
 Publish to jQuery CDN
 Publish to Bower
 Publish to npm
 Update samples in gh-pages


Manually register the Bower package after the first release

Duplicate issue #169: Publish on NPM
Created: 2015-03-09T15:09:39Z
That would be nice to just to npm install PEP, instead of having to clone the repo etc.

Closing comment (2015-03-09T15:10:55Z): This is already being tracked in #159. Expect a release soon.
Repository: jscs-dev/node-jscs

Issue #511: Disallow space before/after dot operator
Created: 2014-07-07T23:07:37Z
I'd like to require dots to show up at the end of lines, as opposed to the beginning of new lines.
// Good
a.b.
  c()

// Bad
a.b
  .c();

And I'm guessing other people will want the opposite. I scanned the existing rules but couldn't find anything that would allow this. Did I miss something or do we need a new rule?

Duplicate issue #1094: Feature Request: placement of dot in member expressions
Created: 2015-02-20T16:26:28Z
Hi JSCS team!
We need the rule that validates placement of  . in member expressions, if the members are not on same line
line of object
promise.
    then().
    then().
    then();

very.
    very
    ['very-deep'].
    property;
line of property
promise
    .then()
    .then()
    .then();

very
    .very
    ['very-deep']
    .property;
Our codestyle explicitly describes the requirement of writing dot on new line (the second example), but we can't control it using jscs.
Are there any plans to make such rule?
/cc @markelog

Closing comment (2015-05-22T14:32:56Z): I don't think we are regarding . as a operator the rule?
Related to #511: #511 (comment)
Repository: jscs-dev/node-jscs

Issue #92: Rules for spaces inside various parens
Created: 2013-12-09T12:24:40Z
In the jQuery JavaScript style guide, whitespace is added inside various parens, round and square. A few samples:
array = [ a, b ];
foo( options, object[ property ] );
For function calls, there are exceptions to this rule:
// Function with a callback, object, or array as the sole argument:
// No space on either side of the argument
foo({
    a: "alpha",
    b: "beta"
});

// Function with a callback, object, or array as the first argument:
// No space before the first argument
foo(function() {
    // Do stuff
}, options );

// Function with a callback, object, or array as the last argument:
// No space after after the last argument
foo( data, function() {
    // Do stuff
});
I have no idea how much effort it is to write rules for this. Before I look into that, I'd like to hear from someone if this is reasonable and would be merged. Maybe some hints on how to implement it?

Duplicate issue #590: Enhance requireSpacesInsideParentheses to support jquery-like style
Created: 2014-08-24T20:07:29Z
In the jquery style guide, if a ( is followed by a curly brace { or square bracket [, space is not added.
For example:
Valid case
foo({
    bar: 'one',
    baz: true
});
Invalid case
foo( {
    bar: 'one',
    baz: true
} );

Closing comment (2014-08-25T09:04:33Z): Duplicate of #92
Repository: jscs-dev/node-jscs

Issue #197: Has someone considered doing one that follows Google's JS style guide? 
Created: 2014-01-21T01:04:07Z
Google has published their style guide here. It'd be great if made a file I can drop in to my apps to be sure I'm following their style guides.
I figure it's working out great for them, so why no follow a sane approach?

Duplicate issue #268: Add a default preset
Created: 2014-02-25T10:11:50Z
Currently jscs does nothing without explicit configuration files, which seems to me like a bad default. I suggest adding a default preset, based on the Google JavaScript style guide. Along with the existing jquery preset, jscs would cover the two most common style guides (esformatter does the same, Google is default, jQuery preset is bundled).
The only problem with this approach might be that some people don't want to use any of the default settings. For this case, you could provide a noop preset that does nothing, so if I want to have full control over the configuration, I'd use preset: "noop" and go from there.
If that seems way too crazy, keep the current noop behaviour as the default and just bundle a google preset that I can use as a sane starting point.
This somewhat duplicates #250. I don't agree with the notion of "But jscs couldn't have a default options so i'm sceptical." though, as outlined above.

Closing comment (2014-03-03T22:29:25Z): I'm fine with not having a default, while bundling both "jquery" and "google" presets. It looks to me like the .jscsrc you have in this repo could be used as a starting point for the google preset. What do you think?
By now very much a duplicate of #197.
Repository: jscs-dev/node-jscs

Issue #1637: Problems with disallowSpacesInFunctionExpression and beforeOpeningRoundBrace, if I use async functions
Created: 2015-08-07T09:17:35Z
It looks like this code
await* files.map(async function(file) {
  // ...
})

throws an error, if I use disallowSpacesInFunctionExpression with beforeOpeningRoundBrace: true and will be auto-fixed to asyncfunction.
It looks like using an arrow function here works.

Duplicate issue #1813: "Illegal space before opening round brace" for async anonymous functions
Created: 2015-09-28T07:49:41Z
Using 2.1.1 and "esnext": true, this example doesn't work, but is compiled by Babel:
// Illegal space before opening round brace
beforeEach(async function() {
  await doFoo();
});

However these alternatives work:
beforeEach(function() {
  doFooSync();
});

beforeEach(async function beforeEach() {
  await doFoo();
});

beforeEach(async () => {
  await doFoo();
});

When beforeEach(function() { works, I'd expect beforeEach(async function() { to work, too.

Closing comment (2015-09-28T07:52:18Z): Could be related to #1637, because auto-fixing results in beforeEach(asyncfunction() {. I'll try it.
Yeah, this is fixed on master. Could you please publish this as version 2.1.2?
Repository: jscs-dev/node-jscs

Issue #1232: requirePaddingNewLinesAfterBlocks seems overly strict
Created: 2015-04-02T05:27:52Z
callingAFunction(
  with,
  another,
  function() {
    // ...
  }
);

// more code
This results in Missing newline after closing curly brace. IMO the function call is a block in itself, so the newline should be required after it. Not after the nested anonymous function.
But JSCS prefers this – which should IMHO be wrong:
callingAFunction(
  with,
  another,
  function() {
    // ...
  }

);
// more code

Duplicate issue #1298: requirePaddingNewLinesAfterBlocks: ignore "});" case
Created: 2015-04-23T15:11:54Z
Just one little annoyance with this rule. Often times, I write code like this:
_.each(items, function(item){
    // do something
});
Right now, this results in a style violation, but I don't think it should. To fix the violation, I have to change the code to this:
_.each(items, function(item){
    // do something
}

);
And that looks terrible! Can this rule be revised to "pass" a block followed by a closing parent followed by punctuation?

Closing comment (2015-04-23T15:35:40Z): Thanks for contributing! This should be fixed in master already (ec2f2a2). Similar to #1232.
There hasn't been another release yet though so if you want you can add the commit to your package.json or wait.
"jscs": "jscs-dev/node-jscs#ec2f2a2"
// or 
"jscs": "jscs-dev/node-jscs#master"
Repository: jscs-dev/node-jscs

Issue #41: Validate bad variable names
Created: 2013-08-20T08:30:25Z
I think we should add a config field which can validate bad variable names.
All one- two-symbol vars, expect in-loop vars like i, j. Abstract names like item.

Duplicate issue #612: add rule for disallowing naive variables
Created: 2014-08-31T00:23:16Z
Some variable patterns are not preferred since it hurts readability. For example,
var tmp = 123; // what the heck of tmp? It should be specific
var arr = "hello world".split(" "); // arr is meaningless. Variable words would be better
Is this kind of rule aligned with JSCS goals? If yes, I can contribute a PR.

Closing comment (2015-03-17T07:26:26Z): Duplicate of #41
Repository: jscs-dev/node-jscs

Issue #875: New Rule: (disallow|require)SpacesInsideAccessBrackets
Created: 2015-01-01T20:07:31Z
In line with disallow/requireSpacesInsideArrayBrackets, maybe something like "disallow/requireSpacesInsideAccessBrackets":
disallowSpacesInsideAccessBrackets = true;
// VALID
foo[0];
// INVALID
foo[0 ];
foo[ 0];
foo[ 0 ];
requireSpacesInsideAccessBrackets = true;
// VALID
foo[ 0 ];
// INVALID
foo[0];
foo[0 ];
foo[ 0];

Duplicate issue #1122: Request: disallow spaces when indexing into array or object
Created: 2015-02-28T01:51:06Z
Maybe there's an existing way to do this, that I've missed. But I would like to ensure that you can't do arr[ 0 ] or obj[ prop ]. However - I do have requireSpacesInsideArrayBrackets: all, so it shouldn't conflict with that

Closing comment (2015-10-02T20:42:25Z): I think this is the same as #875 if I'm not mistaken?
Repository: jscs-dev/node-jscs

Issue #1045: Add `except` option for RequireCapitalizedComments
Created: 2015-02-11T16:40:57Z
Hello again!
This is a suggested feature to allow for certain exclusions to this rule, e.g:
"requireCapitalizedComments": {
    "allExcept": ["istanbul", "jshint", "jscs"]
}

istanbul | jshint - see Inline Configuration section | jscs
This allows hint comments to be ignored.
What do you think?

Duplicate issue #837: exceptions for requireCapitalizedComments
Created: 2014-12-16T15:38:15Z
I like the requireCapitalizedComments rule, but I ran into the problem, that some tools like jshint or istanbul require their inline configuration to be lowercase.
For example:
/* istanbul ignore else  */
if (foo.hasOwnProperty('bar')) {
    // do something
}
isn't working with the requireCapitalizedComments rule.
My suggestion:
requireCapitalizedComments should accept an array of strings. These words can be exceptions to the upper case rule.
So with
requireCapitalizedComments: ["globals", "istanbul", "jshint"]

the above example would work.
(The same could be done for disallowCapitalizedComments, too.)
Any thoughts?

Closing comment (2015-02-12T11:27:25Z): Dup of #1045
Repository: jscs-dev/node-jscs

Issue #244: requireCurlyBraces one-statement / one-expression exception
Created: 2014-02-14T01:04:15Z
"requireCurlyBraces" is a great option but needs an exception. The only time it's acceptable to ignore it is for early returns or continuations.
Example from our Fabric.js:
 if (!target) return;
Or with continue:
if (!this._objects[i] || !this._objects[i].active) continue;
Example from Underscore:
if (iterator.call(context, obj[i], i, obj) === breaker) return;
Example from Angular:
if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
etc.
Most of the time, I want if statements to have curly braces, except when there's 1 statement in its body, such as return or continue.
I couldn't find a way for JSCS to ignore these, hence the request.
I could think of 2 levels of allowance:

Only allow "empty" statements, such as  return;, continue;, break;
Only allow one statement, such as return false;, return foo();, etc.

I'm leaning towards 2nd. I noticed that both Underscore and Angular use the latter as well.

Duplicate issue #426: Allow brace-less `if` when the whole statement is on one line
Created: 2014-06-06T18:21:25Z
I would like to specify that:
if (whatevs)
  doOrDie();
is unacceptable but not lose the handsome:
if (!necessity) return;
like this request from one big dreamer: jshint/jshint#474
except in jscs because it's stylish

Closing comment (2014-06-07T15:27:39Z): Sounds like a duplicate of #244
Repository: jsvine/pdfplumber

Issue #242: Text capturing without tabular 
Created: 2020-08-02T08:38:39Z
Is there any way I can extract only the text information without the tabular data

Duplicate issue #300: How to extract text and tables from pdf pages and delete duplicate text of tables from the result text?
Created: 2020-10-28T07:51:32Z
What are you trying to do?
I need to extract both text and tables from pdf pages. And the tables' content should not exist in the text part.
What code are you using to do it?
page.extract_text()
page.extract_tables()
Expected behavior
For example, if a pdf page is like:
line1
line2
line3
table_a
line4
table_b
line5
line6
I want a result like:
[text, table_a, text, table_b, text]
Actual behavior
I can only get the whole text by using extract_text(), but I dont want the table part.

Closing comment (2020-10-28T09:27:39Z): Hi @cjmqwerty Appreciate your interest in the library. This issue looks like a duplicate of #242 and #276 Could you please check and confirm?
Repository: jsvine/pdfplumber

Issue #122: Table Extraction Option to ignore visiable lines / rects
Created: 2019-06-23T12:57:06Z
Hi,
I met this issue when using your package:
Sometimes, the pdf will have some invisable lines / rects, which interferes the table extraction result.
I want to get a pure explicit line chart with explicit line strategy, but I dont think it works.
A easy way to do it should be set a filter for LTLine/ LTRects in your parse_object stage, where I filter out the lines with stroking_color = 1 ( when stroke is True) or non_stroking_color=1 (when stroke is False)
Also many "Rects" are actually lines... well, every line is a rect. is there a rect2line method in your implementation?  My email is zchen344@bloomberg.net, I might be wrong, but let me spend some more time to read this package. thanks!

Duplicate issue #733: Detecting paragraphs or blank lines inside a table
Created: 2022-09-26T22:43:18Z
So there are these questions on stackoverflow:
pdfplumber - How to extract table with no horizontal lines? - this is mine
Use pdfplumber to extract paragraphs - this one is similar
But I will repost it again here...
So my pdf looks like this:

As you can see I don't have horizontal lines inside the table. And I need some sort of parameter or something to split the data from second column like:
['PRODUCT 1\ndescription line 1\ndescription line 2', 'PRODUCT 2\ndescription line 1', 'PRODUCT 3\ndescription line 1\ndescription line 2'] - on vertical extraction ( I jumped over the other columns)
or
[['1', 'PRODUCT 1\ndescription line 1\ndescription line 2', 'BUC', '1', '35.00', '35.00', '6.65'], ['2', 'PRODUCT 2\ndescription line 1', 'buc', '1', '7.00', '7.00', '1.33'], ['3', 'PRODUCT 3\ndescription line 1\ndescription line 2', 'buc', '1', '31.00', '31.00', '5.89']] - on horizontal extraction
On the image, I put some red rectangles to understand where should split.

Closing comment (2022-09-26T22:58:12Z): Possible duplicate of #122
Repository: jsvine/pdfplumber

Issue #170: If the PDF file contains the stsong-light font, this data is missing from the parsing results
Created: 2020-01-14T10:07:54Z
Can stsong-light fonts be supported in the new version?

Duplicate issue #396: readpdf table result is None and text is None
Created: 2021-03-22T10:16:45Z
MY python3.75 code：
pdf = pdfplumber.open(r'abcd.pdf') p0 = pdf.pages[0] text = p0.extract_text() print(text) tables= p0.extract_tables() print(tables) 
the text result is None
the tables result is None
p0.objects.chars is []
why all the result is empty?  can anybody help me, thank you very much~
PDF file
https://github.com/laizezhong/public/blob/2d350791f15f5b84601d4ca6612b304b910dc5a3/abcd.pdf

Closing comment (2021-03-22T10:32:31Z): Hi @laizezhong Thanks for raising this and providing the PDF. This issue seems to be a duplicate of #170, #332 and #335. Hence, I am closing this issue.
Request you to run pdfminer's pdf2txt as described in https://pdfminersix.readthedocs.io/en/latest/tutorial/commandline.html#pdf2txt-py and if no text is extracted, raise an issue over at https://github.com/pdfminer/pdfminer.six/issues. If it is recognised, then please reopen this issue.
Repository: jsvine/pdfplumber

Issue #1279: Words from two lines are merged into a single word
Created: 2025-03-16T21:13:03Z
Describe the bug
I'm working on a project to extract text from sheet music PDFs. I've noticed that, for certain PDFs, syllables from two different lines get combined together into a single word. This happens only when use_text_flow is set to True.
Have you tried repairing the PDF?
Yes
Code to reproduce the problem
import pdfplumber
import pprint

pdf_path = '/path/to/file.pdf'

with pdfplumber.open(pdf_path, repair=True) as pdf:
  extracted_words = []
  for page in pdf.pages:
    words = page.extract_words(use_text_flow = True)
    extracted_words.extend(words)

pprint.pp(extracted_words)

PDF file
https://assets.churchofjesuschrist.org/c1/eb/c1eba3f371090ce761c3658d66a591424007a782/the_voice_of_god_again_is_heard.pdf

Expected behavior
The syllables "claim" and "lence" should be extracted as two separate words, with different top and bottom coordinates because they are on different lines.
Actual behavior
The syllables "claim" and "lence" are extracted as a single word:
{
  'text': 'claimlence',
  'x0': 349.53562000000005,
  'x1': 385.5803200000001,
  'top': 144.8026000000001,
  'doctop': 144.8026000000001,
  'bottom': 164.43150000000014,
  'upright': True,
  'height': 19.628900000000044,
  'width': 36.044700000000034,
  'direction': 'ltr'
},

Environment
pdfplumber version: 0.11.5
Python version: 3.11.8
OS: macOS 15.3.2 Sequoia

Duplicate issue #1289: Incorrect order of text lines (use_text_flow=True)
Created: 2025-04-06T05:40:38Z
Describe the bug
On certain PDFs, lines are returned in an unexpected order when use_text_flow is set to True.
Have you tried repairing the PDF?
Yes
Code to reproduce the problem
import pdfplumber

pdf_path = '/path/to/file.pdf'

with pdfplumber.open(pdf_path, repair=True) as pdf:
  for page in pdf.pages:
    lines = page.extract_text_lines(use_text_flow=True)
    for line in lines:
      print(line['text'])

PDF file
how-great-the-wisdom-and-the-love_bi.pdf
Expected behavior
Lines should be returned in this order:

Stap tingbaot broken bodi blong Kraes,
Taem yumi brekem bred.
Dring wora long kap blong yumi witnes,
Yumi putum Kraes long fored.
Plan blong Papa God hem i komplit
Blong savem yumi long ol sin.
Hem i tekem Jastis, Lav mo Mersi
Blong mekem plan blong Salvesen.

Actual behavior
Lines are returned in this order:

Stap tingbaot broken bodi blong Kraes,
Taem yumi brekem bred.
Plan blong Papa God hem i komplit
Blong savem yumi long ol sin.
Hem i tekem Jastis, Lav mo Mersi
Blong mekem plan blong Salvesen.
Dring wora long kap blong yumi witnes,
Yumi putum Kraes long fored.

Screenshots

Environment
pdfplumber version: 0.11.6
Python version: 3.12.8
OS: macOS 15.4 Sequoia

Closing comment (2025-04-21T16:56:39Z): Thanks! Is there a way to verify the order of the text in the PDF's internal representation? I assumed it was something to do with the word grouping after extraction, similar to #1279.
Repository: jsvine/pdfplumber

Issue #332: STSong-light typeface not recognized
Created: 2021-01-06T06:07:03Z
Hello，I am applying pdfplumber to parse the pdf with STSong-light typeface but I got all blanks
[‘ ‘，‘ ‘，‘ ‘，‘ ‘]
pdfminer.six cannot recognize the characters？Any solutions？
pdfminer.six 20200517
pdfplumber 0.5.25
Python37
Thanks.
PDF file
demo.pdf
code
import pdfplumber
s = {"vertical_strategy": "lines",
"horizontal_strategy": "lines",
"explicit_vertical_lines": [],
"explicit_horizontal_lines": [],
"snap_tolerance": 3,
"join_tolerance": 3,
"edge_min_length": 3,
"min_words_vertical": 3,
"min_words_horizontal": 1,
"keep_blank_chars": True,
"text_tolerance": 3,
"text_x_tolerance": None,
"text_y_tolerance": None,
"intersection_tolerance": 3,
"intersection_x_tolerance": None,
"intersection_y_tolerance": None,}
file_path = "demo.pdf"
pdf = pdfplumber.open(file_path)
p0 = pdf.pages[0]
print(p0.extract_table(table_settings=s))

Duplicate issue #431: Unable to extract text from table
Created: 2021-05-11T05:00:36Z
Describe the bug
The table is extracted correctly in visualization, but the text in the table is not extracted.
Code to reproduce the problem
The code is as follows:
pdf = pdfplumber.open(file_path)
p0 = pdf.pages[0]
table = p0.extract_tables()
pd.DataFrame(table[1:],columns=page[0])
PDF file
Order.pdf
Actual behavior

Screenshots


Environment

pdfplumber version: [e.g., 0.5.22]
Python version: [e.g., 3.7.6]
OS: [e.g., Win10]

Additional context
I don't know what the problem is?
Looking forward to your help

Closing comment (2021-05-11T05:44:52Z): Hi @xhdavid Appreciate your interest in the library. This PDF has the STSONG font and appears to be a duplicate of #332. If the text isn't recognised when you run pdfminer.six's pdf2txt as described in https://pdfminersix.readthedocs.io/en/latest/tutorial/commandline.html#pdf2txt-py, I would recommend you to raise an issue over at https://github.com/pdfminer/pdfminer.six/issues. If it is recognised, then please reopen this issue.
Repository: jsvine/pdfplumber

Issue #29: text': '(cid:0) instead of character
Created: 2017-03-20T06:31:07Z
>>> with pdfplumber.open("/Users/edwin/1.pdf") as pdf:
...     first_page = pdf.pages[0]
...     print(first_page.chars[0])
... 

{'adv': Decimal('15.975'), 'fontname': 'SRPUEP+SimSun', 'doctop': Decimal('8.092'), 'y1': Decimal('411.158'), 'bottom': Decimal('23.061'), 'text': '(cid:0)', 'top': Decimal('8.092'), 'object_type': 'char', 'height': Decimal('14.969'), 'width': Decimal('15.975'), 'page_number': 1, 'upright': True, 'y0': Decimal('396.189'), 'x0': Decimal('147.400'), 'x1': Decimal('163.375'), 'size': Decimal('14.969')}
pdf is https://github.com/clear-datacenter/plan/files/524831/1.pdf.zip
you can download and just remove the .zip in the filename to get pdf file

Duplicate issue #159: When I use extract PDF content, it's all CID: XXXX
Created: 2019-11-30T06:04:11Z
Is it because the PDF content is Chinese,？but I try to display other PDF normally

Closing comment (2019-11-30T06:34:29Z): Related to #29, euske/pdfminer#122 and https://stackoverflow.com/questions/50773909/what-to-do-with-cids-in-text-extracted-by-pdfminer
Technically, not really a pdfplumber issue.
Repository: jsvine/pdfplumber

Issue #1049: Offset in bounding boxes for every pdf passed
Created: 2023-11-28T11:53:45Z
Describe the bug
I passed PDFs to the im.draw_rects(first_page.extract_text_lines()) function, and I'm getting an offset in different directions for each PDF I have passed.
Have you tried repairing the PDF?
Yes, I've tried repairing the PDFs with gs as well as with pdfplumber but gotten little to negligible difference
Code to reproduce the problem
import pdfplumber

repaired = pdfplumber.repair("/content/iebe102.pdf", outfile="/content/repaired2.pdf")
pdf = pdfplumber.open("/content/repaired2.pdf")
first_page = pdf.pages[0]
im=first_page.to_image()

# Run either one from below
# im.outline_words()
im.draw_rects(first_page.extract_text_lines())

PDF file
Please attach any PDFs necessary to reproduce the problem.
iebe102.pdf
iemh101.pdf
Expected behavior
Boxes should have been detected with their text
Actual behavior
Offset in multiple directions like this:


Screenshots
If applicable, add screenshots to help explain your problem.
Environment

pdfplumber version: [e.g., 0.5.22]
Python version: [e.g., 3.8.1]
OS: [e.g., Mac, Linux, etc.]

Additional context
I've tried resizing the PDF, and setting the resolution, height, width, etc. but nothing seems to work

Duplicate issue #1044: [Documentation] `annot` properties
Created: 2023-11-16T12:47:05Z
In the documentation, the .annots property is missing. Specifically, what do the 4 float values of Rect represent

Closing comment (2023-11-29T15:00:56Z): EDIT: After hours of playing around with the various props, I found out that the offset is caused due to the original offset, page's bounding box itself.
import pdfplumber
pdf = pdfplumber.open('/path/to/pdf')
# box_offset = 2
for annot in pdf.annots:
    pg_number = annot['page_number']
    if pg_number in table_counter:
        table_counter[pg_number] += 1
    else:
        table_counter[pg_number] = 1
    page = annot_pdf.pages[pg_number - 1]
    px0, py0, px1, py1 = page.bbox
    bbox = [annot['x0'], annot['top'] + 2 * py0, annot['x1'], annot['bottom'] + 2 * py0]
    xt, yt, xb, yb = bbox
    # bbox = [xt + box_offset, yt + box_offset, xb - box_offset, yb - box_offset]
    roi = page.crop(bbox, relative=False, strict=False)
    roi.to_image(resolution=500, antialias=True).save(f"p{pg_number}_t{table_counter[pg_number]}.png")

In some PDFs, when I try to crop using bbox, ie [annot['x0'], annot['top'], annot['x1'], annot['bottom']], it returns a slightly skewed result (when viewing with roi.to_image(resolution=500, antialias=True).save('temp.png')). The EXACT same process, ie:
roi = page.crop(bbox)
# OR
roi = page.within_bbox(bbox)
results in perfect cropping in another PDF. I'm trying to understand what relative=True and/or strict=True do, so as to remove the offset
For example:

(PS - Might be related to #1049)
Repository: jsvine/pdfplumber

Issue #193: Memory issues on very large PDFs
Created: 2020-03-19T21:30:04Z
I'm currently trying to extract a ~28,000 page PDF (not a typo) and am running up against memory limits when I run in a loop.
import pandas as pd
import pdfplumber
from os import path

#Read in data
pdf = pdfplumber.open("data/my.pdf")

#Create settings for extraction
table_settings = {
    "vertical_strategy": "text", #No lines on table
    "horizontal_strategy": "text", #No lines on table
    "explicit_vertical_lines": [],
    "explicit_horizontal_lines": [],
    "snap_tolerance": 3,
    "join_tolerance": 3,
    "edge_min_length": 3,
    "min_words_vertical": 3,
    "min_words_horizontal": 1,
    "keep_blank_chars": False,
    "text_tolerance": 3,
    "text_x_tolerance": None,
    "text_y_tolerance": None,
    "intersection_tolerance": 3,
    "intersection_x_tolerance": None,
    "intersection_y_tolerance": None,
}
COLUMNS = [
    'Work Date',
    'Employee Number',
    'Pay Type',
    'Hours',
    'Account Number',
    'Hourly Rate',
    'Gross',
    'Job Code',
    'Activity Code'
]
#Begin extracting pages one at a time
page_num = 0
for page in pdf.pages:
    try:
        #Pull the table
        table = page.extract_table(table_settings)
        #Drop the first row
        table = table[1:]
        #Read into Dataframe
        df = pd.DataFrame(table,columns=COLUMNS)
        #Output to CSV
        df.to_csv(path.join('data','output',str(page_num) + '.csv'))
        page_num += 1
    #There's bound to be a billion issues with the data
    except Exception as ex:
        print("Error on page ", page_num, ".")
        print(ex)
        page_num += 1

I'm handling this one page at a time because if this bombs out at any point, then I lose all my work.
As the loop runs, memory consumption keeps growing until it hits about 5Gb (about all the space I have left on my machine).
I suspect a memory leak, but I'm not sure. I'd figure that memory would be released as the loop iterates.

Duplicate issue #263: Memory Leakage
Created: 2020-09-01T10:17:17Z
Describe the bug
While opening and closing a pdf using 'with' parameter, pdfplumber somehow still takes up 120 mb space. Tried working using tempfile directory but still no success. Do anyone know how to deal with memory leakage issues?
Code to reproduce the problem
with pdfplumber.open(pdf_filename) as pdf:
Expected behavior
After the program gave results using the 'with' statement, the memory should reduce to 0 or 10 mb max.
Actual behavior
It retained the value even I have tried memory_profiler to view it and used gc.collect() (garbage collector).
Environment

pdfplumber version: 0.5.23
Python version: 3.6.6
OS: Linux

Closing comment (2022-07-20T20:01:09Z): Closing this issue as duplicate of #193
Repository: juliansteenbakker/flutter_secure_storage

Issue #88: iOS restore app from backup
Created: 2019-10-22T11:04:16Z
When I'm restoring our app from an existing backup, all the data is still there.
Is there a possibility to disable storing this data in the cloud and only store it on the phone itself?
Best would be if the stored data is only valid for this explicit installation of the app.
If I uninstall the app and install it again, the data is still there.
Thanks!

Duplicate issue #102: iOS autodelete key values items after uninstall?
Created: 2020-01-13T06:33:46Z
First of all, thanks for this useful package.
I have tried to uninstall (delete) the app (iOS) which I have some key and values generated by secure flutter storage package. but unfortunately when I tried to reinstall the app (debug mode), those keys and values are still stored in the device.
Is there any good way to have all (flutter_secure_storage) keys and values deleted after deleting the app in iOS?
Thanks in advance

Closing comment (2020-01-22T14:21:43Z): Same as #88
Repository: juliansteenbakker/flutter_secure_storage

Issue #153: Add support for Windows
Created: 2020-08-06T07:49:36Z
For MacOs you can use keychain
https://developer.apple.com/documentation/security/keychain_services
For windows you can use CryptProtectedData
https://docs.microsoft.com/en-us/windows/win32/api/dpapi/nf-dpapi-cryptprotectdata

Duplicate issue #242: WIndows support
Created: 2021-06-19T03:46:47Z
Please add windows support for it

Closing comment (2021-07-27T20:57:41Z): Duplicate of #153
Repository: juliansteenbakker/flutter_secure_storage

Issue #338: `containsKey` always returning true
Created: 2021-11-20T20:28:00Z
I've just started using flutter_secure_storage in a new project, for some reason containsKey is returning true for every key value I give it.
In the below image (showing a debug session) you can see that containsKey is returning true even though readAll returns an empty map, and I even try deleting the value associated with the key but containsKey still returns true. This is running on an iOS simulator.

Versions:

Flutter - 2.5.3
Dart - 2.14.4
Xcode - 13.0
iOS - 15.0
flutter_secure_storage - 5.0.2

Duplicate issue #359: Android - containsKey is always returning false
Created: 2022-01-27T11:44:37Z
After installing the package and running the example provided on pub.dev
I realized that after adding items to the storage and using containsKey function for all the keys that were added, the result is always false
I don't know if anyone else has had this issue?

Closing comment (2022-02-28T08:41:41Z): The same is happening to me (then verse versa on iOS) with the latest version from pub, after upgrading. I haven't tested it on Android, but almost the same is happening on iOS. I re-rolled to the version I was using previously and it works again. Also related to #338
Repository: juliansteenbakker/flutter_secure_storage

Issue #320: Runtime error for web 5.0
Created: 2021-10-25T05:14:15Z
~/Documents/flutter_secure_storage/flutter_secure_storage/example$ flutter build web --web-renderer html --release
~/Documents/flutter_secure_storage/flutter_secure_storage/example$ sudo cp -r ./build/web/* ~/Documents/www/

I got in the browser console
Uncaught TypeError: Cannot read property 'generateKey' of undefined

Duplicate issue #355: Uncaught TypeError: Cannot read properties of undefined (reading 'generateKey')
Created: 2022-01-15T07:07:58Z
Background:
I am trying to authenticate myself to next page
I run same code on Mac 12.1 has no problem. I can read/write token to disk
Then I deploy to Ubuntu Linux by flutter build web
await storage.write(key: 'jwt', value: cleanedToken["token"]); raises an error
Uncaught TypeError: Cannot read properties of undefined (reading 'generateKey')
Step to reprofuce

Install flutter_secure_storage: ^5.0.2
flutter build web on Linux
http-server build/web
await storage.write(key: 'jwt', value: cleanedToken["token"]);

Expected result:
Be able to write token to disk
As is:
Uncaught TypeError: Cannot read properties of undefined (reading 'generateKey')

Closing comment (2022-01-15T07:41:44Z): Duplicate of  #320
You are serving the app over http instead of https
It's written in the README.md:
Important notice for Web
flutter_secure_storage only works on HTTPS or localhost environments. Please see this issue for more information.
Here is the corresponding README section.
I guess it's README all in caps for a reason 🤣
Repository: juliansteenbakker/flutter_secure_storage

Issue #769: [Android] [Beta] Version 10 - Full migration to custom implementation of SecureSharedPreferences
Created: 2024-08-13T19:38:12Z
A long outstanding problem with the Android part of this package is the deprecated usage of older cryptography usage (CBC with PKCS5/PKCS7 padding) for SDK < 23, and the already deprecated JetSec Crypto library that is being used for the current implementation of SecureSharedPreferences.
To fix these issues, i am moving to a custom implementation of the JetSec Crypto library, and removing all other deprecated methods of encrypting the shared preferences. This requires the minimum SDK to be raised from 21 to 23.
I am currently testing the new implementation in the branch version-10. Any help is greatly appreciated.
Affected issues:
#512 #522 #562 #584 #627 #672 #694 #713 #729 #758 #759

Duplicate issue #694: App uses CBC with PKCS5/PKCS7 padding
Created: 2024-03-29T12:30:07Z
Mobile Security Framework (MobSF) reports high risk error that comes from the android part of package.
Error details:
The App uses the encryption mode CBC with PKCS5/PKCS7 padding. This configuration is vulnerable to padding oracle attacks.
CWE: CWE-649: Reliance on Obfuscation or Encryption of Security-Relevant Inputs without Integrity Checking
OWASP Top 10: M5: Insufficient Cryptography
OWASP MASVS: MSTG-CRYPTO-3
Source of error: c5/h.java
    protected Cipher d() {
        return Cipher.getInstance("AES/CBC/PKCS7Padding");
    }

I see a lot of similar reports:
#584
#562
#526
#475
They are either ignored or closed, but issue is still persists.
The provided solution:
const AndroidOptions(
        encryptedSharedPreferences: true,
      storageCipherAlgorithm: StorageCipherAlgorithm.AES_GCM_NoPadding
      );

is good to have, but it doesn't remove the warning reported by MobSF.
Why Cipher.getInstance("AES/CBC/PKCS7Padding") is still in the package ?  Why will we not just remove it ?
I would really appreciate if you would have a look at this issue and help to resolve it. Many thanks !

Closing comment (2024-08-13T20:26:08Z): I am working on a new version of this package that fixes these problems. It will be tracked in #769
Repository: juliansteenbakker/flutter_secure_storage

Issue #106: Add support for MacOS Keychain
Created: 2020-03-07T23:04:54Z

Duplicate issue #153: Add support for Windows
Created: 2020-08-06T07:49:36Z
For MacOs you can use keychain
https://developer.apple.com/documentation/security/keychain_services
For windows you can use CryptProtectedData
https://docs.microsoft.com/en-us/windows/win32/api/dpapi/nf-dpapi-cryptprotectdata

Closing comment (2021-07-27T21:13:25Z): macOS will be tracked in #106
Repository: juliansteenbakker/flutter_secure_storage

Issue #58: No certificate found under alias error
Created: 2019-06-20T11:34:37Z
Caused by java.lang.Exception: No certificate found under alias: com.*.*.FlutterSecureStoragePluginKey at com.*.*.encryption.RSACipher18Implementation.getPublicKey + 91(RSACipher18Implementation.java:91) at com.*.*.encryption.RSACipher18Implementation.wrap + 38(RSACipher18Implementation.java:38) at com.*.*.encryption.StorageCipher18Implementation.<init> + 56(StorageCipher18Implementation.java:56)
Hi, I've pulled this library into our native app ahead of launching our Flutter app and seen crash reports on a variety of Samsung Galaxy devices. Any idea what could be causing this issue?

Duplicate issue #554: [Android] PlatformException when invoking write value
Created: 2023-04-20T02:29:15Z
Hi, error occured in our release prod when we trying to write value into secure storage.
so far it only happened in Samsung J7+. Is there anyway to resolve this?
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError
PlatformException(Exception encountered, write, java.lang.NullPointerException: Attempt to invoke interface method 'byte[] wc.i.a(byte[])' on a null object reference at vc.a.m(Unknown Source:24) at vc.e$b.run(Unknown Source:267) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.os.HandlerThread.run(HandlerThread.java:65) , null). Error thrown null.

Flutter version: 2.10.5
flutter_secure_storage: 8.0.0
Android version: 8.1.0
Android model: Samsung J7+

Closing comment (2023-07-28T02:00:06Z): I've looked into this problem, and the culprit for the NPE is here:
https://github.com/mogol/flutter_secure_storage/blob/017ce8182b0be0feefef9083c72ab0de1eaf4571/flutter_secure_storage/android/src/main/java/com/it_nomads/fluttersecurestorage/FlutterSecureStorage.java#L148-L153
A try/catch that swallows any exception without handling it. storageCipher remains unassigned after an unknown exception, which later results in the NullPointerException.
Removing this catch (i.e. letting the root cause be reported) got me to:
java.lang.Exception: No certificate found under alias: la.foton.brb.myphone.FlutterSecureStoragePluginKey
	at com.it_nomads.fluttersecurestorage.ciphers.RSACipher18Implementation.getPublicKey()

…which appears to be the same as #58, an issue with no satisfactory answer.
It seems the best/only workaround without understanding the problem better and changing the plugin is to set AndroidOptions(resetOnError: true). This will erase all data on the device, but hopefully after that it will be able to initialize properly. (I can't reproduce this error on my devices, so I haven't had the opportunity to try this yet. Fortunately, it only affects a tiny number of users in our case)
Repository: junegunn/vim-plug

Issue #1134: is modular config for plug possible?
Created: 2021-09-26T02:07:12Z
Is there a way to configure Plug in a modular way?
Right now the configuration for many plugins needs to be split into 2 pieces:

one or more lines defining the plugins with the Plug command. Those need to be between plug#begin and plug#end
if plugin configuration requires plugin to already be loaded, then it needs to go after plug#end.

I'd like to be able to do something like that:
call plug#begin('~/.vim/bundle')
" I'd like all related configuration to be in one single file
source a_module
source another_module
...

call plug#end()
I've looked around in many popular vim configurations but I didn't find a good solution to this problem.
Some (like I do) split 'module' configuration in 2 files, one sources in between plug commands, and another is sourced after.
This works, but it's not clean and harder to maintain.
Others, like SpaceVim (I think), write the sourced files in a way that doesn't immediately define plugins or configuration, instead they define functions, that a centralized plugin manager can call later, e.g. call foo_define_plugins() and then after plug#end - call foo_configure(). this also works, but, imho, it's too much boilerplate for a simple problem to solve.
I've looked through plug's code, and 2 things looked like they could be the solution
first, the User pluginname autocommand. That one would be perfect, but it's only fired for lazy loaded plugins. if the plugin is loaded right away, the command is not fired.
another one is 'do' parameter of the Plug command, but this one only called on 'update'.
I'm thinking about using au VimEnter but that might be too late for some plugins configuration I think.
For me, the perfect solution would be for the User pluginname command to always be fired when a plugin loads, lazily or not.
I wander if I'm missing something? I'm not a vim expect, may be a perfectly simple solution already exists ;)

Duplicate issue #1185: Feature Request: Add a post plugin loading hook
Created: 2022-06-11T22:58:54Z
Provide a post plugin loading hook - typically used to configure the plugin - like the config hook provided by packer.nvim.

Closing comment (2022-06-12T13:58:22Z): Duplicate of #1134
Repository: junegunn/vim-plug

Issue #128: Self-management
Created: 2014-12-03T01:33:01Z
Vundle allows you to do this:
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

Any reason vim-plug prefers a different way to install? Moving plug.vim to autoload/ would probably just work.

Duplicate issue #203: plug.vim should be in autoload directory
Created: 2015-04-03T13:04:52Z
This makes it possible to use vim-plug to manage vim-plug and dropping the clone into runtimepath would just work™.

Closing comment (2015-04-03T13:07:06Z): Closing as duplicate of #128 #102 #73 #69 #50.
Repository: junegunn/vim-plug

Issue #948: Helpful install command from outside vim
Created: 2020-03-21T18:17:22Z
nvim -es -u ~/.config/nvim/init.vim +PlugInstall +qa

Maybe there's a place for this in the wiki?

Duplicate issue #957: How to automate PlugInstall without having to run it manually inside Neovim?
Created: 2020-04-06T21:51:06Z
:version
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict
-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_G
ENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.4.3/src
 -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"



Type:

 Bug
 Enhancement
 Feature Request
 Question


OS:

 All/Other
 Linux
 OS X
 Windows


Vim:

 Terminal Vim
 GVim
 Neovim



I have a dotfiles-repo/setup.sh script that I normally run in my new OS installs. I set up my .vimrc file using vim-plug. Normally when I first run nvim, I manually run :PlugInstall to get everything set up.
But I am wondering if there is a way to automate this so I don't have to open nvim and manually run the command.
For example, I tried adding
nvim +PlugInstall
to my setup script, but that drops me into Neovim and requires hands-on.
How can I automate it in my bash script?

Closing comment (2020-04-06T22:32:56Z): Duplicate of #948
Repository: junegunn/vim-plug

Issue #125: Handle Remote Plugins for neovim.
Created: 2014-11-29T03:34:01Z
http://neovim.org/doc/user/remote_plugin.html#remote-plugin
The Python sample works. I'd love to easily install the soon-to-be-a-torrent of awesome remote plugins for nvim.
As far as I can see, it'd need to know that its a remote plugin, place it into the right directory, and call :UpdateRemotePlugins after making changes.
Perhaps the Plugfile could come back to provide some of the needed meta-data about the plugin? (isRemotePlugin: true, host: python, etc...) If not that, then perhaps a RemotePlug function in addition to Plug would do the trick. (or, probably, both approaches would be best.)

Duplicate issue #330: Neovim Remote Plugins
Created: 2015-11-26T18:19:54Z
Does vim-plug work with neovims remote plugins? Does it call UpdateRemotePlugins after loading? I've had issues getting https://github.com/ensime/ensime-vim/ to work

Closing comment (2015-11-26T19:14:39Z): I think this is a duplicate of #125
Repository: junegunn/vim-plug

Issue #928: Disable plugin for specific filetype - opposite of for
Created: 2020-01-14T15:14:54Z
Use case: I want to enable tmsvg/pear-tree for html file types and jiangmiao/auto-pairs for the rest.
Currently I need to explicit list all the filetypes I want to use autopairs for which is impractical.
Would you be open to add this feature?

Duplicate issue #1060: Feature request: a NOT 'for' build spec option
Created: 2021-01-19T16:07:07Z
Thank you for vim-plug, I have very efficiently gone from a fast vim startup to a slow one.
My suggestion to improve this is to avoid loading things on certain uses of vim. I use nvimpager as my manpage viewer, so I don't need any completion or whatever. I propose this construct:
Plug 'tpope/vim-surround' {'notfor':'man'} " don't load if only in man mode pager
In this way I would load my pager much faster, since I want almost no plugins.

Closing comment (2021-01-20T01:08:41Z): Duplicate of #928.
Shouldn't {'on':'AntiManTrigger'} be {'on':'AntiManCom'}?