priPrinter: Naming options when printing to priPrinter? - priPrinter

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Naming options when printing to priPrinter?

#1 User is offline   Notoric 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 29-October 13

Posted 23 November 2013 - 07:48 AM

A friendly hello to everyone!

priPrinter Pro 6.0.1.2231 Windows XP SP3

When I print a document ("document1.doc") from Microsoft Word to priPrinter, on the left job-column the document appears as "Microsoft Word - document1.doc". Is it possible to change this naming behaviour? So that the document appears only with its name ("document1") without the "Microsoft Word" prefix?

Thanks in advance an greetings from Munich, Germany! :-)

Alex
0

#2 User is offline   Aron 

  • priPrinter Support
  • Group: Administrators
  • Posts: 131
  • Joined: 28-February 10

Posted 23 November 2013 - 08:53 PM

Hi Alex,

Name of the job is defined by printing application. priPrinter only displays it.
You can rename it in priPrinter, in job properties dialog. But this is for currently loaded file only.

Regards,
Aron
0

#3 User is offline   CoMPi 

  • Advanced Member
  • PipPipPip
  • Group: Senior Members
  • Posts: 208
  • Joined: 05-April 13

Posted 05 February 2014 - 02:17 PM

I do not know if you are familiar with PDFCreator. There is a filename substitution section in options where one can define substitution for any phrase of job name. Typically the tool is used to remove common phrases, like "Microsoft Word", from print job names.
Piotr
0

#4 User is offline   CoMPi 

  • Advanced Member
  • PipPipPip
  • Group: Senior Members
  • Posts: 208
  • Joined: 05-April 13

Posted 25 February 2014 - 12:35 PM

Here is a simple script which do the job. It could be shortened if there is a text replace function.

Piotr

BTW. Is it possible to autorun a script when the document is loaded?

// replaces first occurence of "from" with "to" in the "str"
function replace(str, from, to) {
	local idx = str.find(from);
	if (idx != null)
		return to + str.slice(idx + from.len());
	else
		return str;
}

// removes most common prefixes and postfixex
function cleanJobName(jobName) {
	jobName = replace(jobName, "Microsoft Word - ", "");
	jobName = replace(jobName, ".docx", "");
	jobName = replace(jobName, ".doc", "");
	jobName = replace(jobName, "Microsoft Excel - ", "");
	jobName = replace(jobName, ".xlsx", "");
	jobName = replace(jobName, ".xls", "");
	jobName = replace(jobName, "Microsoft PowerPoint - ", "");
	jobName = replace(jobName, ".pptx", "");
	jobName = replace(jobName, ".ppt", "");
	jobName = replace(jobName, "Microsoft Word - ", "");
	return jobName;
}

// main part
local doc = window.GetDocument();
local jobIdx = 0;
while(jobIdx < doc.GetNumSubDocs()) {
	doc.GetSubDoc(jobIdx).jobname = cleanJobName(doc.GetSubDoc(jobIdx).jobname);
	jobIdx += 1;
}

Piotr
0

#5 User is offline   Aron 

  • priPrinter Support
  • Group: Administrators
  • Posts: 131
  • Joined: 28-February 10

Posted 25 February 2014 - 01:29 PM

View PostCoMPi, on 25 February 2014 - 12:35 PM, said:

BTW. Is it possible to autorun a script when the document is loaded?


Only, when it was printed.
0

#6 User is offline   CoMPi 

  • Advanced Member
  • PipPipPip
  • Group: Senior Members
  • Posts: 208
  • Joined: 05-April 13

Posted 25 February 2014 - 03:25 PM

View PostAron, on 25 February 2014 - 01:29 PM, said:

Only, when it was printed.


It is a pity :/ Do you have any plans to support also other events (load, save, etc.)?
Piotr
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users