Bug 707309

Summary: Can't reset page counter for 'png16m' device
Product: Ghostscript Reporter: Werner Lemberg <wl>
Component: Printer DriverAssignee: Default assignee <ghostpdl-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---

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 ***