Bug 707309 - Can't reset page counter for 'png16m' device
Summary: Can't reset page counter for 'png16m' device
Status: RESOLVED DUPLICATE of bug 707307
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Printer Driver (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-05 12:52 UTC by Werner Lemberg
Modified: 2023-11-06 16:54 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Werner Lemberg 2023-11-05 12:52:49 UTC
Consider the following input file.

```
save
<<
  /OutputFile (./A%d.png)
  /OutputDevice /png16m
>> setpagedevice

newpath
100 200 moveto
200 250 lineto
100 300 lineto
2 setlinewidth
stroke
showpage
restore

save
<<
  /OutputFile (./B%d.png)
  /OutputDevice /png16m
>> setpagedevice

newpath
100 200 moveto
200 250 lineto
100 300 lineto
2 setlinewidth
stroke
showpage
restore
```

As suggested in https://bugs.ghostscript.com/show_bug.cgi?id=707307, this should produce two files called `A1.png` and `B1.png`.  However, the `save ... restore` pair doesn't reset the page counter, resulting in `A1.png` and `B2.png`.
Comment 1 Ken Sharp 2023-11-06 16:54:39 UTC

*** This bug has been marked as a duplicate of bug 707307 ***