Hi,
I've been tryiong to a print secured document through Adobe Livecycle’s web service interface (Digital Rights Management and OutputService).
I made a research in the documentation of the livecycle’s web services and founded some methods about printing PDF files (sendToPrinter).
I developed a standalone application that prints a PDF file using the webservices, but it did not worked with a document with a security policy applied to it.
Did you know anyway to print a secured pdf using livecycle rights management webservices or any other RTP?
You will need to "unlock" the document first. Remember, a rights managed PDF is encrypted and you must be an "authenticated" user to open\view the document, and the user must have sufficient permissions to do things like print. The "unlock" operation allows the document to be "opened" on the server side. You will also need to make sure that you configure the process that is using the "unlock" operation to "Run As" a user that is specified in the policy and has sufficient permissions.
Regards
Steve
Hi,
thanks for helping me, I tryed to unlock the document and worked partially: the "unlockPdfUsingPolicy" output is a PDF file, and when I used the "sendToPrinter" it did not worked. The printed started to print crazy chars etc...
I made some reseach and realized that the PDF must be flattened before pass it to the "sendToPrinter".
I tryed the "transformPDF", but I've got errors about some Security Handlers.
I also tryed to convert the unlocked pdf to Postscript before send it to the printer, but I got the error:
ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(Defaul tPOJOInvokerImpl.java:152)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(In vocationInterceptor.java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.int ercept(DocumentPassivationInterceptor.java:53)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.do InTransaction(TransactionInterceptor.java:74)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapt erBean.doBMT(EjbTransactionBMTAdapterBean.java:197)
at sun.reflect.GeneratedMethodAccessor769.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S tatelessSessionContainer.java:237)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo ke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation Interceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte rceptor.java:121)
at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxI nterceptorBMT.java:173)
at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:7 7)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat elessSessionInstanceInterceptor.java:169)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor. java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto ryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:6 48)
at org.jboss.ejb.Container.invoke(Container.java:960)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalPro xyFactory.java:430)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSes sionProxy.java:103)
at $Proxy389.doBMT(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute (EjbTransactionProvider.java:95)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.inte rcept(TransactionInterceptor.java:72)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.inte rcept(InvocationStrategyInterceptor.java:55)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept( InvalidStateInterceptor.java:37)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept (AuthorizationInterceptor.java:188)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterc eptor.java:48)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineI mpl.java:115)
at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMes sage(AbstractMessageReceiver.java:93)
at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessa geDispatcher.java:209)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(A bstractMessageDispatcher.java:66)
at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:2 08)
at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:886)
at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.transientInvoke (WorkflowDSCInvoker.java:347)
at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(Workflow DSCInvoker.java:158)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(In vocationInterceptor.java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.int ercept(DocumentPassivationInterceptor.java:53)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.do InTransaction(TransactionInterceptor.java:74)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapt erBean.execute(EjbTransactionCMTAdapterBean.java:357)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapt erBean.doRequiresNew(EjbTransactionCMTAdapterBean.java:299)
at sun.reflect.GeneratedMethodAccessor607.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S tatelessSessionContainer.java:237)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo ke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat elessSessionInstanceInterceptor.java:169)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation Interceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte rceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep torCMT.java:404)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1 81)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor. java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto ryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:6 48)
at org.jboss.ejb.Container.invoke(Container.java:960)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalPro xyFactory.java:430)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSes sionProxy.java:103)
at $Proxy388.doRequiresNew(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute (EjbTransactionProvider.java:143)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.inte rcept(TransactionInterceptor.java:72)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.inte rcept(InvocationStrategyInterceptor.java:55)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept( InvalidStateInterceptor.java:37)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept (AuthorizationInterceptor.java:188)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterc eptor.java:48)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.procee d(RequestInterceptorChainImpl.java:60)
at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineI mpl.java:115)
at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.invoke(A bstractMessageReceiver.java:329)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invokeC all(SoapSdkEndpoint.java:139)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invoke( SoapSdkEndpoint.java:81)
at sun.reflect.GeneratedMethodAccessor775.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.j ava:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider .java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java: 323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg y.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454 )
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:69 9)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBas e.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206)
at com.adobe.idp.dsc.provider.impl.soap.axis.InvocationFilter.doFilter(I nvocationFilter.java:43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206)
at com.adobe.idp.um.auth.filter.CSRFFilter.doFilter(CSRFFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi lter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit yAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv e.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC onnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44 7)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: ALC-CNP-001-301: Cannot convert PDF file to PostScript.
Exception: "The security plug-in required by this command is unavailable"
at com.adobe.convertpdf.ConvertPdfBmcWrapper.convertPdftoPs(ConvertPdfBm cWrapper.java:207)
at com.adobe.convertpdf.ConvertPdfServer.convertPdftoPs(ConvertPdfServer .java:85)
at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2InTxn(Conv ertPdfServiceImpl.java:134)
at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.access$000(Conv ertPdfServiceImpl.java:45)
at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl$1.doInTransacti on(ConvertPdfServiceImpl.java:107)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapt erBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:218)
at sun.reflect.GeneratedMethodAccessor650.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S tatelessSessionContainer.java:237)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo ke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation Interceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte rceptor.java:121)
at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxI nterceptorBMT.java:173)
at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:7 7)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat elessSessionInstanceInterceptor.java:169)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor. java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto ryFinderInterceptor.java:138)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:6 48)
at org.jboss.ejb.Container.invoke(Container.java:960)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalPro xyFactory.java:430)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSes sionProxy.java:103)
at $Proxy389.doRequiresNew(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute (EjbTransactionProvider.java:133)
at com.adobe.idp.dsc.transaction.impl.DefaultTransactionTemplate.execute (DefaultTransactionTemplate.java:79)
at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2WithSMT(Co nvertPdfServiceImpl.java:103)
at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2(ConvertPd fServiceImpl.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(Defaul tPOJOInvokerImpl.java:118)
... 126 more
thanks,
Thanks for reply,
the standalone application call the webservice (unlock pdf using policy) passing user credentials, so the user has permission to view and print the file.
My standalone application will be like an Acrobat Reader, but it's not needed to view the document, just print it using the user credentials.
It is more like an command program:
C:\app\printSecuredFile.exe "PathToFile.pdf" "username" "password"
and the result is the document printed.
Steve,
Sorry, my mistake. I did not undertood the "revoke" functionality.
I'll try to clarify my needs.
I created a process in livecycle to print documents (with or without security policies).
The input of this process is a document and a string with the printer's ip address.
If the document do not have security policy applied then it is converted to PS and sended to printer. [success]
If the document is protected with a policy then the process Unlocks it and convert to PS to sendo to printer. [error]
When I invoke this process, passing a document with security policy applied and using a user that has permission to open and print the document, the following error is showed:
The message is:
ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
Caused by: com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: ALC-CNP-001-301: Cannot convert PDF file to PostScript.
Exception: "The Security plug-in required by this command in unavailable"
thanks,
Arthur Landim
Arthur
You will not be able to convert the policy protected PDF to PostScript. I explained this earlier in another thread... http://forums.adobe.com/thread/850893?tstart=0
Regards
Steve
Steve,
thanks for helping me.
Just to be clear:
it is no possible to print a secured file (security policy) file without first opening the document on adobe reader/pro or the microsoft office Livecycle DRM plugin?
Is there anyway to create an cmd program, without graphical user interface, that starts a livecycle process to print a secured (with security policy) document?
The program would be like:
C:\app\printSecuredFile.exe "PathToFile.pdf" "username" "password"
Arthur
it is no possible to print a secured file (security policy) file without first opening the document on adobe reader/pro or the microsoft office Livecycle DRM plugin?
ANSWER: If you are printing from the client, the document must be opened (user must authenticate to RM) and the permissions in the policy must "Allow Print" You cannot convert the protected document to some other format (i.e PostScript)
Is there anyway to create an cmd program, without graphical user interface, that starts a livecycle process to print a secured (with security policy) document?
The program would be like:
C:\app\printSecuredFile.exe "PathToFile.pdf" "username" "password"
ANSWER: I don't know for sure about writing a custom application to do this, but I doubt it. I do know that there is no way to use Acrobat or Reader from the command line to open and print a policy protected pdf. There is no way to pass in the user name and password. You can launch Reader from the command line and specify the PDF to open, if the PDF has a policy applied the RM login dialog will be displayed.
The Developer FAQ is available from http://www.adobe.com/devnet/acrobat/pdfs/Acrobat_SDK_developer_faq.pdf #page=24
Regards
Steve
ANSWER: If you are printing from the client, the document must be opened (user must authenticate to RM) and the permissions in the policy must "Allow Print" You cannot convert the protected document to some other format (i.e PostScript)
QUESTIONS: My client application will just invoke a process in livecycle passing the document, so the printing will be performed on server side. The user passed to the webservice connection (Credentials) will have permission to Print the document.
North America
Europe, Middle East and Africa
Asia Pacific