Latex za izvoze: IZVOZ-74: Ne deluje izvoz vprasalnika v PDF, v primeru da je izbrana oblika alineje in obojestranska poravnava
This commit is contained in:
parent
1d96452e6f
commit
24ee9d3ba2
@ -967,6 +967,7 @@ class LatexSurveyElement{
|
||||
$text = str_replace('<ul>','\begin{itemize} ', $text);
|
||||
$text = str_replace('<ul','\begin{itemize} ', $text);
|
||||
$text = str_replace('<li>','\item ', $text);
|
||||
$text = str_replace('<li','\item ', $text);
|
||||
$text = str_replace('</ul>','\end{itemize} \ ', $text);
|
||||
}
|
||||
//echo "prazno v html: ".strpos($text, '\r')."</br>";
|
||||
@ -985,6 +986,7 @@ class LatexSurveyElement{
|
||||
if($numOfOl!=0 && $posLi !== false){ //ce imamo ol in li
|
||||
$text = str_replace('<ol>','\begin{enumerate} ', $text);
|
||||
$text = str_replace('<li>','\item ', $text);
|
||||
$text = str_replace('<li','\item ', $text);
|
||||
$text = str_replace('</ol>','\end{enumerate} \ ', $text);
|
||||
}
|
||||
//echo "prazno v html: ".strpos($text, '\r')."</br>";
|
||||
@ -1063,16 +1065,18 @@ class LatexSurveyElement{
|
||||
|
||||
//RESEVANJE odstranitve dodatnih style tag-ov po ul, ipd. #######################################################
|
||||
$findStyleTag = 'style="';
|
||||
$findStyleTagEnd = '"';
|
||||
//$findStyleTagEnd = '"';
|
||||
$findStyleTagEnd = '">';
|
||||
$numOfStyleTags = substr_count($text, $findStyleTag); //stevilo 'style=" ' v tekstu
|
||||
//echo "stevilo style: ".$numOfStyleTags." </br>";
|
||||
//echo "stevilo style: ".$numOfStyleTags." </br>";
|
||||
//echo $text."</br>";
|
||||
for($s=0; $s<$numOfStyleTags; $s++){ //za vsako najdeno 'style=" ' besedilo, uredi njeno odstranitev
|
||||
$posStyleTag = strpos($text, $findStyleTag);
|
||||
$posStyleTagEnd = strpos($text, $findStyleTagEnd, $posStyleTag); //strpos(string,find,start) najdi $findStyleTagEnd v $text, isci od $posStyleTag dalje
|
||||
$dolzinaOff = $posStyleTagEnd - $posStyleTag + 2;
|
||||
$posStyleTagEnd = strpos($text, $findStyleTagEnd, $posStyleTag); //strpos(string,find,start) najdi $findStyleTagEnd v $text, isci od $posStyleTag dalje
|
||||
$dolzinaOff = $posStyleTagEnd - $posStyleTag + 2;
|
||||
$text = substr_replace($text, "", $posStyleTag, $dolzinaOff);
|
||||
|
||||
}
|
||||
}
|
||||
//RESEVANJE odstranitve dodatnih style tag-ov po ul, ipd. - konec #################################################
|
||||
|
||||
if($pos === false && $posImg === false) { //v tekstu ni br in img
|
||||
|
Loading…
x
Reference in New Issue
Block a user