When imagemagick converts a single page PDF to images, it uses a slightly different template for the filename -- [fid].jpg instead of [fid]-[page#].jpg like it does with multi-page PDF's. pdf_to_imagefield isn't accounting for this, and therefore isn't saving single page PDF images properly. Attached is a patch that should fix this.

CommentFileSizeAuthor
pdf_to_imagefield_single_page.patch2.09 KBmcarbone

Comments

primerg’s picture

I applied the patch and it worked for me. I haven't experienced error yet. I will report if I do experience anything weird. Thanks for the patch!

2ndmile’s picture

Patch applied with no problems or adverse side-effects. Thanks!

d.cox’s picture

Thank you, patch works great!

vectoroc’s picture

Status: Needs review » Reviewed & tested by the community

+1

baronmunchowsen’s picture

Patch works an absolute charm! +1

tigron’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev

Is this patch needed for the Dev ? I did a dry run and received a Hunk #1 failed at 119. Should I revert back to the beta ?

Update: The patch was needed in my case with the dev. I applied the patch manually and everything works now.

Thanks for the patch !!

mcarbone’s picture

Thanks, I should've created the patch on dev originally. In any case, I just ran it on dev and it applied cleanly.

dman’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Problem is gone in 2.x AFAIK