Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Checkbox Borders on Print After Editing PDF with pdf-lib #1546

Open
2 tasks done
MrBetatester opened this issue Nov 16, 2023 · 0 comments
Open
2 tasks done

Comments

@MrBetatester
Copy link

MrBetatester commented Nov 16, 2023

What were you trying to do?

I have a customer PDF in which I enter text into PDFTextField and add entries to PDFDropdown and select them. As seen in the image, the customer has not defined borders for checkboxes. After the editing of the PDF by pdf-lib, these are still set to no borders, but when printing, it prints borders around the checkboxes. When I print the customer's template, I get no borders.

How did you attempt to do it?

I load the PDF only once at the start and create a copy multiple times like:
`
var contractPDF = new ASPDF();
function init() {
await contractPDF.load("contract.pdf", true);
}

async function test() {
var contractPDF = new ASPDF();
await contractPDF.load("contract.pdf", true);

var pdf = await contractPDF.copy();
await pdf.fillForm()
await pdf.get("Contract_123.pdf", PDF_DOWNLOAD);
}
`
as_pdf.zip

What actually happened?

I am attaching a screenshot of the printed result showing the unintended borders around the checkboxes for reference.
Print
CheckBoxSettings

What did you expect to happen?

My primary expectation upon modifying the customer's PDF with pdf-lib was to maintain the original design elements during printing, particularly for checkboxes.

How can we reproduce the issue?

You can use the ASPDF class to load the PDF with checkboxes, which are configured according to the settings shown in the screenshot. Download the file using the provided code; however, after printing, borders will appear around the checkboxes.

Version

1.17.1

What environment are you running pdf-lib in?

Browser

Checklist

  • My report includes a Short, Self Contained, Correct (Compilable) Example.
  • I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant