dw.saveAs (PDF) generates a PS file instead of PDF file

Guru(s),

I have PowerBuilder 10.5 build 5048 and GhostScript 8.57. In simple words, I 
am trying to print DW into a PDF using SaveAs ("file name", PDF!)

The PDF file is generated, but I can not open with Acrobat or any other PDF 
viewers.
But I can open it fine with a PostScript Viwer like GSView. It looks like a 
PS file more than a PDF file.

What am I missing? Do I need to convert this PS into PDF by calling a 
GhostScript script?

Appreciate you help,
    Div

FYI, The header of the file looks like
-------------------------------------------------------
%!PS-Adobe-3.0
%%Title: Test Page
%%Creator: PScript5.dll Version 5.2.2
%%CreationDate: 7/27/2007 9:16:9
%%For: dpithadia
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
%%PageOrder: Special
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)
%%DocumentData: Clean7Bit
%%TargetDevice: (Acrobat Distiller) (3011.104) 0
%%LanguageLevel: 3
%%EndComments

%%BeginDefaults
%%PageBoundingBox: 0 0 612 792
%%ViewingOrientation: 1 0 0 1
%%EndDefaults


%%BeginProlog
--------------------------------------------------


0
DVS
7/27/2007 1:38:55 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

1 Replies
1045 Views

Similar Articles

[PageSpeed] 32

Saveas(pdf!) needs Ghostscript.

There are several posts related to this.

example:

To all those having problems with SaveAs PDF here are some
tips to make
things go more smoothly when you deploy your application.

(These tips assume you are not running the Ghostscript
installer on each
target PC but are trying to follow Sybase deployment
instructions):


1) Be sure to include the Ghostscript "\fonts" directory
with your deployed
application. In my case the \bin and \lib directories were
not enough and
\fonts was not a subfolder of gs7.05\;


2) Include the registry entries or path entries necessary
for GS to find its
own subcomponents. (For details about which registry entries
you need see
the uninstall.txt file in the root of your GS folder on your
dev machine);


3) If the Sybase Datawindow PS printer doesn't install
itself, follow the
instructions Bruce Armstrong posted (copied below). In my
case I have made
these steps part of my InstallShield program by default as I
didn't have
much success with the auto-magic install;


Thank you to Bruce, Evita and others who helped me work
through the
difficulties I had deploying.


Although I am still testing, I have had success with XP and
Win2000
following these processes. Win98 will be tested this
weekend.


Installing Acrobat Distiller manually:
=3d=3d=3d=3d=3d=3d
1.   Open up your Printers folder.
2.   Select Add Printer
3.   Hit Next in that dialog.
4.  Select "Local Printer" and hit Next.
5.  For "Use the following port", select "File:" and hit
Next.
6.  Hit "Have Disk"
7.  Browse to the \Sybase\Shared\PowerBuilder\drivers
directory and select
the ADIST5.INF file, then hit Open.
8.  Hit OK to close the Install from Disk dialog
9.  Select "Acrobat Distiller" and hit Next.
10.  It may prompt you to keep existing driver, your choice,
hit Next.
11.  For Printer Name, enter "Sybase DataWindow PS".  Or you
can enter
something else, and then add that printer name to the
DataWindow print
specs.  Hit Next.
12.  On printer sharing, hit Next.
13.  Decide whether or not you want a test page, and then
hit Next.
14.  Hit Finish.






> Guru(s),
>
> I have PowerBuilder 10.5 build 5048 and GhostScript 8.57.
> In simple words, I  am trying to print DW into a PDF using
> SaveAs ("file name", PDF!)
>
> The PDF file is generated, but I can not open with Acrobat
> or any other PDF  viewers.
> But I can open it fine with a PostScript Viwer like
> GSView. It looks like a  PS file more than a PDF file.
>
> What am I missing? Do I need to convert this PS into PDF
> by calling a  GhostScript script?
>
> Appreciate you help,
>     Div
>
> FYI, The header of the file looks like
> -------------------------------------------------------
> %!PS-Adobe-3.0
> %%Title: Test Page
> %%Creator: PScript5.dll Version 5.2.2
> %%CreationDate: 7/27/2007 9:16:9
> %%For: dpithadia
> %%BoundingBox: (atend)
> %%Pages: (atend)
> %%Orientation: Portrait
> %%PageOrder: Special
> %%DocumentNeededResources: (atend)
> %%DocumentSuppliedResources: (atend)
> %%DocumentData: Clean7Bit
> %%TargetDevice: (Acrobat Distiller) (3011.104) 0
> %%LanguageLevel: 3
> %%EndComments
>
> %=beginDefaults
> %%PageBoundingBox: 0 0 612 792
> %%ViewingOrientation: 1 0 0 1
> %%EndDefaults
>
>
> %=beginProlog
> --------------------------------------------------
>
>
0
dawnbrowneyes
7/30/2007 6:27:33 PM
Reply:

Similar Artilces:

In the pdf generated file ,on the email click the file is attached with extension .apsx instead of .pdf
I have used the following line of code to embed the pdf file into browser.Response.AddHeader("Content-Disposition", "inline; filename=" + reportName + Session.SessionID + ".pdf"); I am getting th epdf file generated into browser perfectly.But when i click the EMAIL option i found the file is attached with .aspx extension instead of .pdf.So do suggest some ideas or solution. Hi ,I also need to generated pdf file in browsers.I tried with your line of code (  Response.AddHeader("Content-Disposition", "inline; filename=" + reportName + Ses...

FF 3.0 Printing to PDF file with generating WPS Object for the PDF File and Growth of obsolete WPS handles
FF 3.0 Printing to PDF file with generating WPS Object for the PDF File and Growth of obsolete WPS handles Every time yout print to WPS and delete the WPS object after processing, you generate an obsolete WPS handle. Hint to Readme to schedule an WPS "Clean Operation" regulary ( e. g. by Checkini tool ) ? Kind Regards Rainer On 02.07.2008 13:20, Rainer Stroebel wrote: > Every time yout print to WPS and delete the WPS object after processing, > you generate an obsolete WPS handle. > > > Hint to Readme to schedule an WPS "Clea...

Changing the default All Files (*.*) option to Adobe PDF Files (*.pdf) in a file open dialogue in ASP.net
In My file Upload page, I am using <input type=file> tag to browse a file from client machine.The Browse button by default is showing all files *.* in the file dialogue boxI have a requirement like the file dialogue should by default show just PDFs *.pdf, and have an option to show all files *.* as shown below:Adobe PDF Files (*.pdf)All Files (*.*)Is there a way to handle this using any web controls, or technique using ASP.net or HTML?Thanks in advanceAnsar I need answer to this one, too. As far as I know, there is no way to do this....

run acrobat distiller, distill a .ps file, and open the generated .pdf file with the acrobat reader ALL BY CODINGS
Hi everyone, PB7/Wins2K Does anyone have the codes to distill a .ps file by opening up the acrobat distiller and open the generated .pdf file with the acrobat reader? Thanks in advance for sharing. Kenny Tran ...

run acrobat distiller, distill a .ps file, and open the generated .pdf file with the acrobat reader ALL BY CODINGS
Hi everyone, PB7/Wins2K Does anyone have the codes to distill a .ps file by opening up the acrobat distiller and open the generated .pdf file with the acrobat reader? Thanks in advance for sharing. Kenny Tran Depending on the properties of the distiller printer driver. If you print through the distiller printer driver, it generates postscript files, then PDF, then opens Acrobat. If you have .ps file and want to convert them into acrobat files, you can configure the program distiller to handle all files in a directory. You have them to check the "out" directo...

run acrobat distiller, distill a .ps file, and open the generated .pdf file with the acrobat reader ALL BY CODINGS
Hi everyone, PB7/Wins2K Does anyone have the codes to distill a .ps file by opening up the acrobat distiller and open the generated .pdf file with the acrobat reader? Thanks in advance for sharing. Kenny Tran To generate pdf files: Use the acrobat distiller print driver. Print a datawindow to a file. If you want to generate simple pdf, use the default port (PDF port) (see the properties of the acrobat distiller print driver) There is an option in the print driver to automatically open the PDF file when generated. Otherwise, used the pdf.ocx activeX (in C:\Program Files\A...

Combining PDF files into one very large pdf file
Does anyone have a utility/componennt that will combine various PDF files into one very large PDF file? The size of the final file may be larger then the current memory available for the computer. Thanks Ed Dressel On Thu, 2 Apr 2009 08:29:47 -0700, Ed Dressel <none@tbinc.com> wrote: >Does anyone have a utility/componennt that will combine various PDF files >into one very large PDF file? The size of the final file may be larger then >the current memory available for the computer. > >Thanks >Ed Dressel Ed, I would check out www.adultpdf.com Str...

PDF File I/O Error while trying to load pdf file
Name: Dale Product: Shiretoko Summary: PDF File I/O Error while trying to load pdf file Comments: I was loading this site's pdf file: http://www.mead-usa.com/reference/instructions/Air_Presses.pdf and I received a window saying that there was a File I/O Error, but the page was trying to load anyway. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 (.NET CLR 3.5.30729) From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one...

How do I do datawindow SaveAs a pdf file
Hi all, I want my datawindow to be SaveAs a PDF file, how do I do that? TIA Robert Which version of PB are you using? -- Paul Horan[TeamSybase] Cynergy Systems www.cynergysystems.com <Robert> wrote in message news:442320cd.294.1681692777@sybase.com... > Hi all, > > I want my datawindow to be SaveAs a PDF file, how do I do > that? > > TIA > > > Robert PB 8.0.4 build 10501 > Which version of PB are you using? > > -- > Paul Horan[TeamSybase] > Cynergy Systems > www.cynergysystems.com > > <...

Distilling DW to PDF produces corrupt PDF files
Hi, I'm using Powerbuilder 10.5 build 4523. I have a datawindow control to output a report, and a button control that allows the user to save the report in a format of their choice. The saveas function works fine for all formats except the PDF, which I cannot get to work for the life of me. I have installed Ghostscript and also tried using the Adobe Postscript printer driver to output PDFs, all with the same results. A PDF file is produced of size 0kbs, when I try to open it, it says; "Adobe reader could not open "report.pdf" because it is either not a supported ...

How do I do datawindow SaveAs a pdf file #2
Hi all I want my datawindow to be SaveAs a PDF file, how do I do that? I am using PB8.0.4 build 10501 TIA Pre PB9, you have to "print" the datawindow to a PDF generator that looks like a printer driver. Google these newsgroups for suggestions and methods. <Robert> wrote in message news:44468a6e.1fda.1681692777@sybase.com... > Hi all > I want my datawindow to be SaveAs a PDF file, how do I do > that? > I am using PB8.0.4 build 10501 > > TIA ...

Convert Gridview Data in to PDf file. or Convert report data in pdf file
 Hi have problem to convert Gridview data into PDF file..let me know is there any solution or open source components..Regards Rambhopal Reddy EPlease remember to click “Mark as Answer” on the post that helps you, and to click “Unmark asAnswer” if a marked post does not actually answer your question. Friend, Check this thread for soultions http://forums.asp.net/t/1164793.aspx and then to http://www.aspnetworld.com/articles/2004011801.aspx   Good luck!     Please Don't forget to click "Mark as Answer" on the post that helped you.This can be benef...

PDF files and DOC files
Name: Jeff Kopacz Email: Jeffkopacz_at_mchsi.com Product: Firefox Summary: PDF files and DOC files Comments: When using Firefox and have to view a pdf file or Doc file I have to have Adobe Reader or Word started before selecting the file or the computer will lockup. I am using XP and Firefox 1.0.7. If I use either IE or Netscape they will open properly. This has recently occured with either version 6 or 7 Browser Details: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 ...

ASPX file to PDF file
 I want to convert an Aspx file to a pdf file.Please give me C# code.I cant use any component for money.Free Components are OK.Now I am using ItextSharp.tnx Hope the question is relating to creating PDF as output http://www.codeproject.com/KB/aspnet/HTML2PDF.aspx Thanks and RegardsS.K.Vignesh----------------------Do remember to "Mark as answer" for this post or the post that helped you solve the issue You can export ASP.NET DataTables to PDF:http://www.codeproject.com/KB/graphics/giospdfnetlibrary.aspx Darrell Norton, MVPDarrell Norton's BlogPlease mark this post...