1 страниц (9 вхождений)
silent mode with php - Сообщения
#1 Опубликовано: 02.11.2019 18:58:40
Hello,
I call a .bat program from a php.
In this program there is the -silent command to turn an .sm into a .htm.
Unfortunately the result gives images with red crosses.
I guess the necessary plugins are not loaded from the .php call because the same command works well when the .bat is run directly under windows.
Would anyone have a solution to make the .bat work properly from .php ?
I call a .bat program from a php.
In this program there is the -silent command to turn an .sm into a .htm.
Unfortunately the result gives images with red crosses.
I guess the necessary plugins are not loaded from the .php call because the same command works well when the .bat is run directly under windows.
Would anyone have a solution to make the .bat work properly from .php ?
#2 Опубликовано: 04.11.2019 19:22:47
Ok, the .bat contains the following command :
"C:\Program Files (x86)\SMath Studio\SMathStudio_Desktop.exe" -silent -e htm "C:\Users\Desktop.sm\Page1.sm"
Also the file Page1.sm contain the following test where the first line is a normal text (font courrier-new) and the second line is a write region text (font arial) :

Then we see the 2 lines on the .htm created directly from the SMathStudio on the desktop by the menu "save as" or the same by the .bat if we call it from the desktop :

But when we call the .bat from the PHP we have the first line with the Courrier-new but we got an image with a red cross for the writer region text with the arial character font :

"C:\Program Files (x86)\SMath Studio\SMathStudio_Desktop.exe" -silent -e htm "C:\Users\Desktop.sm\Page1.sm"
Also the file Page1.sm contain the following test where the first line is a normal text (font courrier-new) and the second line is a write region text (font arial) :
Then we see the 2 lines on the .htm created directly from the SMathStudio on the desktop by the menu "save as" or the same by the .bat if we call it from the desktop :
But when we call the .bat from the PHP we have the first line with the Courrier-new but we got an image with a red cross for the writer region text with the arial character font :
#3 Опубликовано: 05.11.2019 04:32:00
Hello, what is the output of this?
Also, if you could return the output of this (under php)
<?php
echo php_uname();
echo PHP_OS;
?>
Also, if you could return the output of this (under php)
SMathStudio_desktop.exe -s -i
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Опубликовано: 06.11.2019 15:25:48
To Jean Giraud : I'm trying to convert, from my wamp server to localhost, a .sm document into an .htm document using the -silent SMathStudio command.
To Davide Carpi : the first code php
echo php_uname();
echo PHP_OS;
?>
is giving this result :

the second code under php is running but doing nothing, white board :
exec('"SMath_Studio\SMathStudio_Desktop.exe" -s -i' )
?>
To Davide Carpi : the first code php
echo php_uname();
echo PHP_OS;
?>
is giving this result :
the second code under php is running but doing nothing, white board :
exec('"SMath_Studio\SMathStudio_Desktop.exe" -s -i' )
?>
#5 Опубликовано: 06.11.2019 17:24:37
Thank you
You have to echo the exec(), also you might have to use and echo the exec() optional 2nd and 3rd arguments...
Wrote
exec('"SMath_Studio\SMathStudio_Desktop.exe" -s -i' )
?>
You have to echo the exec(), also you might have to use and echo the exec() optional 2nd and 3rd arguments...
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 Опубликовано: 06.11.2019 19:31:09
Yes I tried a pdf but the document is simply not viewable because damaged.
And it is generated with the extension Page1.pdf.tmp besides I forgot to specify that the document htm is also generated with the extension Page1.htm.tmp as well as the format Page1.png.tmp
So far none of the formats is usable and all are damaged.
Then I think it should be more of a wampserveur resource that is missing or a parameter.
And it is generated with the extension Page1.pdf.tmp besides I forgot to specify that the document htm is also generated with the extension Page1.htm.tmp as well as the format Page1.png.tmp
So far none of the formats is usable and all are damaged.
Then I think it should be more of a wampserveur resource that is missing or a parameter.
#7 Опубликовано: 09.11.2019 06:34:57
Hello, I think I found a track by noticing that the sizes of identical images but generated by each of the 2 exports (1 on desktop ond 1 by php) is different. Which certainly explains why images generated from a .php page are damaged.
Non-writer images that are simply copy-and-paste in an .sm document remain the same size and are not damaged.
Also a remark, would it not be possible to simply not generate images but to take directly the source of the "writer region" ?
Non-writer images that are simply copy-and-paste in an .sm document remain the same size and are not damaged.
Also a remark, would it not be possible to simply not generate images but to take directly the source of the "writer region" ?
#8 Опубликовано: 09.11.2019 10:57:27
WroteAlso a remark, would it not be possible to simply not generate images but to take directly the source of the "writer region" ?
It is possible to change the html export plugin to save Writer Region content as html code. However, since the SS page layout is made by blocks anchored to coordinates (as well as the html output) and the text rendering slightly differs from browser to browser, the output might be a little messed up depending on how much the regions are close each other in the original worksheet.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#9 Опубликовано: 09.11.2019 12:52:35
Thank you, I understand the problem, especially because I tried to do a sm2wiki before and it is even more difficult and ugly to align the formulas on 1 line
.
Perhaps we can set the output of writers option in html document, as for "-o images = embedded" for example we could have "-o writer = text".
In any case personally I prefer the text even if it is not perfectly aligned. In this case, I am ready to be the beta-tester of this new version

Perhaps we can set the output of writers option in html document, as for "-o images = embedded" for example we could have "-o writer = text".
In any case personally I prefer the text even if it is not perfectly aligned. In this case, I am ready to be the beta-tester of this new version

1 страниц (9 вхождений)
-
Новые сообщения
-
Нет новых сообщений