Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ghostscript custom usage

1 view
Skip to first unread message

Bill Harris

unread,
Apr 1, 2001, 7:21:24 PM4/1/01
to
I'd like to use Ghostscript to create PDF's from Powerpoint. I
imagine using it this way:

Print a ps (or eps) file from Powerpoint.

Convert using Ghostscript to PDF.

I have a couple of constraints that I haven't succeeded in satisfying.
All of the files are in landscape format, and I want the final to
appear in landscape. I also need the PDF to be 450x600 pixels in
size.

My first problem (or symptom) comes in the Postscript generated from
Powerpoint. The bounding box is shown wider than it is tall, so I
presume the 'landscape' setting is having some effect, but the image
is oriented 270 degrees off, taller than it is wide.

Selecting "rotate media" in GSView (GSView 2.9, ghostscript 6.01 on
NT4.0) doesn't help. The image is still 270 degrees from expected,
although it does now fill the indicated bounding box. Stuff is cut
off, though.

Changing to "landscape" does rotate the actual image properly, but
the bounding box is now vertical. I don't see a way to reset that
yet.

Printing this 'landscaped' file gives me a PDF that still shows up
rotated 270 degrees from the desire direction. Any suggestions on
how to make this work?

Latebreaking news: when I display the PDF in Acrobat Reader 4, it
is rotated; when I display it in GSView, it's oriented correctly.
Am I going crazy?

My second problem involves figuring out how to set the size to 450
pixels (high) x 600 pixels (wide). I tried setting a custom slide
size of 8.3" x 6.2" in Powerpoint (assuming I was 72 pixels per
inch--probably a wrong assumption, but it should at least let me know
if the scaling would work).

I then printed it as Postscript from Powerpoint and then to PDF via
Ghostscript. The resulting file was still 8.5" x 11" (both the
Postscript and the PDF).

Is there a way to do this that would be successful?

I don't really care if I do it from a command line or GSView, although
I haven't been successful in running ghostscript from the command
line, yet, on NT (I haven't tried long, either).

If there's a better group to ask this, let me know.

Thanks,

Bill


SuperNews

unread,
Apr 3, 2001, 6:10:10 PM4/3/01
to
GS and Acrobat do have different interpretations of Document Strucuring
conventions which will give problems with landscape images.
GS seems to adhere to the Adobe DSC more strictly than Acrobat.

You can probably fix your problem by using Ghostscript and (maybe) editing
the PS file produced from Powerpoint.
I have usually produced files from hadn-crafted Postscript.

The key thing to bear in mind when using DSC is that it is seems to be a
request to the VIEWING / PRINTING engine on how to render your image.
I generally specify landscape pages using %%DocumentMedia and Orientation -
both as global defaults and as individual Page settings.

With the Ghostscript command line you can resize images (and change
resolution).
It might be worth trying ImageMagick - which acts as an interface to
Ghostscript and it easier to use (though slower).

e.g. - here is the DSC headers for a landscape image that I use:

%!PS-Adobe-3.0
%%DocumentPaperSizes: a4
%%DocumentMedia: a4 800 560 80 white ( )
%%Orientation: Landscape
%%Pages: 1
%%EndComments

%%BeginDefaults
%%PageMedia: a4 800 560 80 white ( )
%%PageOrientation: Landscape
%%EndDefaults

%%BeginProlog


and I also do the normal LANDSCAPE rotation and translation to orient my
image correctly on the requested media.

clippath
pathbbox 4 1 roll pop pop translate
90 rotate

This produces an image correctly orientated in GSView (using Auto).

Bill Harris <bill_...@facilitatedsystems.com> wrote in message
news:ur8zcd...@facilitatedsystems.com...

Bill Harris

unread,
Apr 4, 2001, 4:06:06 AM4/4/01
to
"SuperNews" <mike.t...@btinternet.com> writes:

> With the Ghostscript command line you can resize images (and change
> resolution).
> It might be worth trying ImageMagick - which acts as an interface to
> Ghostscript and it easier to use (though slower).

Thanks for all your tips. It's a bit late right now, but I've filed this
to try it out tomorrow.

Thanks,

Bill

Brian V. Smith

unread,
Apr 4, 2001, 2:45:03 PM4/4/01
to
In article <tckih9c...@news.supernews.co.uk>, "SuperNews" <mike.t...@btinternet.com> writes:
|> GS and Acrobat do have different interpretations of Document Strucuring
|> conventions which will give problems with landscape images.
|> GS seems to adhere to the Adobe DSC more strictly than Acrobat.

Does anyone else find this extremely ironic, given that Adobe wrote Acrobat?

--
---------------------------------------------------------------
Brian V. Smith (bvs...@lbl.gov) http://www-epb.lbl.gov/BVSmith
Lawrence Berkeley National Laboratory
I don't speak for LBL; they don't pay me enough for that.
Check out the xfig site at http://www-epb.lbl.gov/xfig

To the optimist, the glass is half full. To the pessimist, the
glass is half empty. To the engineer, the glass is too small
for a decent safety factor.

Rod Dorman

unread,
Apr 4, 2001, 4:09:56 PM4/4/01
to
In article <9afq3f$gkf$1...@overload.lbl.gov>,

Brian V. Smith <bvs...@epb1.lbl.gov> wrote:
>In article <tckih9c...@news.supernews.co.uk>, "SuperNews"
><mike.t...@btinternet.com> writes:
>|> GS and Acrobat do have different interpretations of Document Strucuring
>|> conventions which will give problems with landscape images.
>|> GS seems to adhere to the Adobe DSC more strictly than Acrobat.
>
>Does anyone else find this extremely ironic, given that Adobe wrote Acrobat?

Given what I've come across when trying to parse DSC created by Adobe
Illustrator, no not really.

--
-- Rod --
ro...@polylogics.com

CyBerRat

unread,
Apr 5, 2001, 2:17:06 AM4/5/01
to
From what I have had to deal with for the last 3 years as an in-house
developer/technical manager for a major classified & niche market publisher
in southern california, the anwser is yes/no. Yes when I first started and
knew nothing about PS it drove me insane, after 3 months of supporting a
layout/pagination application writen by a long gone lone programmer in VB4
(not OO by any sense of rational) and using win-nt4 for a print server to HP
printers I was able to write PS code by hand because there was allways bad
pages to fix. Mostly EPS images would blow the stack and this are from Adobe
Photoshop 4, and Quark 3.
I had to tweek the code to allow for eps from Photoshop 4/5 and to migrate
to Quark 4.
Illustrator was the biggest pain in the <ass/> (tagged so some can right a
stripper with auto inserted cdate wraper tags in the msg body so we can
protect the freedom of speech and still protect the rights of those who wish
to censor us).
Anyways rewrote the app in VB6 and have it output the format in xml and
moved print specific code in a new print server app reading a hotfolder
generates ps code from the xml sends that to a Distiller hot folder. Know we
go direct to plate from PDF.
rewriting so i can output HTML, SVG, XML, PDF or PS.

So now I dont put nothing passed the Non-Open Source pretend to be a
developers best friend software sweat-shops.
Regards,
APD

"Brian V. Smith" <bvs...@epb1.lbl.gov> wrote in message
news:9afq3f$gkf$1...@overload.lbl.gov...

Bill Harris

unread,
Apr 9, 2001, 10:49:46 AM4/9/01
to
Thanks to tips in this thread and elsewhere in this group, I've made
significant progress. For starters, I upgraded to ghostscript 6.5,
GSView 3.6, and the Adobe PS driver, and I got mostly usable output.

I do have 2 remaining questions, which I think (and hope) can be
solved by settings in the Postscript driver and in GSView.

For a refresher, I'm trying to convert Powerpoint to PDF with a size
of approximately 600x450 pixels, landscape mode. (Eventually, I'll
want to convert Prosper slides to the same size, but I'm taking
things one step at a time.)

I set page size in Powerpoint to 6.4in x 4.8in. I printed to file
using the Adobe driver with color, landscape, DSC, 100% scaling,
and True Type Fonts substituted with device fonts.

In GSView, I converted to PDF using an offset of -110, -154 to shift
the centered Postscript output to the upper LH corner.

My first concern is this:

I have a custom (and customer) font I need to use, but when I turn
the fonts option to "Download as Softfont," some of the lines of
text in the output drift vertically (as in

e
in
ly funny l
al
this is a re

Any tips about settings in the Adobe driver or in GSView to make sure
I get the fonts I need and no wandering lines?

I'm also concerned, because embedded images (which probably started
life as jgegs and gifs; I didn't create them) look a bit like they are
a matte finish when they're uploaded into the final application, even
though the PDF looks quite good. Since the end application is
proprietary, I can't expect help here _except_ to ask information
about the graphics format of the images in the PDF (and in the
Postscript). Is there something special I should know about graphics
in PDF's converted this way?

Thanks,

Bill

0 new messages