Skip to content

Commit

Permalink
Merge pull request #120 from matiasinsaurralde/fix-readme
Browse files Browse the repository at this point in the history
Fix README samples
  • Loading branch information
jerbob92 committed Nov 21, 2023
2 parents b3998c4 + f5f03a0 commit 9686364
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func getPageCount(filePath string) (int, error) {
})

pageCount, err := instance.FPDF_GetPageCount(&requests.FPDF_GetPageCount{
Document: doc,
Document: doc.Document,
})
if err != nil {
return 0, err
Expand Down Expand Up @@ -605,7 +605,7 @@ func renderPage(filePath string, page int, output string) error {
DPI: 200, // The DPI to render the page in.
Page: requests.Page{
ByIndex: &requests.PageByIndex{
Document: doc,
Document: doc.Document,
Index: 0,
},
}, // The page to render, 0-indexed.
Expand All @@ -626,7 +626,7 @@ func renderPage(filePath string, page int, output string) error {
}
defer f.Close()

err = png.Encode(f, pageRender.Image)
err = png.Encode(f, pageRender.Result.Image)
if err != nil {
return err
}
Expand Down

0 comments on commit 9686364

Please sign in to comment.