File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,33 @@ from textract2page import convert_file
3434convert_file(" example.json" , " example.jpg" , " example.xml" )
3535```
3636
37+ Alternatively, if you do not have access to the image file,
38+ but do know its pixel resolution, use:
39+
40+ ``` python
41+ from textract2page import convert_file_without_image
42+
43+ convert_file_without_image(" example.json" ,
44+ # just give it a name (will not be read):
45+ " example.jpg" ,
46+ # set image width so PAGE coordinates will be correct:
47+ 2135 ,
48+ # set image width so PAGE coordinates will be correct:
49+ 3240 ,
50+ " example.xml" )
51+ ```
52+
53+
3754### CLI
3855
3956Analogously, on the command line interface:
4057
58+ # with image file
4159 textract2page example.json example.jpg > example.xml
4260 textract2page -O example.xml example.json example.jpg
61+ # without image file (just its path name)
62+ textract2page --image-width 2135 --image-height 3240 example.json example.jpg > example.xml
63+ textract2page --image-width 2135 --image-height 3240 -O example.xml example.json example.jpg
4364
4465You can get a list of options with ` --help ` or ` -h `
4566
You can’t perform that action at this time.
0 commit comments