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

cant handle tables #15

Open
ak9250 opened this issue May 14, 2016 · 15 comments
Open

cant handle tables #15

ak9250 opened this issue May 14, 2016 · 15 comments

Comments

@ak9250
Copy link

ak9250 commented May 14, 2016

the live sample rtf.html cannot convert the a rtf table into html table tags.

@zoehneto
Copy link
Collaborator

Currently the version in master will only give you the text in the table. If you use the version on the table-support branch, the conversion works (though the styling is missing and merged cells aren't handled correctly yet). It is currently still a work-in-progress version, but should work for simple tables (you could add minimal styling yourself using css to improve the display).

@ak9250
Copy link
Author

ak9250 commented May 14, 2016

thanks for quick response, I just tried the table support branch version and its not working either. I used a simple rtf sample file i found online that has tables here thewalter.net/stef/software/rtfx/sample.rtf

@zoehneto
Copy link
Collaborator

That is actually one of the files I use for testing and it definitely works for me. Do you get an error message? How do you test it (which browser, using the demo page...)?

@ak9250
Copy link
Author

ak9250 commented May 14, 2016

No error message just shows the output like this for the table part
Cell 1 Cell 2More in cell 2 Cell 3
Next row Next row Next row
currently testing it in chrome and using the rtf.html page provided in the zip file
also tried it with the table.rtf sample provided same problem

@zoehneto
Copy link
Collaborator

That is the expected output, as the table styling (including cell borders etc.) is not yet implemented. If you inspect the element you should see that it is a html table

@ak9250
Copy link
Author

ak9250 commented May 14, 2016

you are are right, sorry, forgot to check the elements for this one and assumed it just didnt have the table tags. Thanks, although I think the styling can be implemented, I saw a example in .net where the borders are showing as well. Also I was comparing the output between the master branch and table support version and the table support version renders the text "And now comes a fun table:" in some other language as well as item list

@zoehneto
Copy link
Collaborator

It shouldn't be too much work, it's mostly parsing the right tags (though finding the right ones in the 15 pages of spec dedicated to tables might be more challenging :) ), saving them in an appropriate structure and then applying it in the rendering phase.

@ak9250
Copy link
Author

ak9250 commented May 14, 2016

cool, would definitely like to help on this issue if that is needed. I can send request if I find a solution.

@zoehneto
Copy link
Collaborator

I would love a PR for this :)

@ak9250
Copy link
Author

ak9250 commented May 16, 2016

Had a privacy concern, is metadata being collected from users even after running locally. Their name and time is recorded?

On May 14, 2016, at 2:04 PM, Tom Zöhner notifications@github.com wrote:

I would love a PR for this :)


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@zoehneto
Copy link
Collaborator

We collect no data at all. The rtf files are rendered locally in your browser. Nothing is persisted (no localstorage etc.). No webservices are used (other implementations use the google docs api in the background). You can also verify that yourself by looking at rtf.js and the dependencies mentioned in the README (you can than get the dependencies straight from the creators repo).

@ak9250
Copy link
Author

ak9250 commented May 16, 2016

That's great but why display all these metapropertytimedestination like operator, author, title, company, subject, manager?

On May 16, 2016, at 11:47 AM, Tom Zöhner notifications@github.com wrote:

We collect no data at all. The rtf files are rendered locally in your browser. Nothing is persisted (no localstorage etc.). No webservices are used (other implementations use the google docs api in the background). You can also verify that yourself by looking at rtf.js and the dependencies mentioned in the README (you can than get the dependencies straight from the creators repo).


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@zoehneto
Copy link
Collaborator

If you are talking about the metadata displayed on the test page, that is metadata included in the rtf file which was saved while generating it. From page 38 of the rtf 1.9.1 spec:

The \info control word introduces the information group, which contains information about the document. This can include the title, author, keywords, comments, and other information specific to the file. This information is for use by a document-management tool, if available.

@tbluemel
Copy link
Owner

Like Tom wrote, the only data displayed is what is contained in the file anyway. You can access the same data probably through some command in Word, Open Office, etc... It probably isn't useful information in most cases, but the rtf.js library should at least allow access to them, if needed.

@linkvivian
Copy link

First of all, thank you for making this library open source. Can you combine the functions of this branch into master and send the version?

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