boazsegev / combine_pdf

A Pure ruby library to merge PDF files, number pages and maybe more...
MIT License
733 stars 154 forks source link

Element missing error when rendering #218

Open marcosdemelo opened 2 years ago

marcosdemelo commented 2 years ago

The problem:

When I combine 2 slips that have a barcode, part of the document disappears from the final file. See the attached images for more details.

Turning the version back to 0.2.37, it works!

Using the next version v.1.0.0, the problem happens.

I suspect that Commit 1d47eaf/Tag-v.1.0.0 caused this.

Therefore, I conclude that from version v.1.0.0 this problem is present.

I hope someone can help me with a fix.

v.1.0.22 .. v.1.0.0 - Error, not displaying barcode

v1 0 0-v1 0 22

v.0.2.37 - Working, displaying barcode

v 0 2 37

To reproduce:

pdf1.pdf

pdf2.pdf

require 'combine_pdf'
pdf = CombinePDF.new
pdf << CombinePDF.load('pdf1.pdf')
pdf << CombinePDF.load('pdf2.pdf')
pdf.save 'pdf-combined.pdf'

Inspect the result file pdf-combined.pdf.