rtf-html-php
rtf-html-php copied to clipboard
Parse error: RTF text outside of group
I am getting this error after my rtf document is converted and I'm moving on to a new document to convert
$document = new \RtfHtmlPhp\Document($note_object->rtf);
$formatter = new \RtfHtmlPhp\Html\HtmlFormatter('UTF-8');
$plain_text = (strip_tags($formatter->Format($document)));
after I convert my rtf document to plain text, I'm then sending it through sftp, but when I move on to the next document to convert, it crashes with the message 'Parse error: RTF text outside of group'
I'm not sure what is causing this as I know that the object being send into the formatter is indeed RTF
More debug info:
Trace:
Array
(
[0] => Array
(
[args] => Array
(
[0] => 1024
[1] => Parse error: RTF text outside of group.
[2] => /var/www/html/mysite/vendor/henck/rtf-to-html/src/Document.php
[3] => 286
[4] => Array
(
[text] => RtfHtmlPhp\Text Object
(
[text] => This was created by the edito
)
[terminate] =>
[err] => Parse error: RTF text outside of group.
)
)
)
[1] => Array
(
[file] => /var/www/html/mysite/vendor/henck/rtf-to-html/src/Document.php
[line] => 286
[function] => trigger_error
[args] => Array
(
[0] => Parse error: RTF text outside of group.
)
)
[2] => Array
(
[file] => /var/www/html/mysite/vendor/henck/rtf-to-html/src/Document.php
[line] => 326
[function] => ParseText
[class] => RtfHtmlPhp\Document
[type] => ->
[args] => Array
(
)
)
[3] => Array
(
[file] => /var/www/html/mysite/vendor/henck/rtf-to-html/src/Document.php
[line] => 17
[function] => Parse
[class] => RtfHtmlPhp\Document
[type] => ->
[args] => Array
(
[0] => This was created by the editor
)
)
[4] => Array
(
[file] => /var/www/html/mysite/private/Controllers/Jobs/Healthelink/Dischargesummary.php
[line] => 105
[function] => __construct
[class] => RtfHtmlPhp\Document
[type] => ->
[args] => Array
(
[0] => This was created by the editor
)
)
Hi @petardfoozer ,I'm getting the same issue. Did you find some fix?
Hi @petardfoozer , @wildrove , I'm getting the same issue. Did you find some fix?
Hi @petardfoozer , @wildrove, @MelaniaBB , I'm getting the same issue. Did you find some fix?
The issue was with my RTF, not the library. It's most likely a problem with your data