BUG: Updated pdf fields don't show up when page is written#412
Merged
MartinThoma merged 8 commits intopy-pdf:mainfrom Apr 17, 2022
Merged
BUG: Updated pdf fields don't show up when page is written#412MartinThoma merged 8 commits intopy-pdf:mainfrom
MartinThoma merged 8 commits intopy-pdf:mainfrom
Conversation
Borrowed code from ademidun in the comment history and inserted it into the proper location in the pdf.py module. Made some changes to the function to make it a method of the class. It appears to work. I don't have a huge test suite set up to check it.
Contributor
Author
|
This will also apply to #300. |
|
output.pdf |
Contributor
Author
|
@shurshilov Please provide more information. What did you try? What is the simplest bit of code you can run that doesn't work? |
|
For example i try set value to this field (777777) but it dont show.text = input_pdf.getFormTextFields()text['RecipientPhone_afddf77b-d0dd-4a0b-9172-fb9e2b0f3fff_177d56ab-58e1-4422-826e-a1778aae107a']='777777'output.updatePageFormFieldValues(getpage, text)BUTin the same file but in the other floor everything works and is displayed without an additional clicktext['SenderPhone_afddf77b-d0dd-4a0b-9172-fb9e2b0f3fff_177d56ab-58e1-4422-826e-a1778aae107a']='888888'09.04.2018, 18:25, "Michael" <notifications@github.com>:Please provide more information. What did you try? What is the simplest bit of code you can run that doesn't work?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
|
|
I attached the file in the commentary09.04.2018, 19:29, "Артем Шуршилов" <shurshilov.a@yandex.ru>:For example i try set value to this field (777777) but it dont show.text = input_pdf.getFormTextFields()text['RecipientPhone_afddf77b-d0dd-4a0b-9172-fb9e2b0f3fff_177d56ab-58e1-4422-826e-a1778aae107a']='777777'output.updatePageFormFieldValues(getpage, text)BUTin the same file but in the other floor everything works and is displayed without an additional clicktext['SenderPhone_afddf77b-d0dd-4a0b-9172-fb9e2b0f3fff_177d56ab-58e1-4422-826e-a1778aae107a']='888888'09.04.2018, 18:25, "Michael" <notifications@github.com>:Please provide more information. What did you try? What is the simplest bit of code you can run that doesn't work?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
|
Codecov Report
@@ Coverage Diff @@
## main #412 +/- ##
==========================================
- Coverage 74.92% 74.91% -0.02%
==========================================
Files 11 11
Lines 3490 3500 +10
Branches 811 812 +1
==========================================
+ Hits 2615 2622 +7
- Misses 658 660 +2
- Partials 217 218 +1
Continue to review full report at Codecov.
|
MartinThoma
added a commit
that referenced
this pull request
Apr 18, 2022
Deprecations (DEP): - Remove support for Python 2.6 and older (#776) New Features (ENH): - Extract document permissions (#320) Bug Fixes (BUG): - Clip by trimBox when merging pages, which would otherwise be ignored (#240) - Add overwriteWarnings parameter PdfFileMerger (#243) - IndexError for getPage() of decryped file (#359) - Handle cases where decodeParms is an ArrayObject (#405) - Updated PDF fields don't show up when page is written (#412) - Set Linked Form Value (#414) - Fix zlib -5 error for corrupt files (#603) - Fix reading more than last1K for EOF (#642) - Acciental import Robustness (ROB): - Allow extra whitespace before "obj" in readObjectHeader (#567) Documentation (DOC): - Link to pdftoc in Sample_Code (#628) - Working with annotations (#764) - Structure history Developer Experience (DEV): - Add issue templates (#765) - Add tool to generate changelog Maintenance (MAINT): - Use grouped constants instead of string literals (#745) - Add error module (#768) - Use decorators for @staticmethod (#775) - Split long functions (#777) Testing (TST): - Run tests in CI once with -OO Flags (#770) - Filling out forms (#771) - Add tests for Writer (#772) - Error cases (#773) - Check Error messages (#769) - Regression test for issue #88 - Regression test for issue #327 Code Style (STY): - Make variable naming more consistent in tests All changes: 1.27.5...1.27.6
VictorCarlquist
pushed a commit
to VictorCarlquist/PyPDF2
that referenced
this pull request
Apr 29, 2022
Deprecations (DEP): - Remove support for Python 2.6 and older (py-pdf#776) New Features (ENH): - Extract document permissions (py-pdf#320) Bug Fixes (BUG): - Clip by trimBox when merging pages, which would otherwise be ignored (py-pdf#240) - Add overwriteWarnings parameter PdfFileMerger (py-pdf#243) - IndexError for getPage() of decryped file (py-pdf#359) - Handle cases where decodeParms is an ArrayObject (py-pdf#405) - Updated PDF fields don't show up when page is written (py-pdf#412) - Set Linked Form Value (py-pdf#414) - Fix zlib -5 error for corrupt files (py-pdf#603) - Fix reading more than last1K for EOF (py-pdf#642) - Acciental import Robustness (ROB): - Allow extra whitespace before "obj" in readObjectHeader (py-pdf#567) Documentation (DOC): - Link to pdftoc in Sample_Code (py-pdf#628) - Working with annotations (py-pdf#764) - Structure history Developer Experience (DEV): - Add issue templates (py-pdf#765) - Add tool to generate changelog Maintenance (MAINT): - Use grouped constants instead of string literals (py-pdf#745) - Add error module (py-pdf#768) - Use decorators for @staticmethod (py-pdf#775) - Split long functions (py-pdf#777) Testing (TST): - Run tests in CI once with -OO Flags (py-pdf#770) - Filling out forms (py-pdf#771) - Add tests for Writer (py-pdf#772) - Error cases (py-pdf#773) - Check Error messages (py-pdf#769) - Regression test for issue py-pdf#88 - Regression test for issue py-pdf#327 Code Style (STY): - Make variable naming more consistent in tests All changes: py-pdf/pypdf@1.27.5...1.27.6
This was referenced Jun 10, 2022
MartinThoma
added a commit
that referenced
this pull request
Jun 11, 2022
Issue: When creating files with the current PpdfWriter,
Adobe Acrobat asks 'would you like to save this file'
when attempting to close it - although no changes were made.
Fix: Remove 'self.set_need_appearances_writer()' from writers
__init__ function
Caused-by: #412 (see #355)
Closes #963
Co-authored-by: pubpub-zz <4083478+pubpub-zz@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I want to attempt to fix #355 with these modifications.