2

I have a situation in which I have a blob file whose type is .PDF and I need to count the pages in the PDF. Is there a way to do it without any external (3rd party) libraries? I know that there is PL/PDF tool but I need to do it only in PL/SQL. I am using Oracle 11g version, and the files is sitting in the table.

Any help will be appreciated, thanks.

APC
  • 144,005
  • 19
  • 170
  • 281
TheName
  • 697
  • 1
  • 7
  • 18
  • 2
    Have a look at this thread on [the OTN PL/SQL forum](https://community.oracle.com/thread/973784). Bear in mind is that different PDF producers may have different structures. So, depending on where your PDFs come from, you may need a flexible (i.e. complex) search pattern. – APC Apr 15 '19 at 12:01

1 Answers1

1

I think you can go with Java in the Oracle database. Check how to do it with Java only here or there.

Next steps would be to :

Those are the main lines but I think it's the best way if you want to stay with open source and free software.

R. Du
  • 544
  • 4
  • 16
  • You have an interesting definition of *"without any external (3rd party) libraries"*. – APC Apr 15 '19 at 15:39
  • ok, my bad. then the post mentioned before might be better suited. – R. Du Apr 15 '19 at 16:02
  • 1
    Thanks for your answer, as I searched all over the internet, there is no option to count the numbers of PDF just with PL/SQL, so I will go with this answer, I will create a java class and I will count the numbers with java. – TheName Apr 16 '19 at 07:22
  • Ok, just take care that "Java in the DB" is enabled in your Oracle production database. It's enabled by default but sometimes DBAs remove it when creating the databases. – R. Du Apr 16 '19 at 08:24