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

How to adjust cell height after convert to html #66

Closed
elong0527 opened this issue Nov 29, 2021 · 2 comments
Closed

How to adjust cell height after convert to html #66

elong0527 opened this issue Nov 29, 2021 · 2 comments

Comments

@elong0527
Copy link
Collaborator

The converted html file has a larger cell height than expected.

https://htmlpreview.github.io/?https://github.com/Merck/r2rtf/blob/master/vignettes/html/ae_example.html

We need to find a way to adjust cell height. (maybe using CSS?)

@nanxstats
Copy link
Collaborator

If we have to consider broader compatibility and rely on libreoffice to do RTF -> HTML, then I guess post-processing the HTML and modify the CSS is a possibility (should be simple to try).

If our goal is creating an HTML that looks exactly like the PDF, then I guess a worthy option is pdf2htmlEX, an almost magical tool that coverts PDF into HTML and keeps the exact appearance. So the path is RTF -> PDF -> HTML.

An important limitation of this is that the original pdf2htmlEX was deprecated by the author and is now maintained by other people as a forked repo above. It is not distributed from official package repos so probably not a good idea to implement in an R wrapper for regular users. It's totally ok though for package internal use in GitHub Actions if that's the scope.

@fb-elong
Copy link
Collaborator

fb-elong commented May 5, 2023

It seems a simple fix to remove line-height: 115%; in the html source code.

@fb-elong fb-elong mentioned this issue May 5, 2023
nanxstats added a commit that referenced this issue May 5, 2023
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

3 participants