Skip to content

Commit

Permalink
Initialise form environment differently
Browse files Browse the repository at this point in the history
try if that might fix
#127
  • Loading branch information
mara004 committed Aug 30, 2022
1 parent 1cef257 commit 33f7966
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pypdfium2/_helpers/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,10 @@ def render_base(
pdfium.FPDF_RenderPage_Close(self.raw)

if draw_forms:
form_fill = pdfium.FPDFDOC_InitFormFillEnvironment(self.pdf.raw, pdfium.FPDF_FORMFILLINFO(2))
pdfium.FPDF_FFLDraw(form_fill, *render_args)
pdfium.FPDFDOC_ExitFormFillEnvironment(form_fill)
form_info = pdfium.FPDF_FORMFILLINFO(1)
form_env = pdfium.FPDFDOC_InitFormFillEnvironment(self.pdf.raw, form_info)
pdfium.FPDF_FFLDraw(form_env, *render_args)
pdfium.FPDFDOC_ExitFormFillEnvironment(form_env)

return buffer, cl_string, (width, height)

Expand Down

0 comments on commit 33f7966

Please sign in to comment.