Comments (7)
+1
Also to add to what @nahuel062 has mentioned here:
Flattening the PDF is not always an option - sometimes the text fields are large - that we need them to be scrollable, and when we flatten the pdf, it becomes an image so there is no scrolling possible.
from fillpdf.
@aakashrs @nahuel062 Thanks for the feedback. I wonder if this is an Adobe Acrobat Reader, or specific issue or the specific pdf your working with. I tried to replicate this issue and couldn't seem to get the same problem (I don't have Adobe Acrobat Reader). I believe the fields should be saved when write_fillable_pdf is run and when you use get_form_fields on the new file you should see the fields filled. Here are some screen shots. Perhaps I might not be understanding the problem correctly? Let me know! Also, maybe send me the code your using or a file to try to replicate the error.
from fillpdf.
Thanks for the reply @t-houssian !
Yes, you understand the problem correctly, and I think it has to do with the pdf files that I'm using.
What I tried to do was save an empty pdf template, and try to populate the fields in that one, and it works.
It's a shame that I can't figure it out what is the problem that I'm having with the rest of the pdf files.
What I do, is fill the pdf files using an excel file as an input.
For example, if I populate the file "Ambroa, Nahuel.pdf" with this input:
Then I open the new file with Acrobat Reader, and the fields are filled correctly, apparently:
But when I close the file, it pops up the window to save the file, as I previously told you.
Now, if I open the same new file with a browser, like Google Chrome, it seems that the fields wasn't filled.
The same happens when I open the file with another pdf reader, like Wondershare PDFelement.
I'm still investigating what could be the problem here, because otherwise I would have to migrate all the files to new ones haha
from fillpdf.
It's interesting that if I saw the file with a notepad, the values seems fine.
"1-Place_1" and "1-RV_1" are the names of the acro fields that I use like a dictionary key to save the values. (in this example, 9 and 3)
I wonder what could be the visualization problem, and the thing that keeps me trying to save every time I open the file.
At the start of the file, it says "PDF 1.3", and when I save it, it changes to "PDF 1.6". Maybe it just an "old version" problem
from fillpdf.
I also have the same issue, using Adobe Acrobat always asks me to save the file.
EDIT: After further inspection it seems I'm using the same files @nahuel062 is using and it seems to me that this issue stems from the fact the pdf we are using has a script that uses the content of some forms cells to fill others (namely calculating totals and averages).
When I use the Preview mac app instead of Adobe Acrobat the script doesn't work so it won't bug me to save the result, and I have to manually fill the totals and averages cells myself instead of relying on the script) but when Adobe Acrobat opens the file the script runs and overwrites the totals and averages and since the file was "changed" (even though it changed into the same value) saving is now needed.
from fillpdf.
Hi, thanks for sharing that nice little code.
In my case, when I take a template pdf, it is Version PDF: 1.6 (Acrobat 7.x) and when it is transformed into new.pdf, the version isn't the same anymore Version PDF: 1.3 (Acrobat 4.x)
from fillpdf.
@nahuel062 Partially fixed I believe now with the latest release. I still need to look into why it is changing the pdf version when the function is run.
from fillpdf.
Related Issues (20)
- 'get_form_fields' not getting all form fields HOT 1
- How to set font-size when using write_fillable_pdf()?
- 'Check Box': 'Yes' does not check boxes in PDF. HOT 1
- How to automatically save the file after it was filled?
- How to rename form fields
- Direct one or more filled fields to be RTL
- Multiline does not wrap to size of the field HOT 1
- Error after 0.7.2 update "TypeError: 'NoneType' object is not subscriptable"
- Skipping certain fields when trying to get the data_dict fillpdfs.get_form_fields(pdf, sort=True, page_number=1) HOT 2
- Unsure if I am doing something wrong HOT 2
- Identical Fields cause crash!!
- How to add another page to the PDF?
- One Field is not updated - non-editable field probably?
- write_fillable_pdf does not properly flatten combed fields.
- Does not mark a radio checkbox that has child checkboxes
- radio groups can not be fill HOT 4
- Check box selection using fillpdf HOT 1
- Stream output_pdf_path to AWS S3 HOT 1
- Radio buttons loose styling. HOT 1
- List Box are not beeing filled HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fillpdf.