Skip to content

Commit

Permalink
Sample pdf Bank Document (Broker Contract Note) (#106)
Browse files Browse the repository at this point in the history
* Sample pdf Bank Document (Broker Contract Note)

Close #105

* Align consideration column
  • Loading branch information
flywire authored Aug 7, 2024
1 parent eabc739 commit d269555
Showing 1 changed file with 0 additions and 0 deletions.
Binary file added docs/en/assets/SelfwealthBuy01.pdf
Binary file not shown.

1 comment on commit d269555

@flywire
Copy link
Contributor Author

@flywire flywire commented on d269555 Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The donor pdf is an actual broker contract note appropriated from another person with the pdf code edited manually. The pdf file structure is not trivial but an overview is given at https://brendanzagaeski.appspot.com/0005.html.

This will often work: https://www.pdflabs.com/docs/pdftk-cli-examples/

Uncompress PDF page streams for editing the PDF in a text editor (e.g., vim, emacs)

pdftk doc.pdf output doc.unc.pdf uncompress

Unfortunately, the data is contained in a compressed form so it was [sort of] uncompressed as follows:
E:\pdfbox3>java -jar pdfbox-app-3.0.0.jar decode donor.pdf SelfwealthBuy01.pdf

File was edited in np++ using search to find locations (see line numbers below) and HEX-Editor Plugin for Notepad++ v8.2.2 v0.9.12 to edit data. The main data with changes are shown below. Some desired font characters were not contained in the pdf so the bold font was dropped for security owner's name and the generated at was changed from the original Buy01.txt.

I didn't worry about looking up the character mapping but for the main text the digits 0..9 were hex 00 followed by hex 13..1c.

E:\pdfbox3\SelfwealthBuy01.pdf (35 hits)		
		
")  Tj" (66 hits		
L 1020	Left Footer	Only clear text, rest is compressed
		
Line  364	SelfWealth Limited ABN: 52 154 324 428 AFSL 421789 W 	
Line  375	www.selfwealth.com.au 	
Line  386	E:	
Line  397	[email protected] 	
Line  408	This trade was executed and cleared by OpenMarkets Australia Ltd	
Line  419	ABN	
Line  430	, Market Particpant of ASX, CHI­X and NSX. 	
Line  441	Buy Confirmation	
Line  452	MR JOHN DOE	
Line  463	JOHN DOE A/C	
Line  474	1 LONG ROAD	
Line  485	SYDNEY NSW	
Line  496	2000, AUS	
Line  507	Account Number 	
Line  518	1234567	
Line  529	Reference No: 	
Line  540	T20210701123456­1	
Line  551	Trade Date:	
Line  562	01/07/21	
Line  573	Settlement Date: 	
Line  584	05/07/21	
Line  595	Market: 	
Line  606	ASX 	
Line  617	WE HAVE BOUGHT ON YOUR ACCOUNT 	
Line  628	Quantity 	
Line  639	Security Code 	
Line  650	Security Description 	
Line  661	Price	
Line  672	1	
Line  683	Consideration 	
Line  694	Currency 	
Line  705	25	
Line  716	UMAX 	
Line  727	BETA S&P500 YIELDMAX 	
Line  738	12.4	
Line  749	$312.50	
Line  760	AUD	
Line  771	Brokerage* 	
Line  782	$9.50	
Line  793	AUD	
Line  804	Adviser Fee* 	
Line  815	$0.00	
Line  826	AUD	
Line  837	Net Value 	
Line  848	$322.00	
Line  859	AUD	
Line  870	GST included in this invoice is $0.86 	
Line  881	The confirmation is a tax invoice ­ please retain for tax purposes 	
Line  892	If this confirmation does not correspond with your records please contact us immediately at 	
Line  903	[email protected] 	
Line  914	Settlement Instructions 	
Line  925	All consideration and any information or documents required by OpenMarkets must be provided to OpenMarkets by 9am AEST on the Settlement Date.	
Line  936	This transaction will be settled from your linked cash account or in accordance with your instructions on the Settlement Date. 	
Line  947	Contract Comments 	
Line  958	Ex Dividend 	
Line  969	* Inclusive of GST 	
Line  980	+1 Standard Financial Rounding Applied (if applicable) 	
Line 1020	  (Page	 1 of 1  )  Tj
Line 1122	This confirmation is provided to you by each of SelfWealth and OpenMarkets. The Brokerage and Adviser fees set out in this confirmation are charged by SelfWealth. 	
Line 1133	OpenMarkets has not charged you any fees for the above transaction(s) .	
Line 1144	The above transaction(s) and this confirmation are issued subject to the directions, decisions.	
Line 1155	and requirements of the operator of the relevant Market, ASIC Market Integrity Rules, the operating rules of the relevant Market, and, where relevant, the Clearing 	
Line 1166	Rules of the relevant Clearing Facility and the Settlement Rules of the relevant Settlement Facility, the customs and usages of the relevant Market and the correction of 	
Line 1177	errors and omissions.	
Line 1188	If this confirmation relates to multiple transactions, those transactions may have been completed on ASX or CHI­X.”	
Line 1199	Generated At: 5 Jul 2021 16:30:01


Line    3	 1 0 obj	
Line   12	 11 0 obj	
Line   18	 2 0 obj	
Line   29	 3 0 obj	
Line   36	 4 0 obj	
Line   57	 5 0 obj	
Line   92	 6 0 obj	
Line  101	 7 0 obj	Form
Line  126	 8 0 obj	Form
Line  988	 9 0 obj	
Line 1003	 10 0 obj	Footer Page Number
Line 1027	 16 0 obj	FontName /Arial
Line 1046	 12 0 obj	Form
Line 1207	 18 0 obj	
Line 1218	 19 0 obj	
Line 1229	 20 0 obj	
Line 1240	 21 0 obj	
Line 1368	 13 0 obj	
Line 1379	 25 0 obj	
Line 1410	 26 0 obj	cmap
Line 1481	 27 0 obj	
Line 1511	 28 0 obj	cmap
Line 1554	 23 0 obj	
Line 1583	 24 0 obj	cmap
Line 1675	 22 0 obj	
Line 1690	 14 0 obj	
Line 1723	 15 0 obj	cmap
Line 1798	 32 0 obj	/FontName /CQRKLT+Arial-BoldMT
Line 1818	 33 0 obj	/FontName /BPMXCX+Arial-ItalicMT
Line 1838	 31 0 obj	/FontName /OYGLRL+ArialMT
Line 1858	 30 0 obj	/FontName /XIBRIJ+TimesNewRomanPSMT
Line 1878	 36 0 obj	
Line 2414	 37 0 obj	
Line 2586	 35 0 obj	
Line 4104	 34 0 obj	

Please sign in to comment.