Page 1 of 2

Preview issues (new I think)

PostPosted:Wed Sep 10, 2014 5:32 pm
by opensourced
I've done a search on the forums, but not found anything quite like my issue. I'm on 6.3 with Libreoffice 4. After solving issues with soffice by adding path variables to the environment, I can successfully "download as pdf". The pdf works, looks good, and sits in the cache/pdf directory.

However, as soon as I click preview, the pdf is regenerated in cache/pdf but not as a valid pdf. I can watch the datestamp and filesize change (but not the file name). Needless to say, pdf2swf then fails (I've also confirmed this from the command line).

After this point "download as pdf" then downloads the bad file. If I delete the pdf from the cache, I can then create it and download it again.

Ideas? Thanks.

Re: Preview issues (new I think)

PostPosted:Wed Sep 10, 2014 5:58 pm
by opensourced
As an addendum. If I create the pdf via "download as pdf", then run the pdf2swf command in the command line, I can then successfully preview the file. For some reason, clicking preview is causing the pdf to be recreated, but not as a valid one. Now there is a valid swf, I can flick backwards and forwards between properties and preview with no problem.

Re: Preview issues (new I think)

PostPosted:Sat Sep 13, 2014 9:32 am
by jllort
First of all, what openkm version are we talking about.
Explain with detail in a nutshell. For what I understood:
1- .doc file -> download as pdf goes right
2- previewing goes wrong ( you consider pdf file in cache is wrong )

is that ?

Re: Preview issues (new I think)

PostPosted:Mon Sep 15, 2014 8:18 pm
by opensourced
6.3 community version

Yes, in essence:

1. Upload a new file (therefore there's no pdf in the cache directory)
2. Download as pdf - correct conversion, and working pdf in cache directory
3. Click Preview tab - pdf in cache gets replaced by a non-working pdf (always 4kb), resulting in pdf2swf failing
4. Download as pdf - downloads same non-working pdf until I go and delete the pdf from cache
5. I can manually use pdf2swf from the command line to create the flash file - this results in preview working

As I click the preview tab, for some reason it is recreating the pdf, except it's a corrupt version

Re: Preview issues (new I think)

PostPosted:Wed Sep 17, 2014 9:32 am
by pavila
I can't reproduce it with last submitted code. Please, try with tonight night build from http://integration.openkm.com/6.3/

Re: Preview issues (new I think)

PostPosted:Wed Sep 17, 2014 1:52 pm
by opensourced
Pavila, are you on Windows? Sorry, may have missed mentioning that.

Re: Preview issues (new I think)

PostPosted:Wed Sep 17, 2014 4:59 pm
by opensourced
Here's a video of me recreating the error:

https://dl.dropboxusercontent.com/u/25073863/openkm.mp4

Re: Preview issues (new I think)

PostPosted:Wed Sep 17, 2014 5:00 pm
by opensourced
The only thing 'odd' about my install is that I had to move the port to 8085..

Re: Preview issues (new I think)

PostPosted:Fri Sep 19, 2014 5:36 pm
by jllort
The video is clear, but is quite strange we've cannot reproduce it. Do you got some crypt feature or similar installed in this computer ( folder, etc... ) ?

Re: Preview issues (new I think)

PostPosted:Mon Sep 22, 2014 2:46 pm
by opensourced
Not that I'm aware of...

Re: Preview issues (new I think)

PostPosted:Mon Sep 22, 2014 3:30 pm
by opensourced
Could someone provide some help with using that nightly release .war in my system please? I have data in the system already, so I can't risk losing that.

Many thanks

Re: Preview issues (new I think)

PostPosted:Wed Sep 24, 2014 9:36 am
by jllort
Don't worry, you won't lose anything ( anyway is always good practice got backup before doing upgrades ). The migration guide for it should be http://wiki.openkm.com/index.php/Migrat ... 3_to_6.3.1

Re: Preview issues (new I think)

PostPosted:Wed Oct 22, 2014 2:21 pm
by opensourced
Just getting back to this. How do I run:

DELETE FROM OKM_CONFIG WHERE CFG_KEY='system.ghostscript.ps2pdf';

when OpenKM is not running?

EDIT: I guess the "restart openkm" is missing - upgraded fine

Re: Preview issues (new I think)

PostPosted:Wed Oct 22, 2014 3:55 pm
by opensourced
Okay, I'm now on 8173 latest dev version - the issue is exactly the same as before with the bad file replacing the good one in cache...

I was really hoping that would help

Re: Preview issues (new I think)

PostPosted:Thu Oct 23, 2014 2:55 pm
by jllort
After the upgrade did you removed all the contents into cache folder ? I suggest doing it