The local staging process for pdf documents does not handle previews as expected
Steps to reproduce:
- create a webcontent showing a pdf document
- publish the page from staging to live (with all referenced documents)
- -> the page with the web content and the document will be available on live
- publish the page again (without changing the document)
- -> the previews of the document are no longer available on live.
The problem is in PDFProcessorImpl.
The publishing of generated files has two steps:
- delet all generate files on live
- copy the generated files from staging to live
The export method does not set any attributes if a direct binary import was detetcted. On the other side, the import method does nothing if the number of preview images was not available as an attribute. This has no impact on the first publication, because the previews will be generated after adding the document. But in further steps, the import function will ony delete the previews.
Note: The thumbnail function works as expected.
See PDFProcessortImpl.importPreview. It does not decide between direct binary exports and lar export. If a binary export was detected the method must get the number of previews from the original document instead of doing nothing.