• Readonly in FlexPaperViewer

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #42240  by netops
 
I am using openkm-6.3.0 community edition on Centos-6.5 with viewer FlexPaperviewer.

Basically it gives print & copy option while preview the document. My requirement is that user can't print & copy the document through preview. As per openkm forum references it can be achieved by enabling readonly=true in flexpaper viewer that is possible in commercial version only. Please suggest will it possible to integrate commercial version FlexPaperviewer with community edition openkm-6.3.0? If yes, please provide the steps and where we can get commercial version FlexPaper that will work with Openkm-6.3.0.

Please advise or provide any alternate solution for this requirement.

OS - Centos 6.5 x64 Bit
OpenKM Version- 6.3.0 Community Edition.
Browser - IE8-11, Chrome & Mozilla.
 #42241  by jllort
 
It's possible integrating flexpaperview, basically must overwrite non commercial version by commercial version and then make a minor change in a Utils.java class and the method you should be interested in modifying is named createPDFViewerFlexPaper
https://sourceforge.net/p/openkm/code/H ... /Util.java

I suggest for making the change user our OpenKM portable development edition at https://sourceforge.net/projects/openkmportabledev
 #42247  by netops
 
Hi jillort,

Thanks for reply. Could you please advise about costing on commercial version of flexpaperviewer with readonly & without readonly (both edition) and what minor changes need to do in java utils. You may reply all these things on netops1@xxxyyy.com also if anything prevent you to share these details at open forum.

Please feel free to revert in case further information needed from my side.
 #42251  by jllort
 
I have removed your mail address for preventing spam etc...

I do not exact remember the cost of the flexpaper license, but sure it was less 1000$.

I observe the website has changed http://flexpaper.devaldi.com/, now is https://flowpaper.com/ you should be interested on it https://flowpaper.com/annotate-pdf-documents-online.jsp ( you can try here https://flowpaper.com/download.htm )

You can also take a look here https://github.com/flexpaper/flexpaper
 #42253  by netops
 
Thanks jllort for valuable effort in this regard.

Could you please advise the changes that needs to done in Utils.java (as per your past thread in this post), etc in OpenKM while integrating it with FlexPaperViewer. I have found one document at http://vigrond.com/blog/2011/06/05/prot ... laceHolder duing googling. Here vigrond had described the steps to disable print option in flexpaperviewer.

It would be helpful if you guide the changes needed in OpenKM for changed flexpaperviewer.
 #42256  by jllort
 
I have seen it https://flowpaper.com/parameters.jsp ( in commercial flexpaper there's a parameter named PrintEnabled : printEnabled, )

In professional edition the flexpaper method is:
Code: Select all
public static native void createPDFViewerFlexPaper(String pdfUrl, String width, String height, String printEnabled,
			String licenseKey, String flashId, String container) /*-{
		if (printEnabled == 'true') {
			fpViewer = "../js/flexpaper/FlexPaperViewer.swf";
		} else {
			fpViewer = "../js/flexpaper/FlexPaperViewerRO.swf";
		}
		
		pdfUrl = encodeURIComponent(pdfUrl);
		$wnd.swfobject.embedSWF(fpViewer, container, width, height, "10.0.0", "playerProductInstall.swf",
			{
				SwfFile : pdfUrl,
				Scale : 1.0,
				key : licenseKey,
				ZoomTransition : "easeOut",
				ZoomTime : 0.5,
				ZoomInterval : 0.1,
				FitPageOnLoad : false,
				FitWidthOnLoad : false,
				PrintEnabled : printEnabled,
				FullScreenAsMaxWindow : false,
				ProgressiveLoading : true,
				
				// PrintToolsVisible : printEnabled,
				ViewModeToolsVisible : true,
				ZoomToolsVisible : true,
				FullScreenVisible : true,
				NavToolsVisible : true,
				CursorToolsVisible : true,
				SearchToolsVisible : true,
				localeChain: "en_US"
			},
			{
				quality : "high",
				bgcolor : "#ffffff",
				allowscriptaccess : "sameDomain",
				allowfullscreen : "true"
			},
			{
				id : flashId,
				name : flashId
			});
	}-*/;
 #44883  by ulinuha
 
netops wrote: Tue Sep 06, 2016 1:47 pm Thanks jllort for valuable effort in this regard.

Could you please advise the changes that needs to done in Utils.java (as per your past thread in this post), etc in OpenKM while integrating it with FlexPaperViewer. I have found one document at http://vigrond.com/blog/2011/06/05/prot ... laceHolder duing googling. Here vigrond had described the steps to disable print option in flexpaperviewer.

It would be helpful if you guide the changes needed in OpenKM for changed flexpaperviewer.
Now it works:
Capture.PNG
Capture.PNG (26.67 KiB) Viewed 4198 times
Thanks for your information to vigrond.com page.
In order to use his modified readonly flexpaper swf file (file attached), you should modify some part of one line in several *.cache.html file inside folder: "...\tomcat-7.0.61\webapps\OpenKM\frontend". PS: Each cache html file will be used for different browser, so you need to update all of the files in order to make it works in every browser.

for example in file: 7F2226E203FD85C8A6200A1D5F8CE418.cache.html
you should change line 10633:
Code: Select all
SwfFile:a,Scale:0.6,ZoomTransition:'easeOut',ZoomTime:0.5,ZoomInterval:0.1,FitPageOnLoad:false,FitWidthOnLoad:true,FullScreenAsMaxWindow:false,ProgressiveLoading:true,ViewModeToolsVisible:true,ZoomToolsVisible:true,FullScreenVisible:true,NavToolsVisible:true,CursorToolsVisible:true,SearchToolsVisible:true,localeChain:'en_US'}
into:
Code: Select all
SwfFile:a,Scale:-0.6,ZoomTransition:'easeOut',ZoomTime:0.5,ZoomInterval:0.1,FitPageOnLoad:false,FitWidthOnLoad:true,PrintEnabled:true,MinZoomSize:0.2,MaxZoomSize:8,InitViewMode:'Portrait',ViewModeToolsVisible:true,ZoomToolsVisible:true,NavToolsVisible:true,CursorToolsVisible:true,SearchToolsVisible:true,localeChain:'en_US'}
After make a modification, refresh your browser and ensure that your browser doesn't load swf file & *.cache.html file from cache.
Once you're sure that it works, goto folder "...\tomcat-7.0.61\webapps" find file OpenKM.war. open it with winrar, navigate to frontend folder. upload your modified *.cache.html files into this folder. this is to ensure that once openkm.war refresh our website, it replaces with the modified one.

I attached my modified cache.html files that you can use.
BEFORE MAKE ANY CHANGES, DONT FORGET TO MAKE BACKUPS!

Anyway, this modification won't prevent user to download the files since while user access the openkm from mobile/ phone, its default action is downloading the file and view it using default external application instead of using flash viewer like in desktop browser. Any solution about this (without discarding the ability to access openkm from mobile)?
Attachments
(865.96 KiB) Downloaded 190 times
(783.71 KiB) Downloaded 180 times
(864.67 KiB) Downloaded 187 times
modified readonly swf file
(392.03 KiB) Downloaded 216 times
 #44891  by jllort
 
Please do a fork of openkm project and then make the modifications in your branch and when you got it ask for a merge request into 6.3-DEV
https://github.com/openkm/document-management-system

Take in consideration we have removed flexpaper viewer and we have updated with newer what works in HTML5 ( that is caused because non comercial version of flex paper only works with flash player what will no longer be supported by browsers ).

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.