boazsegev / combine_pdf

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

Couldn't connect reference #236

Open Alagaesia93 opened 7 months ago

Alagaesia93 commented 7 months ago

Couldn't connect reference for {:is_reference_only=>true, :indirect_generation_number=>0, :indirect_reference_id=>2, :referenced_object=>nil}

Hi there! Great gem, never had any issues so far. With one file (I can't share here for privacy issues, happy to do in private) it just gets stuck printing this message to console. PDF is not that big, around 11 MB

This is the intersting part of the code

# url is a cloudfront presigned url
tempfile = Tempfile.new("temp.pdf")
File.binwrite(tempfile.path, HTTParty.get(url).body)
original_pdf = CombinePDF.load(tempfile.path, raise_on_encrypted: true)

I tried to leave it and after 14 hours it's still pending. Any hints?