rodyager / RWTS-PDFwriter

An OSX print to pdf-file printer driver
GNU General Public License v2.0
798 stars 77 forks source link

Not creating destination folder #40

Closed JFalcon26 closed 11 months ago

JFalcon26 commented 11 months ago

No destination folder was created, made alias instead. Nothing happens when files are "printed".

Screenshot 2023-09-16 at 2 24 14 PM
rodyager commented 11 months ago

The creation of an alias is correct. The alias should point to /private/var/spool/pdfwriter/

The “printed” pdf files end up in this folder.

This design choice is forced by the OS - printer drivers only have permission to write to a restricted set of locations.

Your description does not provide enough information to determine why “nothing happens”.

Rod

On 17 Sep 2023, at 4:26 am, JFalcon26 @.***> wrote:

No destination folder was created, made alias instead. Nothing happens when files are "printed". [Screenshot 2023-09-16 at 2 24 14 PM]https://user-images.githubusercontent.com/145224512/268464899-e1505336-4a40-4698-8d54-cddf3621c58e.png

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/40, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADNFIW5Z2ALLR5FJOMTX2XVLZANCNFSM6AAAAAA43BSHSA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

JFalcon26 commented 11 months ago

When I said "nothing happens" I just meant the print dialogue box disappears. I followed the Macintosh HD/private/var/spool/pdfwriter/ that you had said the documents should be under, but there is no pdfwriter folder in /spool. When I click the alias it says "The operation can’t be completed because the original item for “PDFWriter” can’t be found."

Screenshot 2023-09-16 at 6 39 02 PM
rodyager commented 11 months ago

Reinstall RWTS-pdfwriter.

The folder pdfwriter is created during the install process.

Can’t think why it wasn’t, but reinstalling will probably fix it.

Rod

Sent from my iPhone

On 17 Sep 2023, at 8:47 am, JFalcon26 @.***> wrote:



When I said "nothing happens" I just meant the print dialogue box disappears. I followed the Macintosh HD/private/var/spool/pdfwriter/ that you had said the documents should be under, but there is no pdfwriter folder in /spool. When I click the alias it says "The operation can’t be completed because the original item for “PDFWriter” can’t be found."

[Screenshot 2023-09-16 at 6 39 02 PM]https://user-images.githubusercontent.com/145224512/268474232-a495487e-ab72-481b-a272-4c662cdd0d94.png

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/40#issuecomment-1722333490, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADOKKOBBXIQUAZKER4TX2YT73ANCNFSM6AAAAAA43BSHSA. You are receiving this because you commented.Message ID: @.***>

JFalcon26 commented 11 months ago

Just ran a complete uninstall/delete/redownload/reinstall and /pdfwriter is still not showing up in /spool and alias cannot find the original PDFWriter. I am running MacOS Ventura 13.5.2

rodyager commented 11 months ago

I should have checked the code before I wrote.

When the printer driver processes a job, the first thing it does is check to see if

/var/spool/pdfwriter/

exits and is a directory.

If it doesn’t exit, it creates it, creating intermediate directories if necessary. If that fails, the printer driver exits and writes an error message to the CUPS log. It then gives that directory an icon that is constructed from the file at /Library/Printers/RWTS/PDFwriter/PDFfolder.png

Finally, it spools output that the OS is directing to the “printer” to a file in that directory.

Only possibility of a reason for faiing to create the directory that comes to mind is if your unix username contains a character that can’t be in a file name.

But my suggested work around is executing the following

sudo mkdir /var/spool/pdfwriter sudo chown root:wheel /var/spool/pdfwriter sudo chmod 755 /var/spool/pdfwriter

You could then execute

users

to find your unix user name and the

execute

sudo mkdir /var/spool/pdfwriter/xxx (where xxx is your username) sudo chown xxx:staff /var/spool/pdfwriter/xxx (xxx is your username in both places) sudo chmod 700 /var/spool/pdfwriter/xxx (again xxx is your username)

If any of that doesn’t work, let me know.

With the folder structure in place, it should just work.

Rod

On 17 Sep 2023, at 12:01 pm, JFalcon26 @.***> wrote:

Just ran a complete uninstall/delete/redownload/reinstall and /pdfwriter is still not showing up in /spool and alias cannot find the original PDFWriter. I am running MacOS Ventura 13.5.2

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/40#issuecomment-1722367940, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADIP5UZVFS766TGUKPDX2ZKW7ANCNFSM6AAAAAA43BSHSA. You are receiving this because you commented.Message ID: @.***>

JFalcon26 commented 11 months ago

Sorry its been a couple days, but just executed those lines. I had uninstalled RWTS, ran those lines in terminal, verified files were there and reinstalled RWTS and it all seems to be working as it should now. Thanks so much.

Jack

null-prophet commented 6 months ago

Same problems on an install with Sonoma 14.2.1

The username is just a simple 2 ascii characters and no errors come up when installing.

Followed the instruction and it worked eventually. It looks like the functions you call to make the folders has changed in later versions of MacOS or a privilege issue when issuing the mkdir commands during install.

rodyager commented 6 months ago

The PDFwriter utility creates a symbolic link to /var/spool/pdfwriter/.
I suspect that you have noticed that this destination did not exist at the time you checked. That's because this destination is created if it doesn't exist when you "print" your first document using the pdfwriter printer. As far as I can see, nothing is broken.

AuHau commented 2 months ago

Running Sonoma 14.5, I had the same issue that the /var/spool/pdfwriter/ was not created after install. Running the above commands fixes it. My user name does not have any special characters, but potential reason for the issue could be that it is not an admin account.

rodyager commented 2 months ago

You are almost certainly correct in suggesting that this issue is related to being a non-admin user. I'll think about how I might fix this. The difficulty is that the innermost folder needs to be created by the unprivileged printer driver at print time as all the potential users are not known at install time.