-2

Hi and thanks for reading,

I need to be able to parse several PDF with this format: http://www.buenosaires.gob.ar/sites/gcaba/files/modulo_a_motos_espanol.pdf

To JavaScript "Questions" objects. As you can notice is a PDF that contains questions from an drive licence multiple choice exam, which i need to consume to do an exam simulator.

I need for every Question object, the question itself, the three answers...And the hard part....The correct answer (colored in light blue) and the associated image if exists.

Any help or orientation will be appreciated! I work with java and js.

Hawky
  • 71
  • 1
  • 5

1 Answers1

2

That honestly looks like a very difficult problem to solve.

There is at least one GitHub project that deals with parsing PDFs to JSON but it is only from the server side (using nodejs):

https://github.com/modesty/pdf2json

After dealing with parsing the document with nodejs (which you may or may not be using) the next hurdle is that the boldness of a selected answer would not be shown in the JSON. There would need to be some other character change in order to determine the selected answer.

Here is a similar question with a couple other replies as well:

How? Parser PDF to Javascript Array?

Community
  • 1
  • 1
joeyfb
  • 3,044
  • 3
  • 19
  • 25