Rank: Newbie
Groups: Registered
Joined: 05/10/2019(UTC) Posts: 6 Location: Paris
|
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 ?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 05/10/2019(UTC) Posts: 6 Location: Paris
|
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 :
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Hello, what is the output of this? Code:
<?php
echo php_uname();
echo PHP_OS;
?>
Also, if you could return the output of this (under php) Code:SMathStudio_desktop.exe -s -i
Edited by user 05 November 2019 14:02:50(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 05/10/2019(UTC) Posts: 6 Location: Paris
|
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 <?php echo php_uname(); echo PHP_OS; ?> is giving this result : the second code under php is running but doing nothing, white board : <?php exec('"SMath_Studio\SMathStudio_Desktop.exe" -s -i' ) ?>
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Thank you Originally Posted by: MDAions <?php 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... Edited by user 07 November 2019 12:25:03(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 05/10/2019(UTC) Posts: 6 Location: Paris
|
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.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 05/10/2019(UTC) Posts: 6 Location: Paris
|
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" ?
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Originally Posted by: MDAions Also 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 consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 05/10/2019(UTC) Posts: 6 Location: Paris
|
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
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.