Closed shaunpatterson closed 1 year ago
Well, the files are actually going to the spool directory:
/var/spool/pdfwriter/shaunpatterson
shaunpatterson@jalapeno/v/s/p/shaunpatterson> ls -ltra
total 1136
drwxr-xr-x 3 root wheel 96 Dec 27 04:19 ..
-rw-rw-rw-@ 1 root wheel 0 Dec 27 04:19 Icon?
-rw-------@ 1 shaunpatterson staff 20343 Dec 27 04:19 Untitled 2.pdf
-rw------- 1 shaunpatterson staff 20343 Dec 27 04:23 Untitled 2-1.pdf
-rw------- 1 shaunpatterson staff 20343 Dec 27 04:25 Untitled 2-2.pdf
-rw------- 1 shaunpatterson staff 20343 Dec 27 04:27 Untitled 2-3.pdf
-rw------- 1 shaunpatterson staff 20343 Dec 27 04:36 Untitled 2-4.pdf
drwx------@ 9 shaunpatterson staff 288 Dec 27 04:57 .
-rw-------@ 1 shaunpatterson staff 47630 Dec 27 04:57 Untitled.pdf
That’s because the “directory” it creates is a symbolic link to the actual location.
The actual location is where it is because the operating system tightly limits the locations to which printer drivers can write files as part of a “print” operation.
Rod
Sent from my iPhone
On 27 Dec 2022, at 8:59 pm, Shaun Patterson @.***> wrote:
Well, the files are actually going to the spool directory:
/var/spool/pdfwriter/shaunpatterson
@.***/v/s/p/shaunpatterson> ls -ltra total 1136 drwxr-xr-x 3 root wheel 96 Dec 27 04:19 .. -rw-rw-rw-@ 1 root wheel 0 Dec 27 04:19 Icon? -rw-------@ 1 shaunpatterson staff 20343 Dec 27 04:19 Untitled 2.pdf -rw------- 1 shaunpatterson staff 20343 Dec 27 04:23 Untitled 2-1.pdf -rw------- 1 shaunpatterson staff 20343 Dec 27 04:25 Untitled 2-2.pdf -rw------- 1 shaunpatterson staff 20343 Dec 27 04:27 Untitled 2-3.pdf -rw------- 1 shaunpatterson staff 20343 Dec 27 04:36 Untitled 2-4.pdf drwx------@ 9 shaunpatterson staff 288 Dec 27 04:57 . -rw-------@ 1 shaunpatterson staff 47630 Dec 27 04:57 Untitled.pdf
— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/24#issuecomment-1365771064, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADIFDYQEL6WXTGCVP5LWPK4UXANCNFSM6AAAAAATKI7ZF4. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hmm, it's not a symbolic link.
You are correct. Its a MacOS alias that points to /private/var/spool/pdfwriter/xxx
where xxx is whatever NSUserName() returns for the current user.
The easiest way to reveal the target location is to use Finder’s Info.
let theOrigURL = NSURL.fileURL(withPath: "/private/var/spool/pdfwriter/(NSUserName())")
let theData = try! theOrigURL.bookmarkData(options: [URL.BookmarkCreationOptions.suitableForBookmarkFile],
includingResourceValuesForKeys: nil,
relativeTo: nil)
try! URL.writeBookmarkData(theData, to:panel.url!)
Rod
On 28 Dec 2022, at 8:53 am, Shaun Patterson @.***> wrote:
Hmm, it's not a symbolic link.
— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/24#issuecomment-1366198214, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADKUN5NPUIN4L7QO3YLWPNQOXANCNFSM6AAAAAATKI7ZF4. You are receiving this because you commented.Message ID: @.***>
The directory it creates isn't a directory:
If I delete this then create it manually with
mkdir ~/Documents/PDFWriter
it still doesn't work. Printing from TextEdit yields nothing in this directory.