Skip to content

Commit

Permalink
Finish implementing #7, small changes to PDFCreator
Browse files Browse the repository at this point in the history
  • Loading branch information
soda3x committed Aug 21, 2021
1 parent ee575f9 commit 05ba215
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Moneybags/HTMLCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public bool GenerateHTMLFile(Dictionary<string, string> inputDict)
}
else
{
content = content.Replace("{LOGO}", "<img src=\"" + inputDict["LOGO"] + "\" class=\"rounded mx-auto d-block\">");
content = content.Replace("{LOGO}", "<img src=\"" + inputDict["LOGO"] + "\" class=\"rounded mx-auto d-block\" style=\"max-width:250px; max-height:250px;\">");
}
File.WriteAllText("./HTML/Output.html", content);

Expand Down
8 changes: 4 additions & 4 deletions Moneybags/PDFCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ namespace Moneybags
{
class PDFCreator
{
private string pathToHTML { get; set; }
private Dictionary<string, string> metadata;
private string PathToHTML { get; set; }
private readonly Dictionary<string, string> metadata;
public PDFCreator(string pathToHTML, Dictionary<string, string> metadata)
{
this.pathToHTML = pathToHTML;
this.PathToHTML = pathToHTML;
this.metadata = metadata;
}

Expand Down Expand Up @@ -46,7 +46,7 @@ public bool GeneratePDFFile()
ObjectConfig configuration = new ObjectConfig();
configuration
.SetAllowLocalContent(true)
.SetPageUri(pathToHTML)
.SetPageUri(PathToHTML)
.SetPrintBackground(true)
.SetScreenMediaType(true);

Expand Down

0 comments on commit 05ba215

Please sign in to comment.