Using a joboptions file with ps2pdf

  • Follow


Hi

        Sorry about crossposting to 4 NG's but I think this question has relevance
to all these NG's.

        I am using LaTeX (IEEEtran class) to typeset a paper for an IEEE
conference. IEEE Xplore released its new PDF guidelines at the end of last
year.

        They have provided a joboptions file (which I am not sure I can legally
reproduce here) which is freely available for download at :


http://www.ieee.org/portal/index.jsp?pageID=corp_level1&path=pubs/confpubcenter&file=index.xml&xsl=generic.xsl

        My question is :

        Is it possible to specify the file as an option to ps2pdf ? The file above
has a long list of options and it would be cumbersome (and probably
impossible - character count limitations ?) to specify each one on the
command line.

        I tried :

ps2pdf
-dPDFSETTINGS=~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
confpaper.ps

but it quits with :

-dvar=name requires name=null, true, or false

        Any ideas ?

Thanks.
0
Reply Madhusudan 10/11/2004 4:43:31 PM

Madhusudan Singh wrote:

> Hi
> 
(snip)
>         My question is :
> 
>         Is it possible to specify the file as an option to ps2pdf ? The file above
> has a long list of options and it would be cumbersome (and probably
> impossible - character count limitations ?) to specify each one on the
> command line.
> 
(snip)

Hello-

Joboptions files are coded in PostScript, so you should be able to pass 
them to Ghostscript using the -f command-line option.

Sid Steward
http://www.AccessPDF.com/pdftk/
http://www.pdfhacks.com
0
Reply Sid 10/11/2004 6:49:30 PM


On Mon, 11 Oct 2004 12:43:31 -0400, Madhusudan Singh
<spammers-go-here@spam.invalid> wrote:

>Hi
>
>        Sorry about crossposting to 4 NG's but I think this question has relevance
>to all these NG's.
>
>        I am using LaTeX (IEEEtran class) to typeset a paper for an IEEE
>conference. IEEE Xplore released its new PDF guidelines at the end of last
>year.
>
>        They have provided a joboptions file (which I am not sure I can legally
>reproduce here) which is freely available for download at :
>
>
>http://www.ieee.org/portal/index.jsp?pageID=corp_level1&path=pubs/confpubcenter&file=index.xml&xsl=generic.xsl
>
>        My question is :
>
>        Is it possible to specify the file as an option to ps2pdf ? The file above
>has a long list of options and it would be cumbersome (and probably
>impossible - character count limitations ?) to specify each one on the
>command line.
>
>        I tried :
>
>ps2pdf
>-dPDFSETTINGS=~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
>confpaper.ps
>
>but it quits with :
>
>-dvar=name requires name=null, true, or false

-d is used to set boolean switches (null is the same as "=true".)
-s is uded to define string variables

@ is used to load a file containing switches (separated by whitespace 
or newlines) So you probably want
  ps2pdf @~/research/...joboptions confpaper.ps

The @file must contain switches as the would appear on the command 
line. That is, it contains things like 
  -dFitPage
  -sOutputFile=ABC.xyz
rather than just
  FitPage=true
  OutputFile=ABC.xyz

See Use.htm (or its equivalent) in the GS documentation.


Dan

-- 
Dan Luecking                     Department of Mathematical Sciences
University of Arkansas           Fayetteville, Arkansas 72701
To reply by email, change Look-In-Sig to luecking
0
Reply Dan 10/11/2004 8:18:58 PM

Madhusudan Singh <spammers-go-here@spam.invalid> wrote:

>         Is it possible to specify the file as an option to ps2pdf ? The file above
> has a long list of options and it would be cumbersome (and probably
> impossible - character count limitations ?) to specify each one on the
> command line.
> 
>         I tried :
> 
> ps2pdf
> -dPDFSETTINGS=~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
> confpaper.ps

ps2pdf calls ghostscript that support "@OptionsInFilename", see
ghostscript's documentation: Use.htm#Input_control
Unhappily "@" is not supported by ps2pdf, here the options has to
start with "-". But you can use ghostscript directly or write your
own script.

Yours sincerely
  Heiko <oberdiek@uni-freiburg.de>
0
Reply Heiko 10/11/2004 11:51:42 PM

Thanks to everyone who responded. I am now trying to use gs to create my PDF
file from PS using the -f option to pass the joboptions file name to it :

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=confpaper.pdf
-dNODISPLAY -sPAPERSIZE=letter -f
~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
confpaper.ps

This produces :
opyright 2003 artofcode LLC and Easy Software Products, all rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusRomNo9L-ReguItal font
from /var/lib/defoma/gs.d/dirs/fonts/n021023l.pfb... 2229044 824845 1923864
498377 0 done.
Loading NimbusRomNo9L-Medi font
from /var/lib/defoma/gs.d/dirs/fonts/n021004l.pfb... 2346188 917058 1943960
480929 0 done.
Loading NimbusRomNo9L-Regu font
from /var/lib/defoma/gs.d/dirs/fonts/n021003l.pfb... 2483428 1051756
2024344 551133 0 done.
Loading NimbusRomNo9L-MediItal font
from /var/lib/defoma/gs.d/dirs/fonts/n021024l.pfb... 2620668 1166277
2044440 571477 0 done.
Loading NimbusSanL-Bold font
from /var/lib/defoma/gs.d/dirs/fonts/n019004l.pfb... 2737812 1273870
2345880 745634 4 done.
Loading StandardSymL font
from /var/lib/defoma/gs.d/dirs/fonts/s050000l.pfb... 2680956 1221989
2205208 714438 2 done.
Loading NimbusSanL-Bold font
from /var/lib/defoma/gs.d/dirs/fonts/n019004l.pfb... 2778004 1316212
2225304 729487 2 done.
Loading StandardSymL font
from /var/lib/defoma/gs.d/dirs/fonts/s050000l.pfb... 2680956 1222020
2205208 715532 2 done.
Loading NimbusSanL-Bold font
from /var/lib/defoma/gs.d/dirs/fonts/n019004l.pfb... 2778004 1316212
2225304 730581 2 done.
Loading StandardSymL font
from /var/lib/defoma/gs.d/dirs/fonts/s050000l.pfb... 2680956 1222190
2205208 715256 2 done.
Loading NimbusSanL-Bold font
from /var/lib/defoma/gs.d/dirs/fonts/n019004l.pfb... 2778004 1316382
2225304 730305 2 done.
Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
Can't find (or can't open) font file Times.
Substituting font Times-Roman for Times.
Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
Can't find (or can't open) font file Times.
Substituting font Times-Roman for Times.

Then it quits, but does not create a PDF file ! What am I missing ?

0
Reply Madhusudan 10/15/2004 8:07:46 AM

Madhusudan Singh <spammers-go-here@spam.invalid> wrote:

>Thanks to everyone who responded. I am now trying to use gs to create my PDF
>file from PS using the -f option to pass the joboptions file name to it :
>
>gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=confpaper.pdf
>-dNODISPLAY -sPAPERSIZE=letter -f
>~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
>confpaper.ps
>
>This produces :
>...
>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
>Can't find (or can't open) font file Times.
>Substituting font Times-Roman for Times.
>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
>Can't find (or can't open) font file Times.
>Substituting font Times-Roman for Times.

Just a wild guess, but perhaps the job options have an option saying
to fail if there is any font substitution.

Your job seems to try and use a font called "Times" but there is no
such font. So there would be substitution.
----------------------------------------
Aandi Inston  quite@dial.pipex.com http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.

0
Reply quite 10/15/2004 9:01:18 AM

Aandi Inston wrote:

[Lot of cross posting here - but this question possibly has a little to do
with each of the above NGs. I apologize if this causes any inconvenience.]


Hi

        Thanks for your response.

> Madhusudan Singh <spammers-go-here@spam.invalid> wrote:
> 
>>Thanks to everyone who responded. I am now trying to use gs to create my
>>PDF file from PS using the -f option to pass the joboptions file name to
>>it :
>>
>>gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=confpaper.pdf
>>-dNODISPLAY -sPAPERSIZE=letter -f
>>~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
>>confpaper.ps
>>
>>This produces :
>>...
>>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
>>Can't find (or can't open) font file Times.
>>Substituting font Times-Roman for Times.
>>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
>>Can't find (or can't open) font file Times.
>>Substituting font Times-Roman for Times.
> 
> Just a wild guess, but perhaps the job options have an option saying
> to fail if there is any font substitution.
> 
> Your job seems to try and use a font called "Times" but there is no
> such font. So there would be substitution

        IEEE now requires that all fonts be embedded and subsetted.

        I found the solution to this minor problem. Apparently, the name of the PS
file has to be specified immediately after the specification of the output
file.

The correct command reads :

        $(GS) -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${DOCUMENT}.pdf
${DOCUMENT}.ps -dNODISPLAY -sPAPERSIZE=letter -f $(JOBOPTIONS)

where $(JOBOPTIONS) is the full path to the .joboptions file.

        After this process, I found that it did not embed / subset all the fonts.
acroread yields the properties as :

Producer : ESP ghostscript 7.0.7
PDF Version : 1.3 (Acrobat 4.x)

It lists a font named "A Type 3 Custom", and a lot of CM* fonts (not all)
that are apparently "Built-in". And there are some (like Helvetica-Bold~60,
Helvetica-Bold~6f etc.) that are listed as "Standard". The job options file
was supposed to embed/subset all the fonts (this is a new requirement). I
do not know why this is happening.

        I am including a few eps files (using \includegraphics in a LaTeX source
file -> DVI -> PS) produced using GNUPlot in this document. Do those need
to have fonts somehow separately embedded in them (I know very little about
PostScript) before including them in the LaTeX source (before the produced
PS in turn is processed using gs above) ?

        The joboptions file is located at :

http://www.ieee.org/portal/index.jsp?pageID=corp_level1&path=pubs/confpubcenter&file=index.xml&xsl=generic.xsl
        
        Any ideas ?

Thanks.
0
Reply Madhusudan 10/15/2004 10:03:31 AM

Madhusudan Singh <spammers-go-here@spam.invalid> wrote:

>>>Thanks to everyone who responded. I am now trying to use gs to create my
>>>PDF file from PS using the -f option to pass the joboptions file name to
>>>it :
>>>
>>>gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=confpaper.pdf
>>>-dNODISPLAY -sPAPERSIZE=letter -f
>>>~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
>>>confpaper.ps
>>>
>>>This produces :
>>>...
>>>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
>>>Can't find (or can't open) font file Times.
>>>Substituting font Times-Roman for Times.
>>>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
>>>Can't find (or can't open) font file Times.
>>>Substituting font Times-Roman for Times.
>> 
>> Just a wild guess, but perhaps the job options have an option saying
>> to fail if there is any font substitution.
>> 
>> Your job seems to try and use a font called "Times" but there is no
>> such font. So there would be substitution
>
>        IEEE now requires that all fonts be embedded and subsetted.
>
>        I found the solution to this minor problem. Apparently, the name of the PS
>file has to be specified immediately after the specification of the output
>file.
>
>The correct command reads :
>
>        $(GS) -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${DOCUMENT}.pdf
>${DOCUMENT}.ps -dNODISPLAY -sPAPERSIZE=letter -f $(JOBOPTIONS)
>
>where $(JOBOPTIONS) is the full path to the .joboptions file.

I don't know gs, but again a wild guess... perhaps this syntax causes
the job options file to be read AFTER the input file.  Of course, this
will eliminate the genuine error caused by using a nonexistent font!
But it doesn't solve it.

Why do you not look into this Times font, that seems very significant.
There is no such font.

Above all, why isn't this a follow up? Changing the title is simply
going to lead to repetition.
----------------------------------------
Aandi Inston  quite@dial.pipex.com http://www.quite.com
Please support usenet! Post replies and follow-ups, don't e-mail them.

0
Reply quite 10/15/2004 10:19:49 AM

Madhusudan Singh wrote:
> 
> Aandi Inston wrote:
> 
> [Lot of cross posting here - but this question possibly has a little to do
> with each of the above NGs. I apologize if this causes any inconvenience.]
> 
> Hi
> 
>         Thanks for your response.
> 
> > Madhusudan Singh <spammers-go-here@spam.invalid> wrote:
> >
> >>Thanks to everyone who responded. I am now trying to use gs to create my
> >>PDF file from PS using the -f option to pass the joboptions file name to
> >>it :
> >>
> >>gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=confpaper.pdf
> >>-dNODISPLAY -sPAPERSIZE=letter -f
> >>~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
> >>confpaper.ps
> >>
> >>This produces :
> >>...
> >>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
> >>Can't find (or can't open) font file Times.
> >>Substituting font Times-Roman for Times.
> >>Can't find (or can't open) font file /usr/share/ghostscript/fonts/Times.
> >>Can't find (or can't open) font file Times.
> >>Substituting font Times-Roman for Times.
> >
> > Just a wild guess, but perhaps the job options have an option saying
> > to fail if there is any font substitution.
> >
> > Your job seems to try and use a font called "Times" but there is no
> > such font. So there would be substitution
> 
>         IEEE now requires that all fonts be embedded and subsetted.
> 
>         I found the solution to this minor problem. Apparently, the name of the PS
> file has to be specified immediately after the specification of the output
> file.
> 
> The correct command reads :
> 
>         $(GS) -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${DOCUMENT}.pdf
> ${DOCUMENT}.ps -dNODISPLAY -sPAPERSIZE=letter -f $(JOBOPTIONS)
> 
> where $(JOBOPTIONS) is the full path to the .joboptions file.
> 
>         After this process, I found that it did not embed / subset all the fonts.
> acroread yields the properties as :
> 
> Producer : ESP ghostscript 7.0.7
> PDF Version : 1.3 (Acrobat 4.x)
> 
> It lists a font named "A Type 3 Custom", and a lot of CM* fonts (not all)
> that are apparently "Built-in". And there are some (like Helvetica-Bold~60,
> Helvetica-Bold~6f etc.) that are listed as "Standard". The job options file
> was supposed to embed/subset all the fonts (this is a new requirement). I
> do not know why this is happening.
> 
>         I am including a few eps files (using \includegraphics in a LaTeX source
> file -> DVI -> PS) produced using GNUPlot in this document. Do those need
> to have fonts somehow separately embedded in them (I know very little about
> PostScript) before including them in the LaTeX source (before the produced
> PS in turn is processed using gs above) ?
> 
>         The joboptions file is located at :
> 
> http://www.ieee.org/portal/index.jsp?pageID=corp_level1&path=pubs/confpubcenter&file=index.xml&xsl=generic.xsl
> 
>         Any ideas ?
> 
> Thanks.

Well, whatever the joboptions file defines in detail (I wasn't able to
download nor to view it),
for Ghostscript, it is a source file like any other. Thus, the
definitions in it become
active only for the PostScript stuff that follow it. Thus, the command
line should look like
this:

gs -dBATCH -sDEVICE=pdfwrite -sOutputFile=confpaper.pdf \
 -dNODISPLAY -sPAPERSIZE=letter \
 -c save pop \
 -f
~/research/publications/IEEExplore/IEEE-PDF-Acrobat5-17Mar04.joboptions
\
    confpaper.ps \
 -c quit

(the "\" at the line ends denoting the line ends to be ignored, as
usual).
Note that "-dBATCH" already implies "-dNOPAUSE", but adding that does
not hurt.
Note also that the "-c save pop" I added guarantees that Ghostscript
behaves 
like an "ordinary" print engine, i.e. encapsulates the PS job and
ensures the
special treatment of global objects.

As for your Times substitution complaints, the document requires a font
the 
PostScript name of which is "Times", but your system only provides
"Times-Roman";
but you may almost be sure that both denote the same real font.

If you have more questions, please post an URL to both the joboptions
and the document.ps files.

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
0
Reply Helge 10/15/2004 12:33:05 PM

Helge Blischke <H.Blischke@srz-berlin.de> wrote:

> [...]
> Note that "-dBATCH" already implies "-dNOPAUSE", but adding that does
> not hurt.

Which ghostscript version? With 7.07, 8.00, 8.14, 8.30 there is no
implication.

Yours sincerely
  Heiko <oberdiek@uni-freiburg.de>

PS: Number of groups reduced.
0
Reply Heiko 10/15/2004 9:59:59 PM

Heiko Oberdiek wrote:
> 
> Helge Blischke <H.Blischke@srz-berlin.de> wrote:
> 
> > [...]
> > Note that "-dBATCH" already implies "-dNOPAUSE", but adding that does
> > not hurt.
> 
> Which ghostscript version? With 7.07, 8.00, 8.14, 8.30 there is no
> implication.
> 
> Yours sincerely
>   Heiko <oberdiek@uni-freiburg.de>
> 
> PS: Number of groups reduced.

you are right (I used a specially hacked version at our site).

Helge
0
Reply Helge 10/16/2004 1:13:36 PM

On Fri, 15 Oct 2004 06:03:31 -0400
Madhusudan Singh <spammers-go-here@spam.invalid> wrote:


>         IEEE now requires that all fonts be embedded and subsetted.
> 
>         I found the solution to this minor problem. Apparently, the name of the PS
> file has to be specified immediately after the specification of the output
> file.
> 
> The correct command reads :
> 
>         $(GS) -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${DOCUMENT}.pdf
> ${DOCUMENT}.ps -dNODISPLAY -sPAPERSIZE=letter -f $(JOBOPTIONS)
> 
> where $(JOBOPTIONS) is the full path to the .joboptions file.
> 
>         After this process, I found that it did not embed / subset all the fonts.
> acroread yields the properties as :



A standalone command that should do the trick is:

gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter 
-dPDFSETTINGS=/printer -dCompatibilityLevel=1.3 -dMaxSubsetPct=100
-dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=myfile.pdf myfile.ps


Do let me know where IEEE's joboptions file is on that IEEE webpage, I too
can't seem to find it.



 Hope this helps,

 Mike Shell





0
Reply Michael 10/19/2004 9:23:57 PM

11 Replies
394 Views

(page loaded in 0.311 seconds)

Similiar Articles:












7/19/2012 8:31:39 PM


Reply: