Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error: RTF text outside of group #75

Open
petardfoozer opened this issue May 14, 2020 · 4 comments
Open

Parse error: RTF text outside of group #75

petardfoozer opened this issue May 14, 2020 · 4 comments

Comments

@petardfoozer
Copy link

petardfoozer commented May 14, 2020

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
	                )

	        )
@wildrove
Copy link

Hi @petardfoozer ,I'm getting the same issue. Did you find some fix?

@MelaniaBB
Copy link

Hi @petardfoozer , @wildrove , I'm getting the same issue. Did you find some fix?

@yarovskiy
Copy link

Hi @petardfoozer , @wildrove, @MelaniaBB , I'm getting the same issue. Did you find some fix?

@petardfoozer
Copy link
Author

The issue was with my RTF, not the library. It's most likely a problem with your data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants