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

"Slide Count" field is arbitrarily added while exporting #50

Open
ebobferraris opened this issue Oct 9, 2020 · 5 comments
Open

"Slide Count" field is arbitrarily added while exporting #50

ebobferraris opened this issue Oct 9, 2020 · 5 comments

Comments

@ebobferraris
Copy link

Using a Master with the only "Slide Number" field, exported pdf contains "Slide Number / Slide Count" (see screenshot).
Is it an intended behavior? Is it possible to disable?
Screenshot from 2020-10-09 23-48-26

@monperrus
Copy link
Owner

monperrus commented Oct 10, 2020 via email

@sagitta42
Copy link

Same here. Would prefer if it wasn't there and showed just my original slide number N times, same as if I was in presentation mode.

@Sbozzolo
Copy link

Sbozzolo commented Apr 7, 2023

This improved my situation:
I edited the source code (Tools->Macros->Edit Macro) to comment out lines 140-142

'if slide.IsPageNumberVisible then
        'fixateSlideNumber(doc, slide, i+1, numSlides)
'end if

Now the style is correct (but the number is not).

@NeverGameStar
Copy link

This improved my situation: I edited the source code (Tools->Macros->Edit Macro) to comment out lines 140-142

'if slide.IsPageNumberVisible then
        'fixateSlideNumber(doc, slide, i+1, numSlides)
'end if

Now the style is correct (but the number is not).

Alternatively, you can change the style manually in the fixateSlideNumber function. I did so like this:

if shapeType = "com.sun.star.presentation.SlideNumberShape" then
            copy = doc.createInstance("com.sun.star.drawing.TextShape")
            'Call Tools.WritedbgInfo(shape)
            slide.IsPageNumberVisible = False
            slide.add(copy)
            copy.setString(CStr(slideNr)) '& " / " & CStr(slideCount))
            copy.Style = shape.Style
            copy.Text.Style = shape.Text.Style
            copy.Text.CharHeight = shape.Text.CharHeight
            copy.Text.CharFontFamily = shape.Text.CharFontFamily
            'copy.Text.CharFontName = shape.Text.CharFontName
            copy.Text.CharFontName = "Arial"
            'copy.Text.CharColor = shape.Text.CharColor
            copy.Text.CharColor = RGB(255, 255, 255)
            copy.Position = shape.Position
            copy.Size = shape.Size
            copy.TextVerticalAdjust = shape.TextVerticalAdjust
            copy.TextHorizontalAdjust = com.sun.star.drawing.TextHorizontalAdjust.CENTER
        end if

For some reason, it didn't really get the styles of the master file page number correctly - so I just hardcoded it in there.
Now it works for me (position is still slightly lower, but I don't care at this point).

@tomtom1-4
Copy link

Of this is not optimal. But I just changed numSlides in line 140 to the correct number manually.

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

6 participants