Open deon-gracias opened 5 hours ago
Hi @deon-gracias do you modify the unipdf-cli code?
I tried but can't reproduce the issue.
alip@alips unipdf % go run main.go split ~/unipdf-security-report-3.pdf ~/unipdf-security-report-3.pdf 1
Successfully split file ~/unipdf-security-report-3.pdf
Output file saved to ~/unipdf-security-report-3.pdf
alip@alips unipdf %
No I haven't, but I still re-cloned the repository and tried again. This was the result.
I also checked if I have some other /tmp/unipdf_sample.pdf in my file doing a ls grep but nothing showed up
Could you share your pdf file?
Hard to debug if unable to reproduce the issue
I'm sure its not the pdf that is the issue but here you go. I'll also look into some solutions, other than just copying the file to the /tmp
dir
I'm sure its not the pdf that is the issue but here you go. I'll also look into some solutions, other than just copying the file to the
/tmp
dir
Yes, I am unable to reproduce it.
While trying to run a split on a pdf and writing it to the same area. I get this error of Invalid Cross-Device.
Going through the source code and messing I came to know it's cause of the
os.Rename
done inpkg/pdf/utils.go
specifically inwritePdf
function on line 83.The fix I found for it was just simply copying the file to the
TEMP_DIR
but then there's an issue that we cannot delete the file fromTEMP_DIR
when it is/tmp
due to access rights I think.