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

SpaceBefore property value ignored in first paragraph #39

Closed
kobruleht opened this issue Oct 14, 2023 · 1 comment
Closed

SpaceBefore property value ignored in first paragraph #39

kobruleht opened this issue Oct 14, 2023 · 1 comment
Labels

Comments

@kobruleht
Copy link

kobruleht commented Oct 14, 2023

spacebeforeignored.pdf

Expected Behavior

Text should appear 20 cm below in page

Actual Behavior

Text appears immediately at start of page (see attached pdf file)

Steps to Reproduce the Behavior

Run attached solution

Code:

        static Document CreateDocument()
        {
            var document = new Document { };
            var section = document.AddSection();
            section.PageSetup.TopMargin = 0;
            var par = section.AddParagraph("test");
            par.Format.SpaceBefore = "20cm";
            return document;
        }

SpaceBeforePropertyValueIgnoredForFirstParagraph.zip

spacebeforeignored.pdf

@TH-Soft
Copy link

TH-Soft commented Oct 14, 2023

SpaceBefore is ignored for the first paragraph on a page. It's a feature, not a bug.
You can add a dummy paragraph to make SpaceBefore at the start of a new section.

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

No branches or pull requests

2 participants