i only want to import the content as text but im getting the binary values, tried something like but its doesnt work:
$data = file_get_contents("input.xps");
theres any lib that i can use? thank you
i only want to import the content as text but im getting the binary values, tried something like but its doesnt work:
$data = file_get_contents("input.xps");
theres any lib that i can use? thank you
You need a tool that can convert .xps files. There is a GhostScript variant called gxps
which does exactly that. http://ghostscript.com/GhostXPS.html
Conversion to text would be a two step process with it, but still simple:
exec("gxps -sDEVICE=pdfwrite -sOutputFile=input.pdf -dNOPAUSE input.xps");
$text = exec("pdftotext input.pdf");