• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
25

Unable to print the document which is filled with same text field twice.

Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

Hello Adobe Acrobat Support Team,

I am filling out the pdf document and the document contains 2 sections one for the user and one for the customer. Both the section needs to be filled with the same text field data.

I am having trouble filling out a PDF form using Adobe Acrobat. When you try to fill out the same field twice on the same page, it doesn't print correctly. However, if you only fill out the field once, it prints without any problems. 
The print option not only works using Adobe but we are able to print using other PDF libraries.

TOPICS
Edit and convert PDFs , JavaScript , PDF , PDF forms , Print and prepress

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

What do you mean by "doesn't print correctly", exactly?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

Yes the filled PDF did not print using Adobe Acrobat.

Best Regards
Muhamamd Hamza Jamshed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

MuhammadHamz33783626xqtq_0-1700647664733.png



See the attachment 

Unable to print PDF form due to duplicate 'Unit' fields; flattened fields

The unit no is filled 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

Where does it say it has anything to do with this field?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

I found out this thing during my testing. when the text field is single it allows me to print but when it is duplicated it does not allow me to print and gives me the above error.
You see above screenshot that unit no is duplicated having the same field name and information filled.
Might the above information help you understand the scenario
Thanks
Muhammad Hamza Jamshed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

Hi Dear,

 

I have attached the file with the name "Sample-pdf-for testing".

 

Please open this file in Adobe Acrobat Reader and try to print it. You will get the error message that I have sent you above

 

Thanks
Best regards

Muhammad Hamza Jamshed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

The file is corrupted.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

Why does a PDF file get corrupted when you fill out the same input field twice, but it prints fine when you fill each field only once?

My Use Case:

1. Use the input text fields 1 time for each (unit, building, etc) it works perfectly.
2. Use the input text fields twice the file generated will corrupted.

Scenario
The scenario that creates a file that will get corrupt:
1. Take a pdf document
2. Add the input text field with the name "text field name"
3. Use 2-time text fields of the same name
4. Fill the text field with the data(populate fields)
5. Then open the pdf file which is filled and try to print
6. The issue will occur which I am talking about

 

Question:

Why can other PDF libraries and applications print this corrupted file, while the original software struggles to handle it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

Can you share the file in question with us?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

I have shared the file kindly see my response.
Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

There is not any form field in this document.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Copy link to clipboard

Copied

Hi @JR Boulay 
Look below I have attached both files files having fields and files after the fields get filled.

Best regards 
Muhammad Hamza Jamshed

 

[PII removed by moderator]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

I can fill the form and print it without any issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

Dear @Bernd Alheit ,

I am filling the pdf with the code using the information received.
Look below

 let readFile = fs.readFileSync(
                    path.resolve(
                      __dirname
                    )
                  );
const pdfDoc = await pdf.PDFDocument.load(readFile);
                  const form = pdfDoc.getForm();
                  const unit_number = form.getTextField("suite");
                  const building_name = form.getTextField("address");
                  const time = form.getTextField("");
                   unit_number.setText(UnitNumber);
                  date_of_notice.setText(
                    dateFormat(moment().toISOString(), "mmmm dd, yyyy")
                  );
                 
                  time.setText(
                    dateFormat(
                      serviceOrderWorkDate + "" + userCurrentTimeZone,
                      "mmmm dd, yyyy"
                    )
                  );
                  form.flatten();


Might help you understand what I mean to say and how I am filling the PDF.
Thanks
Best regards
Muhammad Hamza Jmshed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

You did not mention until now you were using a program or script to do this... We assumed you were doing it manually, in the application. This is a completely different issue, then. You need to consult with the support of the PDF library you're using to do it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

I sincerely appreciate your assistance and guidance thus far.

After populating the fields using a program/script, I've noticed that while other PDF readers permit printing, Adobe Acrobat seems to restrict printing.

 

Thank you for your kind assistance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

My guess is the file is corrupted by the library you're using. If it works before you run the tool on it and not after, that would strongly suggest the issue is with the tool. There's no problem printing a file with duplicate fields in Acrobat, normally.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

LATEST

Dear @try67 ,

Thank you sincerely for your invaluable assistance and support. I've created a bug report on the library module, and I believe it could be beneficial for other users facing a similar situation.

Your help is greatly appreciated.

Link to the Bug Report: https://github.com/Hopding/pdf-lib/issues/1553

Warm regards,
Muhammad Hamza Jamshed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2023 Nov 23, 2023

Copy link to clipboard

Copied

Dear @All

I am reaching out to seek your guidance and support in navigating the above specific scenario. Your expertise and assistance in this matter would be greatly appreciated.

Thank you in advance for your time and support.

Thanks
Best regards

Muhammad Hamza Jamshed




Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines