[Solved] Using SC savethumb on a PDF file

Things you’d like to miss in the future...
Post Reply
klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

[Solved] Using SC savethumb on a PDF file

Post by klownboy »

Don in reading over the help file, I get the impression that the input "file" can be a PDF file. It states, "Can be any format that has a thumbnail image (including video files). "

I have pdf files that have proper thumbnails, yet I get an error on using a command such as this savethumb(<curitem>, "p_i_c_1.jpg", 720,, "jpg100","4",2);} The error throw out is, "Invalid image file". It seems like I should be able to save a thumbnail as a jpg thumbnail file as in the example. The error is present regardless of the border or zoom-to-fill options. Thanks.
Last edited by klownboy on 17 Jan 2022 21:18, edited 3 times in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Using SC savethumb on a PDF file

Post by klownboy »

Hi Don, forget this one. SC "savethumb" will work with PDF files provided the user has PDFs listed in Preview Format category of Image Files. Once I added PDF to the Image Files list SC savethumb worked fine. And for user info, I should note that I had and still have PDF listed under Office files and all PDF viewing did work fine and still does after adding PDF to Images as well. Maybe those 2 categories should be a PDF default for new installs.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: [Solved] Using SC savethumb on a PDF file

Post by jupe »

That solution you proposed of adding pdf to image category as a new default, I don't think is a good idea because then when someone uses the Image generic filetype for a search/filter/etc. pdf's will get returned.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Using SC savethumb on a PDF file

Post by klownboy »

Yes, jupe I see what you mean. It may not be wise to have PDFs included in Image Generic filetypes at least not as a default. In some cases it makes sense, like for me searching for images to make folder thumbnails when I wanted to include PDFs.

So instead of saying this is "solved" maybe Don should look at it. Since the Help states, any file format that has a thumbnail image can be used as an input file for SC savethumb. It shouldn't be dependent on the user having specific image generic file types.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Using SC savethumb on a PDF file

Post by admin »

Good points! In the next beta it will just work (without changing anything in Preview Formats).

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

[Solved] Re: Using SC savethumb on a PDF file

Post by klownboy »

Thanks Don for v22.70.0016 on SC savethumb. :tup:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply