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

page.copy v.s. page.copy(true) issue #33

Closed
Subtletree opened this issue Oct 30, 2015 · 3 comments
Closed

page.copy v.s. page.copy(true) issue #33

Subtletree opened this issue Oct 30, 2015 · 3 comments

Comments

@Subtletree
Copy link

I'm not sure if this is a genuine issue or if I'm doing something incorrectly.

I have this code which worked correctly in 0.2.6. It loads a prawn pdf then loads blank.pdf and stamps a different prawn generated pdf onto it and combines them

prawn_pdf = render_to_string "/forms/show.pdf"
pdf = CombinePDF.parse(prawn_pdf)
blank_declaration = CombinePDF.load("#{Rails.root}/public/blank.pdf")
signature_pdf_data = render_to_string "/electronic_signatures/signature.pdf"
signature_pdf = CombinePDF.parse(signature_pdf_data)
blank_declaration.pages.first << signature_pdf.pages.first # error on this line
pdf << blank_declaration

After updating to 0.2.8 I get this error on the line mentioned above

NoMethodError (undefined method `[]' for nil:NilClass):

This seems to relate to the changes mentioned in issue #32

I've reverted to 0.2.6 for now which is working fine anyway.

Cheers for the awesome gem!

@boazsegev
Copy link
Owner

Oops... It might be my bad... I tried to fix what might have gone wrong...

please update to version 0.2.9 and review.

Also, if you could (in case the error didn't go away) send me the full error report... It's easier to find the error using the traceback that shows what lines of code in the gem's files raised the exception.

@Subtletree
Copy link
Author

It works! Thanks mate.

I'll include the full error report next time

@boazsegev
Copy link
Owner

Thanks for keeping me posted, and thank you for pointing out the issue.

boazsegev pushed a commit that referenced this issue Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants