Re: Lauching FOP through powershell

Jean-Pierre Lamon <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
Hi Simon,

Thanks for your reply. I will test this. I now have more infos from my 
customer. All was running perfectly till the last Windows update.
He now recieved this message :

org.apache.fop.apps.FOPException: you can only set one output method

The funny thing is that on another computer with the same Windows update 
installed, all is running perfectly???
Java version? Other?

Java version :

1.8.0_281 -> ok
1.8.0_301 -> you can only set one output method

JP

Le 26.09.2021 à 17:47, [email protected] a écrit :
> Hi,
>
> You should try to simplify the cmd to, instead of referencing each jar:
> java -cp "build/fop.jar;lib/*" org.apache.fop.cli.Main <args>
>
> Thanks
>
> -----Original Message-----
> From: Jean-Pierre Lamon <[email protected]>
> Sent: 26 September 2021 15:02
> To: [email protected]
> Subject: Lauching FOP through powershell
>
> Hi all,
>
> Windows : For users who don't have the right to run * .bat files, I try to use powershell. Through a cmdline. All runs perpectly through fop with this command :
>
> fop.bat -c "C:\ezpump\FOP\fop.xconf" -xml "C:\ezpump\XSL\TOC_BHS\BHS 2014.xml" -xsl "C:\ezpump\XSL\TOC_BHS\fo_List_with_table_of_content_BHS.xsl" -pdf "C:\ezpump\XSL\TOC_BHS\BHS 2014.pdf"
>
> So, I try this command line with powershell :
>
> powershell -File "C:\ezpump\FOP\fop.ps1" -c "C:\ezpump\FOP\fop.xconf"
> -xml "C:\ezpump\XSL\TOC_BHS\BHS 2014.xml" -xsl "C:\ezpump\XSL\TOC_BHS\fo_List_with_table_of_content_BHS.xsl" -pdf "C:\ezpump\XSL\TOC_BHS\BHS 2014.pdf".
>
> I only get a  new window that opens and closes very quickly. PDF is not generated.
>
> Permissions for running scripts is activated.
>
> What am I doing wrong?
>
> Here is my fop.ps1
>
>
> $LOCAL_FOP_HOME=$PSScriptRoot
> $FOP_CMD_LINE_ARGS="$args"
> $LIBDIR=$LOCAL_FOP_HOME+'\lib'
> $LOCALCLASSPATH=$LOCAL_FOP_HOME+'\build\fop.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\xml-apis-1.3.04.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\xml-apis-ext-1.3.04.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\xercesImpl-2.7.1.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\xalan-2.7.0.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\serializer-2.7.0.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\batik-all-1.7.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\xmlgraphics-commons-1.5.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\avalon-framework-4.2.0.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\commons-io-1.3.1.jar'
> $LOCALCLASSPATH=$LOCALCLASSPATH+';'+$LIBDIR+'\commons-logging-1.0.4.jar'
>
>
>
> $windir=[System.Environment]::ExpandEnvironmentVariables("%WINDIR%")
> $javaopts='-Denv.windir='+$windir+' -cp "'+$LOCALCLASSPATH+'"
> org.apache.fop.cli.Main '+$FOP_CMD_LINE_ARGS
>
> Start-Process java -args $javaopts
>
>
> # SIG # Begin signature block
> # MIIeagYJKoZIhvcNAQcCoIIeWzCCHlcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
> # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
> # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBGsimPWa1AD3pZ
> # qm6+gm14aWlUdrsyKeyd3xF1Hg4m2KCCGUIwggPuMIIDV6ADAgECAhB+k+v7fMZO
> ...
> # /fYAckBvj+fDZ3v762Y=
>
> # SIG # End signature block
>
> Thx for help
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.