Asc.plugin.callCommand does nothing and returns undefined for most PDFs

Do you want to: Ask a how-to question
Document Server version: 8.3.3

Hi

We are developing a plugin for which we rely on the docs API functionality such as

  • searching for ApiRanges
  • highlighting ApiRanges
  • navigating to ApiRanges

It all works fine when working with a docx but with pdfs it does not really work unless the pdf was created via onlyoffice itself.

Now one thing I noticed is that when I execute a callCommand it works fine with a pdf created in onlyoffice but it just returns undefined and does nothing for any other pdfs (which have textboxes).


Only office pdfs seem to be editable within the editor like a docx while other pdfs require you edit only single textboxes.

I see that there seem to be some pdf specific js sdk methods for search and highlight

Is that functionality supposed to work on all pdfs or just something for pdfs created within onlyoffice?

If that is the case, are there maybe other ways to search text within pdfs and add highlights?

Hello @Andiii
Unfortunately, there’re no PDF API at the moment and we cannot troubleshoot this case. Right now we are working on it, and we will provide it as soon as possible.
In this case, I believe it’s better to wait for the official methods once they become available.
Please accept our sincere apologies for the inconvenience.

Hey Alexandre. Thanks for your answer!
Good to hear that this is being worked on.

Do you know the rough ETA for this and if it and if it will support navigation, search and programmatic annotations with the initial version?

Cheers,
Andi