@@ -45,7 +45,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
45
45
)
46
46
47
47
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
48
- output.write(filled_pdf.stream )
48
+ output.write(filled_pdf.read() )
49
49
```
50
50
51
51
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/simple_fill.py
@@ -81,7 +81,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
81
81
)
82
82
83
83
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
84
- output.write(filled_pdf.stream )
84
+ output.write(filled_pdf.read() )
85
85
```
86
86
87
87
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/simple_fill_editable.py
@@ -126,7 +126,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
126
126
)
127
127
128
128
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
129
- output.write(filled_pdf.stream )
129
+ output.write(filled_pdf.read() )
130
130
```
131
131
132
132
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/fill_font.py
@@ -167,7 +167,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
167
167
)
168
168
169
169
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
170
- output.write(filled_pdf.stream )
170
+ output.write(filled_pdf.read() )
171
171
```
172
172
173
173
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/fill_global_font_size_color.py
@@ -205,7 +205,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
205
205
)
206
206
207
207
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
208
- output.write(filled_pdf.stream )
208
+ output.write(filled_pdf.read() )
209
209
```
210
210
211
211
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/fill_text_wrap.py
@@ -246,7 +246,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
246
246
)
247
247
248
248
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
249
- output.write(filled_pdf.stream )
249
+ output.write(filled_pdf.read() )
250
250
```
251
251
252
252
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/fill_text_offset.py
@@ -274,7 +274,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
274
274
filled_pdf = PyPDFForm(template.read()).draw_text(" drawn_text" , 1 , 300 , 225 )
275
275
276
276
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
277
- output.write(filled_pdf.stream )
277
+ output.write(filled_pdf.read() )
278
278
```
279
279
280
280
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/draw_text.py
@@ -307,7 +307,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
307
307
)
308
308
309
309
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
310
- output.write(filled_pdf.stream )
310
+ output.write(filled_pdf.read() )
311
311
```
312
312
313
313
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/draw_image.py
@@ -345,7 +345,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
345
345
)
346
346
347
347
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
348
- output.write(filled_pdf.stream )
348
+ output.write(filled_pdf.read() )
349
349
```
350
350
351
351
Alternatively you can use the assignment operator to achieve the same.
@@ -379,7 +379,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
379
379
)
380
380
381
381
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
382
- output.write(filled_pdf.stream )
382
+ output.write(filled_pdf.read() )
383
383
```
384
384
385
385
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/merge.py
@@ -435,7 +435,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
435
435
)
436
436
437
437
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
438
- output.write(pdf_form.stream )
438
+ output.write(pdf_form.read() )
439
439
```
440
440
441
441
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/fill_customized_elements.py
@@ -469,7 +469,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
469
469
)
470
470
471
471
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
472
- output.write(filled_pdf.stream )
472
+ output.write(filled_pdf.read() )
473
473
```
474
474
475
475
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/simple_fill_radio.py
@@ -528,7 +528,7 @@ with open(PATH_TO_DOWNLOADED_SAMPLE_PDF_FORM, "rb+") as template:
528
528
)
529
529
530
530
with open (PATH_TO_FILLED_PDF_FORM , " wb+" ) as output:
531
- output.write(filled_pdf.stream )
531
+ output.write(filled_pdf.read() )
532
532
```
533
533
534
534
Link to this example: https://github.com/chinapandaman/PyPDFForm/blob/master/examples/fill_images.py
0 commit comments