http://qs321.pair.com?node_id=11113891


in reply to PDF alternative to mudrow to get XML structure

You are confused. PDF does not have an XML structure, aside from some metadata blocks in some PDF files. The PDF structure itself is not XML because (among other reasons) PDF is an older format than XML.

I am unfamiliar with mudraw; perhaps it translates PDF structure into XML? Try searching CPAN for "PDF" and see what you find.

  • Comment on Re: PDF alternative to mudrow to get XML structure

Replies are listed 'Best First'.
Re^2: PDF alternative to mudrow to get XML structure
by marto (Cardinal) on Mar 06, 2020 at 03:33 UTC

    "You are confused..."

    Looks like you are the one who is confused here. OP specifically shows what they are doing, tells us how they are generating XML from PDF.

    "I am unfamiliar with mudraw; perhaps it translates PDF structure into XML? Try searching CPAN for "PDF" and see what you find.”

    It'd have take seconds to confirm what mudraw does.

      A PDF file does not have an XML structure. Our questioner is using a tool that produces XML output describing PDF structure and now needs to replace that tool. There is no standard translation from PDF to XML. There is no easy replacement for mudraw because the XML our questioner is using is a mudraw-specific format because there is no standard XML mapping for PDF. The best solution is to process the PDF directly.