viewing pdf documents

Started by zeiter, October 30, 2016, 11:38:03 PM

Previous topic - Next topic

zeiter

apologies if this topic has been covered elsewhere - my searches failed to find the answer

can pdf documents be displayed in IMatch
(i) as thumbnails in the file window? and/or
(ii) as documents in the viewer?

I have just started to use IMatch, so I'm still very much a novice. I would like to use IMatch to store both my photos (which are mainly jpeg files), and my documents (which are mainly pdf and text files).

My version of IMatch is 5.7.2; I'm using Windows 7 SP1 64-bit.
I view my pdf files using PDF XChange Editor made by Tracker software (www.tracker-software.com); this software includes a "shell extension" that allows pdf thumbnails (i.e. a view of the first page of the document) to be viewed in Windows Explorer
[I don't have Adobe Acrobat installed as I prefer the Tracker alternative]

When I load pdf files into IMatch, their filename is readable in the file window, but I don't see thumbnails of their first page in the file window, and  the viewer won't display them. [but they will load into PDF XChange Editor by pressing ctrl-enter from the file window]

I like pdf as a document format as it is widely supported in scanner software, and it supports multi-page documents. Tiff would be the alternative format, if that's better supported by IMatch; or else I guess I can just use a 3rd party pdf viewer like PDF XChange Editor outside IMatch

However, it would be very slick if IMatch was able to view pdf files - am I doing something wrong that stops them being viewed within IMatch?

Mario

IMatch creates thumbnails for PDF files using functions provided by Windows. Windows itself relies on so-called shell extensions to render thumbnails for PDF files. When you install Adobe Acrobat Reader or another PDF reader software, a shell extension which allows Windows to render PDF thumbnails in Windows Explorer is usually installed as well. I don't know what Tracker is or if it includes such an extension.

IMatch also checks if a WIC codec is installed that supports the PDF file format. If one is found, IMatch uses it instead of the Windows functions. PDF WIC codecs are usually faster. The Fast Picture Viewer Codec pack includes a PDF codec. Note: Not all shell extensions or WIC codecs support all PDF files. There are too many PDF flavors in use today.

If none of the above conditions is met, IMatch is unable to produce thumbnails or previews for PDF files.
Since most users have Acrobat Reader installed, this usually 'just works'.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I am using the PDf exchange editor and I see thumbnails in explorer and also in Imatch.
But I don't know why because when I run Help->Support->WIC Diagnostic it tells me it can not decode the file????

(What is shown as thumbnail seems to depend very much on the program which creates the PDF file. Not always what I expect)

Mario

QuoteBut I don't know why because when I run Help->Support->WIC Diagnostic it tells me it can not decode the file????

This just means that you have no WIC codec installed which supports PDF files.
IMatch then falls back on the thumbnailing services provided by the Windows shell, which uses the shell extension of Acrobat Reader or whatever PDF reader is installed.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

rlgreen

I'm using Windows 7 64-bit as well, and there is now a quite long history of Adobe neglecting to support PDF thumbnailing in 64-bit Windows. While I can't speak for Windows 8 or 10, I have seen enough complaints in Google results to assume the issue may exist there as well.

FastPicture Codec. This codec pack enables thumbnail support for ... PDF files "provided they contain an XMP metadata packet with an embedded thumbnail"  I downloaded the trial. As the vast majority of my PDF's don't meet those requirements, it will not render thumbnails in Windows Explorer or Imatch.

A solution that worked for me is discussed here along with a installable (and uninstallable) fix:
https://www.pretentiousname.com/adobe_pdf_x64_fix/
Fixes for 64-bit Adobe Reader preview handler and thumbnails

The page is now a bit dated but still relevant to Win 7 64-bit. Although it discusses Windows Explorer thumbnails I can confirm the fix offered does allow generation of PDF thumbnails within Imatch 5 after using the Rescan...Force Update command on selected PDF files. I downgraded Adobe Reader to X1 (from DC) but unsure if a pre-DC Reader version is necessary for the fix to work.

BTW, Imatch is a marvelous PDF document manager, and it's unfortunate that capability is not better known.

Mario

Very interesting. Thanks for sharing  :)

QuoteBTW, Imatch is a marvelous PDF document manager, and it's unfortunate that capability is not better known.

IMatch happily manages your images, PDF files, Office documents, video files, MP3 files and more. It's a true DAM, not limited to images only.

The problem is to get the word out. The Internet (aka Google) favors big vendors. Paid ads often rule what's on top of search engine results - and they are way to expensive for me (starting without a budget of at least 100US$ per day is futile).

I can only rely on satisfied users to tell other about IMatch.

We recently had an interesting thread at dpreview where a user searched for alternatives to IMatch, tried Lr etc. and then finally went with IMatch again. It seems IMatch does a great job for him, which is cool. He has recommended IMatch to several other users, which is the best marketing I can get.

Regarding PDF thumbnails...

There are several developer toolkits I could use. Most of them are designed to create PDF files from within an application, but some also have extract pages and thumbnails from PDF files. I tried the two major products, but despite the fact that they cost 1000US$ plus several hundred dollars per year in maintenance fees, none of them could extract thumbnails for all PDF files in my sample collection. Doh!

An alternative is to use the free Ghostscript software to extract thumbnails manually and save them as JPEG files. If you then create a file relation with the PDF as the master, the JPEG thumbnail as the proxy version, Match will display thumbnails for your PDF files.

Ghostcript is free, but due to its licensing terms I cannot ship it or include it in IMatch.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

Quote from: Mario on November 08, 2016, 02:58:54 PM
Ghostcript is free, but due to its licensing terms I cannot ship it or include it in IMatch.

Are you allowed to discuss it in the manual? If so then adding the information about extracting pages and keeping them as a buddy file would be useful.
Could there be a batch processing option within IMatch to extract first page of PDF files? Clearly the user would need to add Ghostscript before the process was operational.

Aubrey.


Mario

Ghostscript has commands to do all this already, it's a command line tool. We mentioned this a few times over the years in the old user forum and this community. There is not enough interest in this. For most people, installing Acrobat Reader is all they ever need.

If users are interesting in such things, they can use the Ghosstscript web site or just google for

https://www.google.com/#q=ghostscript+extract+thumbnail+from+PDF

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Hambra

I know this topic has been inactive for a long time. But I have been struggling with the same problem for some time. And given up several times in frustration.

IMatch (5.8.4) was not producing Thumbnails for PDF documents and not showing a preview in the built in viewer. Instead, there was a placeholder PDF logo in both cases. When newly added PDF documents were scanned, the message was "WIC codec missing".

Adobe Acrobat DC is installed. In Windows Explorer thumbnails for PDF documents were being shown normally. All attempts with installing other PDF Readers (Foxit etc) did not produce any improvement.

I did not install FastPcitureViewer codecs since some forum members here regarded them as less than perfect for PDF.

(PDF thumbnails that had been produced some years earlier in an earlier version of IMatch, probably with an earlier version of Acrobat REader installed, were still available, but the documents also did not open in the built in viewer.)

The solution:

In Acrobat Reader DC there is a setting that specifically enables PDF thumbnails

Preferences > General > Enable PDF thumbnail previews in Windows Explorer

This was NOT set by default; Windows Explorer thumbnails must have been produced by a Windows process, not by Acrobat Reader.

When I enabled thumbnail previews in Acrobat Reader, it appeared to install an additional component to the programme. After that, a forced rescan in IMatch finally produced PDF thumbnails and a preview in the built in viewer. Its pretty slow, but it works - FINALLY.

The solution was hidden in a reference to an Adobe forum in an older post on the subject in this forum but was not identified as a solution there.

https://www.photools.com/community/index.php?topic=5464.0

Hope this helps!

Mario

Thanks for sharing. I think I recall that this was on by default previously. Maybe Adobe decided to turn if of because their component sometimes produces program crashes or gets stuck with certain PDF files.

IMatch 2017 still prefers a WIC codec for PDF, but does not longer warn about a missing codec (for PDF files, it still warns for image files).
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Art

Thanks for sharing.

I made Acrobat DC the default PDF viewer and turned on the enable PDF preview and then did a force update of PDF files that had no thumbnail.

Doing a large batch of files still left some PDFs without a preview or incomplete preview, but a second force update of smaller batches solved that problem.

However.... even though some of those PDFs do have the correct thumbail, some of those files that initially had an incomplete preview are still showing this (older) incomplete preview in the quickview window whereas other updated files do show the updated complete thumbnail. Running a database diagnostic solved most of those issues, but there were still just a few PDFs showing the old thumbail.

Is this just a result from buggy acrobat thumbnails/previews or could there be something (e.g. setting) in iMatch somewhere that makes the old thumbnail more persistent than it should be?

Mario

When you do a forced update, IMatch re-creates both the thumbnail and the cache file - from the same source. This means that they should be the same. If both the thumbnail and a cache image are needed, Match internally extracts the largest possible image from the source file (PDF in this case) and creates the thumbnail ba scaling the file down, and the cache image from the original result. I don't see how they could differ in the end...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Art

#12
Could it be that somehow the cache image occasionally does not get updated when force updating the preview if there is already a thumbnail in the cache? The issue mostly applies to PDFs that already have a thumbnail, either small size or incomplete.
Or it could be this https://www.photools.com/community/index.php?topic=6672.0 issue when doing a force update of the PDF files, though it were only some 2,000 PDFs at most instead of 200,000 files

Mario

When IMatch rescans an updated file (or during a forced update) it re-creates the thumbnail. It checks the cache options and if always caching is on, or on-demand caching is on and the file already has a cache image, it also re-creates the cache image.

Did you try Shift+Ctrl+F5 Re-create cache image only? Does this change anything?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Art

With the one or two I tried it did not make a difference. I'll try again later once I have finished the forced update of smaller batches of PDF file instead of doing them all at once.

Art

#15
I just came across a few more where the thumnail updated but the preview image not and noticed a pattern.

When updating thumbnails/previews for a group of PDF files using force update, only the last one keeps the incomplete preview, even though the thumbnail in the overview is correctly updated. Using update cache image makes no difference for the preview image in QuickView.

If I select that one odd file and the next one having a proper thumbnail and preview and then do another force update then the incorrect preview of the last one with an incorrect preview updates as well to be in line with the thumbnail.

If I select the set of PDFs that need their thumbnails updated AND the next adjacent one with a proper thumbnail/Quickview preview then all incorrect thumbnails get updated properly incl. the quickview preview for the last one with an incorrect preview. So it looks like something is behaving differently for the last PDF file of a set (and perhaps also images?) during a force update of the thumbnails.

Not sure what is causing this, but it is repeatable over a few sets of such updates. Unfortunately I cannot share these PDF files, but perhaps the info above is sufficient to get an idea of what might be happening.

Mario

Can you please attach an IMatch log file in debug mode (Help > Support > Debug Logging) from your test? And supply the name of the "last" not updated PDF so I can check in the log if there is something different for that file?

Just in case a cache gets in the way: Did you try to close and re-open the database? If the preview then becomes correct, we have another hint.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Art

I'll test the opening/closing for the next set where I encounter this incomplete update and let you know.  Regarding log file, I'll contact you privately on that later.

Art

Closing and re-opening did not solve the issue.
As an experiment I tried to select in reverse order when updating the thumbnails to see if the last selected one is the only one not getting updated, e.g.  files 1,2,3,4,5 were selected with shift starting at 5 and ending at 1. Now none of the existing previews did update properly though the thumbnails in the overview did.

Then by accident I found the cause of the last selected PDF file not updating properly. When the QuickView panel is open and the last selected PDF file is showing in QuickView panel the thumbnail image does update, but the cached preview does not. If QuickView panel is closed then all PDF files do have both the thumbnail and cached preview updated properly.

Assuming QuickView is read only, it should be possible to update the cached preview as well, I'd think that if it is possible to update the thumbnail then it would be possible to update the cached preview image as well. E.g. when I opened the log file in UltraEdit while IMatch is still running IMatch could continue updating the the log file and UltraEdit would show a file changed message with the question if I wanted to reload the file. It seems as if QuickView is somehow allowing the thumbnail to be updated but not the cached preview e.g. because it locks access or something like that, unless it is something else in IMatch that makes this happen?

Mario

The Quick Preview panel uses DirectX and Windows WIC to render images. Most likely WIC has still locked the file, or the WIC codec has. This is pretty much a black box, really.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Art

Mario, thanks for the black box clarification. It is just too bad that Windows/WIC lock previews but there is not much you can do about that. At least the problem is more or less solved now thanks to all the info.

Mario

Well, it should not lock the file. IMatch lets it read the file into memory, and then closes the file again.

I just tried this by selecting a PDF file in the file window while the Quick View Panel was open.
I determined the name of the corresponding JPEG cache file, opened the folder in Windows Explorer and could delete it without any problem. So, no lock.

Maybe you can try the same.
The quickest way to find out the cache file name is by using this variable

{File.CacheFileName}

in the Var Toy App.

You can then use this directly with the del command from a command prompt window or you locate the file in Windows Explorer and delete it.
Does this work?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Art

When I try to delete the cached image as per your description it generates the following error message (while the PDF file was selected and the preview showing in QuickView panel):