Updated library section to reflect latest implementation
This commit is contained in:
parent
5c7753d6c4
commit
d9054ddfd3
1 changed files with 4 additions and 1 deletions
|
@ -124,4 +124,7 @@ You can then test the converter using:
|
||||||
Note that the package can also be used as a library as follows:
|
Note that the package can also be used as a library as follows:
|
||||||
|
|
||||||
import img2pdf
|
import img2pdf
|
||||||
pdf_bytes = img2pdf('test.jpg', dpi=150)
|
pdf_bytes = img2pdf.convert(['test.jpg'], dpi=150, x=0, y=0)
|
||||||
|
|
||||||
|
file = open("name.pdf","wb")
|
||||||
|
file.write(pdf_bytes)
|
||||||
|
|
Loading…
Reference in a new issue