Bug 691915 - Blank Page end of the PDF Document
Summary: Blank Page end of the PDF Document
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 0.00
Hardware: PC Windows 7
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-28 11:27 UTC by venkateswarlu
Modified: 2011-01-28 12:35 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Convertion file (46.39 KB, text/plain)
2011-01-28 11:29 UTC, venkateswarlu
Details
Postscript file (68.05 KB, application/postscript)
2011-01-28 12:00 UTC, venkateswarlu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description venkateswarlu 2011-01-28 11:27:14 UTC
Hi,

I'm generating .PS file using GHOSTSCRIPT. Using Below syntax

C:\GS\gs8.63\bin\enscript -X 88592 -r -L 95 -B -f "Courier7" -c --margins=0:0:0:0 -e$ -p C:\gs\temp\output.ps C:\gs\temp\conv.txt

Next

Using ps2pdf converting .ps file to PDF document. 

call ps2pdf14  C:\gs\temp\output.ps C:\gs\Temp\out.pdf

But the PDF document always comming with blank page at the end of the document.

Please help me for this issue. I'm facing this issue from last 1 month.


please find Attached text file.
Comment 1 venkateswarlu 2011-01-28 11:29:54 UTC
Created attachment 7165 [details]
Convertion file

Attached file is converting .ps and pdf
Comment 2 Ken Sharp 2011-01-28 11:43:38 UTC
I'm afraid I can't use the attached text file, I need a PostScript file to determine what is happening. Please attach the PostScript file you are supplying to GS (the file \gs\temp\output.ps in the sequence described in comment #1).

What version of Ghostscript are you using ? The directory specification in comment #1 suggests 8.63 which is quite elderly, you might get better results using the current version (9.0), or the soon to be released version 9.01.

Returning priority to normal for non-customer bug.
Comment 3 venkateswarlu 2011-01-28 12:00:07 UTC
Created attachment 7166 [details]
Postscript file

Please find post script file
Comment 4 venkateswarlu 2011-01-28 12:03:00 UTC
(In reply to comment #3)
> Created an attachment (id=7166) [details]
> Postscript file
> 
> Please find post script file

Right now i cant go latest version. In my office currently running 8.63 version.
I have to solve this issue using this version.

I'm wondering why you cant use con.txt file. 

Please check .ps file and let me know how to remove blank page in pdf document
Comment 5 Ken Sharp 2011-01-28 12:08:26 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created an attachment (id=7166) [details] [details]
> > Postscript file
> > 
> > Please find post script file
> 
> Right now i cant go latest version. In my office currently running 8.63
> version.
> I have to solve this issue using this version.
> 
> I'm wondering why you cant use con.txt file. 

Because Ghostscript does not process text files, it processes PostScript files. I don't have and don't use Enscript, and even if I did differences in versions could result in a different PostScript file being produced. Its important that I use the same PostScript file that you are using.
Comment 6 Ken Sharp 2011-01-28 12:12:02 UTC
The supplied PostScript file contains 17 pages, the output from the current version of Ghostscript produces 17 pages.

The final page *appears* blank, but technically is not. It contains a single space character, which obviously makes no marks on the page.

The problem lies with the production of the PostScript file, presumably by Enscript, and I'm not able to offer any help with that. If this has only started happening recently then I would suggest some change in the version or configuration of Enscript is behind this.

In any event Ghostscript is behaving as expected, as far as I can tell.
Comment 7 venkateswarlu 2011-01-28 12:26:30 UTC
(In reply to comment #6)
> The supplied PostScript file contains 17 pages, the output from the current
> version of Ghostscript produces 17 pages.
> 
> The final page *appears* blank, but technically is not. It contains a single
> space character, which obviously makes no marks on the page.
> 
> The problem lies with the production of the PostScript file, presumably by
> Enscript, and I'm not able to offer any help with that. If this has only
> started happening recently then I would suggest some change in the version or
> configuration of Enscript is behind this.
> 
> In any event Ghostscript is behaving as expected, as far as I can tell.

Hi thanks for your quick response.

I got this work recently from existing person.
So i'm continuing existing syntax. 
I'm not sure what i have to change.

The scripts are using gs863w32.exe,enscript-1.6.3-9-bin.exe and libiconv-1.8-1-bin.exe .

First step using enscript .txt file convert to postscript(.ps)file.
Second step ps2pdf14 convert .ps file to PDF.

Could you please tell what options i have to add or how to create without blank page.

If you given solution to me you will save my tensions.

Please give me some options.
Comment 8 Ken Sharp 2011-01-28 12:35:07 UTC
(In reply to comment #7)

> First step using enscript .txt file convert to postscript(.ps)file.
> Second step ps2pdf14 convert .ps file to PDF.
> 
> Could you please tell what options i have to add or how to create without blank
> page.

The PostScript file contains 17 pages of output, the final page consists entirely of a single space character. The PDF file produced by Ghostscript matches what the PostScript file contains. The 'problem' that you are experiencing therefore occurs before or during the creation of the PostScript file.

As I already said, I don't have a copy of Enscript, nor do I use it so I cannot offer any advice on the creation of the PostScript file. 

However I do note that your text file has a space character as the final byte in the file, possibly if you delete this space your problem will go away, I'm not in a position to be able to try that.


> Please give me some options.

I'm afraid I can offer no options, Ghostscript is doing what it 'should' do with the PostScript file. If altering your text file does not help then I suggest you go to an Enscript forum and ask there.