English 中文(简体)
Postscript number of copies
原标题:

Is there a way to edit a postscript file, to add or increase the number of copies to be printed?

最佳回答

I add /#copies 3 def in the setup section - or the whole prolog section if it is missing.

   %!

   %%BeginProlog
   %%BeginSetup
   /#copies 3 def
   %%EndSetup
   %%EndProlog

   72 72 scale
   2 2 translate

   /Helvetica-Bold findfont .2 scalefont setfont
   0 3 moveto (Not too shabby) show

   /Times-Italic findfont 1 scalefont setfont
   0 0 1 setrgbcolor
   0 4 moveto (Niels Castle!) show

   showpage

To sum up the PostScript Language Document Structuring Conventions Specification "If multiple copies of a document are desired, use the #copies key or the setpagedevice operator" and it goes on to discourage the use of the copypage operator.

You have to send the file to an imaging device to see it in effect - opening the PostScript file with GhostScript or Preview on Mac will just render one copy ignoring the operator.

问题回答
featurebegin{
  %%BeginNonPPDFeature: NumCopies 3
  3  /languagelevel where {pop languagelevel}{1} ifelse
  2 ge { 1 dict dup /NumCopies 4 -1 roll put setpagedevice }{ userdict /#copies 3 
  -1 roll put } ifelse
  %%EndNonPPDFeature
}featurecleanup




相关问题
How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Extract everything from PDF [closed]

Looking for solution to extract content from a PDF file (using console tool or a library). It will be used on server to produce on-line e-books from uploaded PDF files. Need to extract following ...

PDF compression How does Adobe do it?

This is a bit more of a fun question than a serious one, but how does the Adobe PDF format make documents so... portable? I just created a small Word document, 235kb in size, containing multiple ...

Exporting HTML Tables

How can I export an HTML table in my page as PDF and/or XLS? (preferably using JS (+jquery))

Using Java PDFBox library to write Russian PDF

I am using a Java library called PDFBox trying to write text to a PDF. It works perfect for English text, but when i tried to write Russian text inside the PDF the letters appeared so strange. It ...

HTML --> PDF with PHP [duplicate]

Possible Duplicate: Convert HTML + CSS to PDF with PHP? How can I convert an HTML page (via $cURL or something) to a PDF file?

Free way to convert PDF to XPS with C#

Are there any free tools that I can use to convert a PDF document into an XPS document? Although a nice programmatic API would be nice, I m not opposed to shelling out to a command line tool to do ...

PDF conversion service

I need to develop a service able to convert MS Office and Open Office documents to PDF. And the PDF`s also need to be commentable when opened in ADOBE Reader. I have used a piece of software from www....

热门标签