File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed
Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 2424 python-version : 3.7
2525
2626 - name : Install deps
27- run : pip install numpy pandas aspose-words
27+ run : |
28+ pip install numpy pandas imgkit
29+ apt-get install wkhtmltopdf
2830
2931 - name : Get info
3032 run : |
Original file line number Diff line number Diff line change 11import numpy as np
22import pandas as pd
3- import aspose . words as aw
3+ import imgkit
44
55
66path = "filedownloads?parentAlias=ntnu"
2222
2323print ("generated html line: " , ret )
2424
25- # with open("test.html", "w") as f:
26- # f.write(ret)
25+ with open ("test.html" , "w" ) as f :
26+ f .write (ret )
2727
28- # create blank document
29- doc = aw .Document ()
30-
31- # Use a document builder to add content to the document
32- builder = aw .DocumentBuilder (doc )
33-
34- # Write a new paragraph in the document with the text generated above into the file
35- builder .writeln (ret )
36-
37- # Save the document in DOCX format. Save format is automatically determined from the file extension.
38- doc .save ("test.svg" )
28+ with open ('test.html' , "w" ) as ff :
29+ imgkit .from_file (ff , 'test.svg' )
You can’t perform that action at this time.
0 commit comments