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

Align and line break bug #689

Closed
evamansilla opened this issue Feb 27, 2020 · 1 comment
Closed

Align and line break bug #689

evamansilla opened this issue Feb 27, 2020 · 1 comment
Labels
feature:text Text formatting, multi-line, etc.

Comments

@evamansilla
Copy link

I need something similar inside a rectangle:
image

So, I have this code:

      slide.addText(
        [
          { text: 'Line1', options: {breakLine:false} },
          { text: 'Line 2', options: {bold:true} },
        ], 
        {shape: pptx.ShapeType.RECTANGLE, h:1.127, w:1.951, fill:'e5ebef', x:3.778, y:6.911, color:'000000', fontFace:'Arial', fontSize:8, align: 'center', valign:'top'}
      );

and the result I get is:
image

By removing the align option:


      slide.addText(
        [
          { text: 'Line1', options: {breakLine:false} },
          { text: 'Line 2', options: {bold:true} },
        ], 
        {shape: pptx.ShapeType.RECTANGLE, h:1.127, w:1.951, fill:'e5ebef', x:3.778, y:6.911, color:'000000', fontFace:'Arial', fontSize:8, valign:'top'}
      );

the new result is:
image
and if I set align option to the left, I get again a line break:
image

@gitbrent gitbrent added the feature:text Text formatting, multi-line, etc. label Mar 4, 2020
@gitbrent
Copy link
Owner

gitbrent commented Mar 4, 2020

@evamansilla Thanks for the fine documentation and examples.

Closing as this is a dupe of Issue #369

@gitbrent gitbrent closed this as completed Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:text Text formatting, multi-line, etc.
Projects
None yet
Development

No branches or pull requests

2 participants