Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Frits Walraven

PHP Get h1, h2 headings from docx with page number

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get headings h1, h2 from a word docx file with the page number from where it is fetched. e.g. there are headings "heading h1" and "heading h2" in page 1 and other h1,h2 headings on other pages. I want to get these with the page number they are fetched from. Can be something like

0 => array(
h1 => array('h1 headings goes here'),
h2 => array('h2 headings goes here...')
page=>'page number here'))
I am able to get headings by converting docx to zip and reading the xml using DOM Document. But I am not able to get the page number from where I picked a particular heading.

Please share the best way to achieve this functionality in PHP.
Oh. Hi guys! Look at this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic