0
votes

I am creating a MarkLogic search where the end user can search for a string and get pdf document results. I have created a database and uploaded the files in PDF format with appropriate permissions. Here the problem is with my search where it is not returning results in PDF format instead it is returning in XML and XHTML format.

Could someone please advise what can be done here for the search to return only pdf documents?

1
Welcome to Stackoverflow! Can you please elaborate your question having your effort like code or something so that people could get your problem early and help you? Thanks! - JRSofty

1 Answers

1
votes

In past projects, I've had the PDF file and a separate XML document of that PDF (including the URI of the PDF to download). I search against the XML representation and format the results to include a link to download the original PDF. Depending on where/how the PDF is stored, you may need to do something to facilitate serving the PDF from a url.