Skip to content

Commit

Permalink
Merge branch 'master' into configureTSDeclaration
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienjoly authored Aug 4, 2024
2 parents 1c27d5b + 8d76500 commit c7a81ed
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 15 deletions.
30 changes: 29 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,35 @@ export type DataEntry = {
export type ItemHandler = (err: Error, data: DataEntry) => void;

export declare class PdfReader {
constructor(opts: InitOptions | null);
constructor(opts?: InitOptions | null);
parseFileItems(pdfFilePath: string, itemHandler: ItemHandler): void;
parseBuffer(buffer: Buffer, itemHandler: ItemHandler): void;
}

export type Item = {
x: number;
y: number;
sw: number;
w: number;
A: string;
clr: number;
R: {
T: string;
S: number;
TS: any[];
}[];
text: string;
};

export class TableParser {
private rows: { [key: string]: Item[] };
constructor();
processItem(item: Item, col: number): void;
processHeadingItem(item: Item, col: number): void;
getRows(): Item[][];
renderRows(): string;
/** row-> column-> items_collisionning_in_column-> item:Item */
getMatrix(): Item[][][];
getCleanMatrix(options?: { collisionSeparator: string }): string[][];
renderMatrix(): string;
}
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7a81ed

Please sign in to comment.