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

pdf_properties doesn't take opts param #2

Closed
asgerb opened this issue Jan 14, 2015 · 4 comments
Closed

pdf_properties doesn't take opts param #2

asgerb opened this issue Jan 14, 2015 · 4 comments
Labels

Comments

@asgerb
Copy link
Collaborator

asgerb commented Jan 14, 2015

Getting ArgumentError - wrong number of arguments (1 for 0) when using pdf_properties(spreads: true).

@asgerb asgerb added the bug label Jan 14, 2015
@tomasc
Copy link
Owner

tomasc commented Jan 15, 2015

Can you try to fix it?
Fork, add failing test, fix it, commit, send pull request.
?
T

@asgerb
Copy link
Collaborator Author

asgerb commented Jan 15, 2015

For sure! Tried to look at the dragonfly ImageMagick plugin to see how they allow the passing of the params, doesn’t seem different from what we have weirdly.

@asgerb asgerb self-assigned this Jan 15, 2015
@tomasc
Copy link
Owner

tomasc commented Jan 22, 2015

I guess we should just return values for both options – with spreads & without.

The hash then could look like this:

{
  info: pdf.info,

  aspect_ratios: aspect_ratios(pdf, false),
  heights: heights(pdf, false),
  page_count: page_count(pdf, false),
  page_numbers: page_numbers(pdf, false),
  spread_count: spread_count(pdf, false),
  widths: widths(pdf, false),

  spreads: {
    aspect_ratios: aspect_ratios(pdf, true),
    heights: heights(pdf, true),
    page_count: page_count(pdf, true),
    page_numbers: page_numbers(pdf, true),
    spread_count: spread_count(pdf, true),
    widths: widths(pdf, true)
  }
}

What do you think? Do you want to give it a shot?

T

@asgerb
Copy link
Collaborator Author

asgerb commented Jan 22, 2015

Cool, yeah I’ll give it a try ;)

tomasc added a commit that referenced this issue Jan 22, 2015
@asgerb asgerb closed this as completed Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants