cursor icon indicating copy to clipboard operation
cursor copied to clipboard

PDF support in AI Chat

Open Am0stafa opened this issue 1 year ago • 23 comments

Screenshot 2024-09-10 at 6 12 55 PM

Am0stafa avatar Sep 13 '24 20:09 Am0stafa

PDFs can be weird, in that sometimes text is embedded in a way that can't be directly read. It's possible the LLM is trying to read the text contents, in which there may not be any.

As a workaround, try to extract the text out of the PDF and provide that to the AI to try.

danperks avatar Sep 18 '24 13:09 danperks

I think it is as simple as allowing the upload of PDF files and if it is embedded not correctly that will be fine

Am0stafa avatar Sep 18 '24 15:09 Am0stafa

Ahh I see, the PDF contents isn't even being sent to the AI, I understand. Will keep this open as a feature request :)

danperks avatar Sep 18 '24 15:09 danperks

I hope you see it soon it will help alot of researchers, as mainly i will use it to analyze research papers. Consider even making it a premium feature

Am0stafa avatar Sep 18 '24 15:09 Am0stafa

I’m not a developer for Cursor, I just help triage some of the issues on this repo, I totally see the benefit of the feature but I have no influence on what gets coded first! :)

danperks avatar Sep 18 '24 16:09 danperks

I've tried various ways to include a PDF in the chat, but it does not appear to work currently.

It would be a very useful feature to have.

FlorinAndrei avatar Oct 09 '24 22:10 FlorinAndrei

Extremely useful for researchers i dont understand how they still dont have this feature

Am0stafa avatar Oct 09 '24 22:10 Am0stafa

I think it is heavy computation to read PDF, but a workaround is to screenshot the pieces. It also make it focus more on the relevant content.

HoijanLai avatar Dec 19 '24 17:12 HoijanLai

This thread is a bit old, but I've used online PDF-to-Markdown converters and saved the Markdown file in the project - it can read that just fine. Inconvenient, but it gets the job done.

sstillwell avatar Mar 05 '25 03:03 sstillwell

The new Mistral OCR release would be the way to do this:

https://mistral.ai/news/mistral-ocr

nc9 avatar Mar 07 '25 09:03 nc9

Until this is implemented in Cursor, you can convert your PDFs yourself. I wrote a little tool bib4llm that converts PDFs into Markdown + PNGs. Either from a directory of PDF files or a Zotero BibTex file. Its currently using PyMuPDF4LLM for the conversion and leaves any RAG / indexing to Cursor. Could be easily updated to use any LLM based text extraction like llamaparse or mistral-ocr.

I just drop a bib file synced with my Zotero collection (BetterBibTex + keep bib file updated during export) into my project folder, run bib4llm on it and start chatting with the papers.

denisalevi avatar Mar 07 '25 15:03 denisalevi

How about use docs feature, will it work?

jason5545 avatar Mar 25 '25 00:03 jason5545

Tried to use Cursor AI to read PDF files from JFK files and give me results, Cursor AI propose python script to read PDF files only.

adv4000 avatar Apr 10 '25 01:04 adv4000

Would pay extra for this

nlbdotdev avatar Jul 07 '25 23:07 nlbdotdev

is there any MCP to achieve this feature ?

mfv-brian avatar Jul 09 '25 03:07 mfv-brian

I am still having difficulty with this. Why is this so difficult to implement? It would be great to just be able to reference PDF documents in the chat. I do not want to use OCR or MCP servers. Seems like a lot of users are asking for this.

Johannf78 avatar Aug 01 '25 06:08 Johannf78

This would be a very powerful feature, allow developers and researchers to really automate and speed up work flow. Please add them!

fuxur9 avatar Sep 09 '25 19:09 fuxur9

yes please!

danofromnesto avatar Oct 01 '25 22:10 danofromnesto

Need this feature badly :(

adityasoni-bitgo avatar Oct 05 '25 15:10 adityasoni-bitgo

Same question, I need this feature ...

tun009 avatar Oct 20 '25 04:10 tun009

I really need this feature.

Meshack-pi avatar Oct 20 '25 15:10 Meshack-pi

Maybe there's a way to port PDF -> Markdown or HTML while keeping scientific formulas?

kvaDrug avatar Oct 22 '25 12:10 kvaDrug

I would also love this feature, particularly for scientific/analysis/parsing workflows and to give Agents more context.

benjaminalt avatar Nov 07 '25 13:11 benjaminalt

This feature is really needed. Manually converting pdfs to markdown or using extra tools/MCP is just too time-consuming.

thsergitox avatar Nov 20 '25 19:11 thsergitox