Tropy crashes when importing PDF

Hi! I have started using Tropy for my PhD project and it looks very promising. However, I ran into a problem when uploading PDF’s. I have uploaded the report below. It has no trouble uploaden JPEG or other image files. I have seen more questions about PDF’s on this forum, but their solutions I have already tried with little success.

I hope you can help!

{“level”:30,“time”:1679480510452,“type”:“browser”,“name”:“main”,“args”:[],“opts”:{“env”:“production”,“autoUpdates”:true,“contextIsolation”:true,“webgl”:false,“debug”:false,“trace”:false,“data”:“C:\Users\52\AppData\Roaming\Tropy”,“cache”:“C:\Users\5486882\AppData\Roaming\Tropy\cache”,“logs”:“C:\Users\5486882\AppData\Roaming\Tropy\log”},“version”:“1.12.0”,“msg”:“main.init 1.12.0 Windows_NT 10.0.19042 (ia32)”}
{“level”:40,“time”:1679480510491,“type”:“browser”,“name”:“main”,“stack”:“Error: EPERM: operation not permitted, symlink ‘C:\Users\5486882\AppData\Local\tropy\app-1.12.0\resources\app.asar\res\plugins\README.md’ → ‘C:\Users\52\AppData\Roaming\Tropy\plugins\README.md’”,“msg”:“failed to link plugins readme”}
{“level”:30,“time”:1679480510497,“type”:“browser”,“name”:“main”,“msg”:“plugins scanned: 0”}
{“level”:30,“time”:1679480510499,“type”:“browser”,“name”:“main”,“msg”:“app state restored”}
{“level”:30,“time”:1679480510500,“type”:“browser”,“name”:“main”,“file”:“C:\Users\5486882\OneDrive - Universiteit Utrecht\Documents\Promotieonderzoek.tpy”,“msg”:“open new project window”}
{“level”:30,“time”:1679480510853,“type”:“renderer”,“name”:“project”,“dpx”:1,“opts”:{“env”:“production”,“documents”:“C:\Users\52\OneDrive - Universiteit Utrecht\Documents”,“pictures”:“C:\Users\52\OneDrive - Universiteit Utrecht\Pictures”,“theme”:“light”,“aqua”:false,“contrast”:false,“dark”:false,“scrollbars”:true,“vibrancy”:false,“file”:“C:\Users\52\OneDrive - Universiteit Utrecht\Documents\Promotieonderzoek.tpy”,“recent”:[“C:\Users\5486882\OneDrive - Universiteit Utrecht\Documents\Promotieonderzoek.tpy”],“data”:“C:\Users\52\AppData\Roaming\Tropy”,“debug”:false,“dev”:false,“cache”:“C:\Users\52\AppData\Roaming\Tropy\cache”,“plugins”:“C:\Users\52\AppData\Roaming\Tropy\plugins”,“fontSize”:“13px”,“frameless”:false,“level”:“info”,“locale”:“en”,“log”:“C:\Users\5486882\AppData\Roaming\Tropy\log\tropy.log”,“uuid”:“fa835d10-c4d3-11ed-9844-17a0ac85da04”,“update”:{},“version”:“1.12.0”,“webgl”:true,“zoom”:1,“maximizable”:true,“minimizable”:true},“msg”:“project.init”}
{“level”:30,“time”:1679480510932,“type”:“renderer”,“name”:“project”,“msg”:“plugins scanned: 0”}
{“level”:30,“time”:1679480510933,“type”:“browser”,“name”:“main”,“msg”:“ready after 345.262939453125ms”}
{“level”:30,“time”:1679480510933,“type”:“renderer”,“name”:“project”,“msg”:“plugins loaded: 0”}
{“level”:30,“time”:1679480511316,“type”:“renderer”,“name”:“project”,“msg”:“restoring recent@tropy”}
{“level”:30,“time”:1679480511317,“type”:“renderer”,“name”:“project”,“msg”:“restoring settings@tropy”}
{“level”:30,“time”:1679480511318,“type”:“renderer”,“name”:“project”,“msg”:“restoring ui@tropy”}
{“level”:30,“time”:1679480511330,“type”:“renderer”,“name”:“project”,“mode”:“w+”,“msg”:“open db C:\Users\52\AppData\Roaming\Tropy\ontology.db”}
{“level”:30,“time”:1679480511389,“type”:“renderer”,“name”:“project”,“msg”:“project ready 832ms [dom:321ms win:55ms req:380ms]”}
{“level”:30,“time”:1679480511569,“type”:“renderer”,“name”:“project”,“msg”:“Esper.instance created using webgl renderer”}
{“level”:30,“time”:1679480511627,“type”:“renderer”,“name”:“project”,“mode”:“w”,“msg”:“open db C:\Users\52\OneDrive - Universiteit Utrecht\Documents\Promotieonderzoek.tpy”}
{“level”:30,“time”:1679480511665,“type”:“renderer”,“name”:“project”,“msg”:“restoring project.watch@1bc084d3-75f4-498f-a0ea-3e19390ad556”}
{“level”:30,“time”:1679480511697,“type”:“renderer”,“name”:“project”,“msg”:“restoring nav@1bc084d3-75f4-498f-a0ea-3e19390ad556”}
{“level”:30,“time”:1679480511698,“type”:“renderer”,“name”:“project”,“msg”:“restoring notepad@1bc084d3-75f4-498f-a0ea-3e19390ad556”}
{“level”:30,“time”:1679480511698,“type”:“renderer”,“name”:“project”,“msg”:“restoring esper@1bc084d3-75f4-498f-a0ea-3e19390ad556”}
{“level”:30,“time”:1679480511698,“type”:“renderer”,“name”:“project”,“msg”:“restoring imports@1bc084d3-75f4-498f-a0ea-3e19390ad556”}
{“level”:30,“time”:1679480511698,“type”:“renderer”,“name”:“project”,“msg”:“restoring sidebar@1bc084d3-75f4-498f-a0ea-3e19390ad556”}
{“level”:30,“time”:1679480511698,“type”:“renderer”,“name”:“project”,“msg”:“restoring panel@1bc084d3-75f4-498f-a0ea-3e19390ad556”}
{“level”:30,“time”:1679480511705,“type”:“renderer”,“name”:“project”,“mode”:“w”,“msg”:“open db C:\Users\52\OneDrive - Universiteit Utrecht\Documents\Promotieonderzoek.tpy”}
{“level”:30,“time”:1679480511706,“type”:“renderer”,“name”:“project”,“mode”:“w”,“msg”:“open db C:\Users\52\OneDrive - Universiteit Utrecht\Documents\Promotieonderzoek.tpy”}
{“level”:40,“time”:1679480512100,“type”:“renderer”,“name”:“project”,“ms”:392,“list”:true,“query”:“”,“tags”:false,“trash”:null,“msg”:“SLOW: *search query "" took 392ms”}
{“level”:40,“time”:1679480538799,“type”:“browser”,“name”:“main”,“msg”:“project[1] render-process crashed: crashed”}

Tropy’s item view is currently optimized for images; when you import a PDF each page is converted into an image (i.e., pixel-based instead of vector based). To do this, Tropy has to pick a given resolution. However, it’s difficult to pick an ideal resolution for every PDF document (or even page in a document) so that’s something you may need to adjust. Specifically, if you import PDFs that have hi-res images embedded with a high resolution the resulting image may become too large – I suspect this is what’s happening in your case.

So if you’re importing PDFs with embedded photos you may have to tweak with the settings a little bit. To start with, I’d set the default resolution (in the preferences) to something low like 72. Then import the PDF in question. Hopefully this will work, but the quality of the pages may be too low. Pick one page (ideally one that’s representative of the whole document) and then adjust the resolution for that page only in the photo panel for example increasing it to 144. It may take a few seconds and the page should update (and be much bigger); to judge the result it’s best to set the image viewer to 100% zoom level. If the quality isn’t good enough you can try to increase the resolution further; alternatively you can reduce the resolution to produce smaller images. In any case, once you find a good resolution for your document, you can change the default resolution in the preferences (alternatively you’d have to adjust the resolution of each page of the imported document – this is not ideal while bulk editing of at the photo level isn’t available).

I too am having problems with pdfs in an imported folder. They cause the whole import process to fail once one is reached. Reading the above reply I reduced the to resolution to 25 (it was already at 72) but it still fails. Here is the error:

{"level":40,"time":1679654521838,"type":"renderer","name":"project","stack":"Error: Input buffer contains unsupported image format","msg":"failed to import \"D:\\Graham\\Pictures\\My Pictures\\Maps\\p86a.pdf\""}
{"level":40,"time":1679654521839,"type":"renderer","name":"project","action":"item.import","meta":{"search":true,"done":true,"rel":4990,"was":1679654500414,"seq":4995,"now":1679654521839},"msg":"item.import failed: id.split is not a function","stack":"TypeError: id.split is not a function\n    at notify (C:\\Users\\graha\\AppData\\Local\\tropy-beta\\app-1.13.0-beta7\\resources\\app.asar\\lib\\bootstrap-324da71a.js:11425:36)\n    at Object.fail (C:\\Users\\graha\\AppData\\Local\\tropy-beta\\app-1.13.0-beta7\\resources\\app.asar\\lib\\bootstrap-324da71a.js:11431:10)\n    at Import.exec (C:\\Users\\graha\\AppData\\Local\\tropy-beta\\app-1.13.0-beta7\\resources\\app.asar\\lib\\index-c70fdcdd.js:2072:23)\n    at exec.throw (<anonymous>)\n    at next (C:\\Users\\graha\\AppData\\Local\\tropy-beta\\app-1.13.0-beta7\\resources\\app.asar\\lib\\project-a5a536b9.js:26080:34)\n    at currCb (C:\\Users\\graha\\AppData\\Local\\tropy-beta\\app-1.13.0-beta7\\resources\\app.asar\\lib\\project-a5a536b9.js:26153:7)\n    at C:\\Users\\graha\\AppData\\Local\\tropy-beta\\app-1.13.0-beta7\\resources\\app.asar\\lib\\project-a5a536b9.js:25558:5"}

Which platform are you on? This could be a problem with the updated build or something specific to the PDF file. Could you share the file with us?

I’m on Windows 11 with your 1.12 beta 7

Thanks! It looks like the Windows x64 libvips/poppler build fails in the beta (i.e. PDFs will fail to import). We’ll to fix the build.

Glad to have caught it at beta for you!