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

unable to preserve trailing white space of a simple text or also in a table contents (text) #1566

Closed
vinuhegdesit opened this issue Nov 15, 2018 · 3 comments

Comments

@vinuhegdesit
Copy link

Can you please add a keyword that can apply for whole pdf to preserve the leading or trailing whitespace. I know there is one property "preserveLeadingSpaces", it only works for simple "text", it doesnt work for table contents. I am actually in a requirement to preserve trailing white spaces for a table contents.

@liborm85
Copy link
Collaborator

I tried it and it works in table too. Some example for reprocedure your problem runnable on playground?

@vinuhegdesit
Copy link
Author

Sorry I am unable to provide you the example, but surely it doesn't work. I have tried it many times. Can you please tell me the property that you have used to retain the trailing whitespace for a string content in a table or outside the table ?

@liborm85
Copy link
Collaborator

How to set preserveLeadingSpaces to texts is described here:

{text: '{', preserveLeadingSpaces: true},
{text: ' "sample": {', preserveLeadingSpaces: true},
{text: ' "json": "nested"', preserveLeadingSpaces: true},
{text: ' }', preserveLeadingSpaces: true},
{text: '}', preserveLeadingSpaces: true},

And text element you can use in table cell (how to create table is described in readme).
Of course is possible set it to style dictionary (see readme) or to defaultStyle (see readme).

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

No branches or pull requests

2 participants