Duplex Postscript - 强制新建页面

发布于 2024-07-29 02:58:35 字数 448 浏览 6 评论 0原文

有没有一种简单的方法可以将 postscript 页面强制到新的物理页面上而不插入空白页面?

例如,假设我有一个包含 10 页 postscript 页的 PS 文档,需要打印到不同的文档包中:

1 - 纸质页 1 正面

2 - 纸质页 1 背面

3 - 纸质页 2

4 - 纸质页 3 正面

5 - 纸质页第 3 页 背面

6 - 物理页 4 正面

7 - 物理页 5

8 - 物理页 6 正面

9 - 物理页 7 正面

10 - 物理页 7 背面

我可以将整个文件设置为双面打印,并插入虚拟文件第 3、6、7 和 8 页之后的页面,但我想避免这种情况,因为我们的打印机按印象收费,而不是按物理页面收费。

我希望有一个简单的 PS 语法对应于“强制到首页”。

Is there an easy way to force a postscript page onto a new physical page without inserting a blank page?

e.g. Say I have a PS document with 10 postscript pages, which needs to print into different document bundles :

1 - Physical Page 1 Front Side

2 - Physical Page 1 Rear Side

3 - Physical Page 2

4 - Physical Page 3 Front Side

5 - Physical Page 3 Rear Side

6 - Physical Page 4 Front Side

7 - Physical Page 5

8 - Physical Page 6 Front Side

9 - Physical Page 7 Front Side

10 - Physical Page 7 Rear Side

I could set the whole file to be duplex, and insert dummy pages after page 3,6,7 and 8, but I'd like to avoid that as our printers cost per impression, not per physical page.

I'm hoping there's a simple PS syntax which corresponds to "Force to front page".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冷了相思 2024-08-05 02:58:35

尝试关闭双面打印,然后立即重新打开,否则您将插入空白页。

<< /Duplex false >> setpagedevice
<< /Duplex true >> setpagedevice

setpagedevice 隐式调用 erasepageinitgraphics(因此在相关 showpage 之后使用它),但是 PostScript 语言参考手册说:

在设备激活时,双面设备始终将第一页打印在新的介质上; 停用时,如果仅在一面上打印,它会自动传送最后一张介质。

因此,如果这有效,它应该保存一个 showpage 但仍然正确弹出页面。

Try turning duplex off and immediately back on where you would otherwise insert a blank page.

<< /Duplex false >> setpagedevice
<< /Duplex true >> setpagedevice

setpagedevice implicitly invokes erasepage and initgraphics (so use it after the relevant showpage), however the PostScript Language Reference Manual says:

On device activation, a duplex device always prints the first page on a new sheet of medium; on deactivation, it automatically delivers the last sheet of medium if it has been printed on only one side.

So, if this works, it should save a showpage but still eject the pages correctly.

家住魔仙堡 2024-08-05 02:58:35

这可能有点牵强,但您可以更改 showpage 行为,然后进行任何您想要的编程。

% before the first -showpage-

/pageCount 0 def

% redefinition of 'showpage'
/showpage 
{
    showpage
    /pageCount pageCount 1 add def

    % add page checking here, and whatever logic you want
    % just call another showpage to create an empty one
}
bind def 
% 'bind' keeps old showpage unaltered, avoiding recursion

当无法禁用双工时,这是一个选项,正如 dreamlax 在他的答案中所示。

This may be far-fetched, but you can change showpage behavior, and then program whatever you want.

% before the first -showpage-

/pageCount 0 def

% redefinition of 'showpage'
/showpage 
{
    showpage
    /pageCount pageCount 1 add def

    % add page checking here, and whatever logic you want
    % just call another showpage to create an empty one
}
bind def 
% 'bind' keeps old showpage unaltered, avoiding recursion

This is an option when disabling duplex is not possible, as dreamlax has shown in his answer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文