PPTX: hidden slides are converted like visible ones, with no mark

Aperta
#2,817 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@JonRC ci sta già lavorando.

Dal 3/11/2026.

  • #2818 di @JonRC — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

The slide-number comment is emitted by the PPTX converter, so start there and find where each slide's element is read. Check the show attribute on the slide's <p:sld> element (hidden when it is 0 or false) and emit a <!-- Hidden slide --> marker next to the slide number, keeping the content. Run the repro from the issue to confirm slide 2 is marked. A pull request (#2818) is already open against this issue, so check it before starting.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A slide hidden in PowerPoint (Hide Slide) comes out of the PPTX converter like any other slide, with nothing in the Markdown to say it was hidden. A reader of the output, often an LLM, takes a hidden draft or internal note as part of the deck the author meant to show.

Repro on main (7482c09), with python-pptx 1.0.2:

import io
from pptx import Presentation
from markitdown import MarkItDown, StreamInfo

prs = Presentation()
for title in ("Visible one", "Internal draft", "Visible two"):
    prs.slides.add_slide(prs.slide_layouts[5]).shapes.title.text = title
prs.slides[1]._element.set("show", "0")  # what Hide Slide writes on <p:sld>
buf = io.BytesIO()
prs.save(buf)
buf.seek(0)
print(MarkItDown().convert_stream(buf, stream_info=StreamInfo(extension=".pptx")).markdown)

Output:

<!-- Slide number: 1 -->
# Visible one

<!-- Slide number: 2 -->
# Internal draft

<!-- Slide number: 3 -->
# Visible two

Slide 2 is hidden in the file, but the output gives no sign of it.

I'd expect a mark next to the slide number, for example <!-- Hidden slide -->, keeping the content as it is, the same way speaker notes stay in the output under their own heading. python-pptx has no property for this, so the converter would read show on <p:sld> (hidden when it is 0 or false).

Hidden XLSX sheets are a similar case, already tracked in #1073, so this issue covers slides only.

Lingua principale
Python
Stelle
198k
Fork
15k
Merge medio
2h 16m
PR unite (30g)
9

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/markitdown

Tutte le issue di microsoft/markitdown

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.