Hi Simon,

I was stupid enough not not update to FOP 2.5
After the upgrade, all runs perfectly by me ;-)
My next hope : that it works for my customer ;-)

Thx again for your help
JP

Le 27.09.2021 à 09:51, Jean-Pierre Lamon a écrit :
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, simonsteiner1...@gmail.com 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 <g...@ngscan.com>
Sent: 26 September 2021 15:02
To: fop-users@xmlgraphics.apache.org
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: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to