Thanks, Brian. I played with TitlePref and cost factor just now. And use

strings pdfoutputfile | grep Title


to see anything interesting. After processing a tmp.c under 4 different
conditions, I got the following results:

   -
   - /Title(tmp.c)   【TitlePref 0, cost factor 65】
   - /Title(tmp.c)   【TitlePref 1, cost factor 65】
   - /Title(\(\(stdin\)\))>>endobj    【TitlePref 0, cost factor 66】
   - /Title(\(\(stdin\)\))>>endobj    【TitlePref 1, cost factor 66】

It seems as long as cost factor is 66, argv[3]=stdin. Changing TitlePref
apparently can't help me any.

Xiaolin



--
王晓林



On Tue, Jun 18, 2013 at 7:20 PM, Brian Potkin <claremont...@gmail.com>wrote:

> On Mon 17 Jun 2013 at 17:35:19 +0800, 王晓林 wrote:
>
> > Yeah, I just tried 300, 600, 1200, 2400dpi while setting cost factor to
> 66.
> > Higher DPI value indeed results better PDF quality. But I still prefer
> cost
> > factor 65, because
> >
> >    1. Size matters. With same dpi value, cost factor 65 results in a much
> >    smaller PDF file. Examples:
> >       - 66-2400dpi.pdf is 15523 bytes
> >       - 65-2400dpi.pdf is 8386 bytes
> >    2. Name matters. Processing a hello.c file into a PDF,
> >       - With cost factor 65, it give me a hello.pdf
> >       - With cost factor 66, it always give me a _stdin_.pdf. So I have
> to
> >       rename it to something else before it's overwritten by next run.
>
> This is a very sound argument and, after all, you are only reverting to
> the way Squeeze deals with PostScript files sent to cups-pdf.  However,
> I just wanted to tidy up a loose end or two, so thanks for confirming
> that PDF quality does not depend on cost factor. And thank you for the
> level of detail you have provided during discussion.
>
> Always getting _stdin_.pdf results from a combination of a number of
> things. In the first place the name originates from the method used by
> Emacs to send the file to CUPS. Then CUPS simply processes the file in a
> normal and, as far as I can tell, non-buggy, way. We see this in your
> error_log:
>
>    D [13/Jun/2013:10:44:42 +0800] [Job 102] argv[3]="(stdin)"
>
> argv[3] is the job title and is used on the command lines of pstopdf,
> pdftopdf and pdftops.  If TitlePref is 1 in /etc/cups/cups-pdf.conf then
> argv[3].pdf becomes the output filename.
>
> For a TitlePref of 0 (the default) the output filename is taken from
> %Title in the PostScript file received from CUPS *after filtering by
> pdftops*. pdftops contructs a %Title from the job title.
>
> Cheers,
>
> Brian.
>
>

Reply via email to