Coder Social home page Coder Social logo

Comments (7)

aakashrs avatar aakashrs commented on August 23, 2024

+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.

t-houssian avatar t-houssian commented on August 23, 2024

@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.
Screenshot from 2021-05-14 12-46-16
Screenshot from 2021-05-14 12-44-37
Screenshot from 2021-05-14 12-44-25
Screenshot from 2021-05-14 12-43-25
Screenshot from 2021-05-14 12-43-10
Screenshot from 2021-05-14 12-42-49
Screenshot from 2021-05-14 12-42-13

from fillpdf.

nahuel062 avatar nahuel062 commented on August 23, 2024

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:

image

Then I open the new file with Acrobat Reader, and the fields are filled correctly, apparently:
image

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.

image

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.

nahuel062 avatar nahuel062 commented on August 23, 2024

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)

image

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.

tdbs avatar tdbs commented on August 23, 2024

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.

Micboule avatar Micboule commented on August 23, 2024

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.

t-houssian avatar t-houssian commented on August 23, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.