I would like to convert images from one pdf field to several image fields.
For example: I use one image field as 'cover' for node (has one value) and other image field as 'preview images' (has unlimited values), and I would like to generate images for these fields from one pdf field.

Comments

skdrupal88’s picture

Status: Active » Needs review
StatusFileSize
new7.21 KB

My patch should fix it.

dman’s picture

Hm, it looks good that you were able to do this with such a comparably small patch!

Just in regards to what it is that you were actually doing - I've been able to get the result I wanted by using and adapting https://drupal.org/project/field_multiple_limit to my needs.
I wanted to :
* convert all pages of a PDF
* Just show a linked front page of the PDF in the teasers
* and show images of the full document in full view.

Rather than change the data, or the schema and way that the data was managed internally, I realized that this was actually a display job, so the choice to 'just display one item' is to be managed through the field rendering options.
Is this similar to what you are trying to achieve? I'm not sure that the complexity additional 'multiple' target fields is worth it.
But good patch! I'd have to actually try it out and see if the UI makes sense.

skdrupal88’s picture

Thanks for the quick response!
I have the similar task, of course the better way to use one image field and configure display to output one value for 'cover' and multiple values for 'preview images', but I need separate fields for some reasons, and the first of it - I should store 'cover' image in public directory and 'preview images' in private directory.
I think this is good feature without a big structure changes, maybe it can be useful for some people.

dman’s picture

Yeah cool, I think that the 'preview' and 'private' split is a very good explanation of a use case!
I just thought I'd suggest a quick shortcut for the most obvious case for this.

I like that it looks like this can go in without big structure issues, so it's probably good to go.

skdrupal88’s picture

Any updates here?

hitchshock’s picture

Status: Needs review » Closed (outdated)

We stopped supporting the D7 version, so the ticket will be closed, but thanks to everyone who was working on the ticket!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.