
$ pdftotext .pdf .txt
ZAO St. Petersburg Extract from the Register Form SET-VRS
International deals
Commodity and Raw Materials Exchange "at the end of the auction
Date of bidding: 01/01/1900
Section: Section "Petroleum Products" CJSC SPbMTSB
Member: LLC
Participant code: 000000000000
Name and code of the client: OJSC / 000000000000
Tool code: 0000000001
Tool Description: Gasoline Premium Euro 95 type II class B,
Number Time Application Number
Purchase / Transaction Price (per Quantity
VAT Exchange Name
Code
CRC transaction amount
deals sale
one ton)
lots (18%) collecting counterparty
trader
01-01 01-02 01-03 S 01-05 5 01-07 01-08 01-09 01-10 PeSee
01-12
02-01 02-02 02-03 S 02-05 1 02-07 02-08 02-09 02-10 PbSee
02-12
Total to 0000000001 00,000,000.11 00,000.12
Tool code: 0000000002
Tool Description: Diesel fuel winter Z-0.2-35.
Number Time Application Number
Purchase / Transaction Price (per Quantity
VAT Exchange Name
Code
CRC transaction amount
deals sale
one ton)
lots (18%) collecting counterparty
trader
03-01 03-02 03-03 S 03-05 1 03-07 03-08 03-09 03-10 PuSE
03-12
04-01 04-02 04-03 S 04-05 1 04-07 04-08 04-09 04-10 PgSee
04-12
Total to 0000000002 0,000,000.21 0,000.22
SPbMTSB Broker Copy of an electronic document
Âą B - purchase, S - sale. 1/3
$ pdfedit -console
PDFedit 0.4.5
Using:
pdfedit -console [function name] [function parameter (s)]
It is a function of invoice (case insensitive) or its unambiguous part.
The remaining parameters are passed to the called function.
Available features:
Delinearizator
Description: Delinearize input file
Parameters: [input file] [output file]
Flattener
Description: Flatten input file (remove all revisions except the last one)
Parameters: [input file] [output file]
/** Print help for savealltext */ function savealltext_help() { print(tr("Usage:")); print("savealltext ["+tr("input file")+"] ["+tr("output file")+"]"); print(" "+tr("Input file must exist")); print(" "+tr("Output file must not exist")); exit(1); } function savealltext_fail(err) { print(tr("savealltext failed!")); print(err); exit(2); } function saveAsText_save(p,f) { document=loadPdf(p) qs=""; pages=document.getPageCount(); for (i=1;i<=pages;i++) { pg=document.getPage(i); text=pg.getText(); qs+=text; qs+="\n"; } saveFile(f,qs); } p=parameters(); if (p.length!=2) { savealltext_help("savealltext "+tr("is expecting two parameters")); } inFile=p[0]; outFile=p[1]; if (!exists(inFile)) savealltext_fail(tr("Input file '%1' does not exist").arg(inFile)); if (exists(outFile)) savealltext_fail(tr("Output file '%1' already exist").arg(outFile)); if (inFile==outFile) savealltext_fail(tr("Input and output files must be different")); if (saveAsText_save(inFile,outFile)) { } else { print(tr("savealltext")+" :"+inFile+" -> "+outFile); }
/** Print help for savealltext */ function savealltext_help() { print(tr("Usage:")); print("savealltext ["+tr("input file")+"] ["+tr("output file")+"]"); print(" "+tr("Input file must exist")); print(" "+tr("Output file must not exist")); exit(1); } function savealltext_fail(err) { print(tr("savealltext failed!")); print(err); exit(2); } function saveAsText_save(p,f) { document=loadPdf(p) qs=""; pages=document.getPageCount(); for (i=1;i<=pages;i++) { pg=document.getPage(i); text=pg.getText(); qs+=text; qs+="\n"; } saveFile(f,qs); } p=parameters(); if (p.length!=2) { savealltext_help("savealltext "+tr("is expecting two parameters")); } inFile=p[0]; outFile=p[1]; if (!exists(inFile)) savealltext_fail(tr("Input file '%1' does not exist").arg(inFile)); if (exists(outFile)) savealltext_fail(tr("Output file '%1' already exist").arg(outFile)); if (inFile==outFile) savealltext_fail(tr("Input and output files must be different")); if (saveAsText_save(inFile,outFile)) { } else { print(tr("savealltext")+" :"+inFile+" -> "+outFile); }
$ pdfedit -console
PDFedit 0.4.5-20111014140242
Using:
pdfedit -console [function name] [function parameter (s)]
It is a function of invoice (case insensitive) or its unambiguous part.
The remaining parameters are passed to the called function.
Available features:
Delinearizator
Description: Delinearize input file
Parameters: [input file] [output file]
Flattener
Description: Flatten input file (remove all revisions except the last one)
Parameters: [input file] [output file]
savealltext
Description: savealltext input file
Parameters: [input file] [output file]
$pdfedit -console savealltext .pdf .txt
static const int DEFAULT_PAGE_RX = 612; /**< Default A4 width on a device with 72 horizontal dpi. */
static const int DEFAULT_PAGE_RY = 792; /**< Default A4 height on a device with 72 vertical dpi. */
configure --disable-gui --enable-pdfedit-core-dev --enable-tools
$pdf_to_txt -file .pdf >.txt
$ pdftotext -layout .pdf .txt
ZAO St. Petersburg Extract from the Register Form SET-VRS
International deals
Commodity and Raw Materials Exchange "at the end of the auction
Date of bidding: 01/01/1900
Section: Section "Petroleum Products" CJSC SPbMTSB
Member: LLC
Participant code: 000000000000
Name and code of the client: OJSC / 000000000000
Tool code: 0000000001
Tool Description: Gasoline Premium Euro 95 type II class B,
Number Time Order number Purchase / Transaction price (per Quantity VAT Exchange Name Code
CRC transaction amount
transactions sale ¹ one ton) of lots (18%) collection of trader’s counterparty
01-01 01-02 01-03 S 01-05 5 01-07 01-08 01-09 01-10 Pay 01-12
02-01 02-02 02-03 S 02-05 1 02-07 02-08 02-09 02-10 PbSee 02-12
Total to 0000000001 00,000,000.11 00,000.12
$pdftk file.pdf burst
$inkscape -z -f pg_0001.pdf -l output_page1.svg
Source: https://habr.com/ru/post/130601/
All Articles