rodyager / RWTS-PDFwriter

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

Remove prefix “job_***” from filenames? #19

Closed alexfazio closed 2 years ago

alexfazio commented 2 years ago

First of all, let me thank you for this fantastic utility. As you can see here it's extremely useful for DEVONthink users.

I didn't find anything about this in your resources, so I assume this is a feature request rather than a question...

Is there any possibility to set up RWTS-PDFwriter from Rod Yager to not add the prefix “job” to each new file?

image

ericcobia commented 2 years ago

I also find this tool very helpful and have a like request. The job and the integer would be great to be removed or at least moved to after the title. I have tried adjusting the source but nothing works

rodyager commented 2 years ago

Unfortunately, the file name is completely under the control of the OS print system.

The printer driver can’t change it.

Rod

Sent from my iPhone

On 17 Jun 2022, at 5:15 am, ericcobia @.***> wrote:



I also find this tool very helpful and have a like request. The job and the integer would be great to be removed or at least moved to after the title. I have tried adjusting the source but nothing works

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

ericcobia commented 2 years ago

to help with the alexfazio, in this file in the source code. /RWTS-PDFwriter-master/sources/pdfwriter.m line451 you can do this: //snprintf(title, BUFSIZE, "job_%i %s", job, cmdtitle); snprintf(title, BUFSIZE, "%i %s", job, cmdtitle);

the "job_" disappears, but the %i cannot be removed without an complie error so your output file starts with a number now

change that and run the build script.sh and you have half the change done :)

ericcobia commented 2 years ago

the %i number does seem to be out of control of script as rodyager states. im still wasting time trying tho

rodyager commented 2 years ago

Ok.

Using

snprintf(title, BUFSIZE, “%s”, cmdtitle);

as the replacement line 451 should do the trick.

Rod

Sent from my iPhone

On 18 Jun 2022, at 2:53 am, ericcobia @.***> wrote:



to help with the alexfazio, in this file in the source code. /RWTS-PDFwriter-master/sources/pdfwriter.m line451 you can do this: //snprintf(title, BUFSIZE, "job_%i %s", job, cmdtitle); snprintf(title, BUFSIZE, "%i %s", job, cmdtitle);

the "job_" disappears, but the %i cannot be removed without an complie error so your output file starts with a number now

change that and run the build script.sh and you have half the change done :)

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

ericcobia commented 2 years ago

i confirm it works - ty Rodyager!!!!!!

rodyager commented 2 years ago

The one caution. It will overwrite a previously “printed” document with the same name.

Rod

On 18 Jun 2022, at 7:53 am, ericcobia @.**@.>> wrote:

i confirm it works - ty Rodyager!!!!!!

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