sam15
asked on
gen_PDF
We have an old PB application that generates a PDF document. We are not sure how. Does Powebuilder have a built-in PDF generator or POSTSCRIPT genrator. Someone mentioned it might use a ghostscript software to convert and generate the PDF.
2. is there a way to confirm how the application is generating the PDF by looking at the code associated with the button "CREATE PDF".
3. If application is using ghostscipt is this one exe that we need to ahve installed on the PC?
2. is there a way to confirm how the application is generating the PDF by looking at the code associated with the button "CREATE PDF".
3. If application is using ghostscipt is this one exe that we need to ahve installed on the PC?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know how old of version you are using in PB but I personally use the SAVEAS method.
Concept:
arg_dw.SAVEAS(arg_path, PDF!, arg_header)
Example:
dw_1.SaveAs("C:\myfilename .pdf", PDF!, True)
Concept:
arg_dw.SAVEAS(arg_path, PDF!, arg_header)
Example:
dw_1.SaveAs("C:\myfilename
ASKER
What is XSl-FO? is that a java or apache application used to generate PDF files from PB applications?
We use PB 10.5? Can PB save a datawindow directly into PDF format.
This is an old code. Is it badly written code or i am just confused by it.
We use PB 10.5? Can PB save a datawindow directly into PDF format.
This is an old code. Is it badly written code or i am just confused by it.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
anothe thing i forgot to mention
I looked in the application directory that i have and there was no subdirectory with FOP-xx.xxx there.
However i found all the file you refer to under
c:/program files/sybase/shared/powerb uilder/fop -0.20.4/bu ild
/col
/lib
Why would someone use FOp whrn it is simple in PB to create a PDF file using the saveas command.
Was this PDF generation using save as a new feature?
I looked in the application directory that i have and there was no subdirectory with FOP-xx.xxx there.
However i found all the file you refer to under
c:/program files/sybase/shared/powerb
/col
/lib
Why would someone use FOp whrn it is simple in PB to create a PDF file using the saveas command.
Was this PDF generation using save as a new feature?
I believe the difference is one (saveas) is better for windows and the other for Java.
ASKER
I am little confused by this code. It seems to use XSLFOP and saev_as based on these lines?
// Create and place the PDFs
dw_detail_invoice_csdt.Obj ect.DataWi ndow.Expor t.PDF.Meth od = XSLFOP!
rtn = dw_detail_invoice_csdt.Sav eAs(ls_pdf _filename, PDF!, FALSE)
// rtn = dw_detail_invoice_csdt.Sav eAs(ls_pdf _filename, PDF!, FALSE)
// Create and place the PDFs
dw_detail_invoice_csdt.Obj
rtn = dw_detail_invoice_csdt.Sav
// rtn = dw_detail_invoice_csdt.Sav
ASKER
I found there are two windows for this PDF. I think the production one is only using SAVEAS.
Does this mean PB is creating the PDF and there is no need for any libraries?
Can this be using Ghostscript to open the PDF created. I understand there were issues with adobe for some reason.
Does this mean PB is creating the PDF and there is no need for any libraries?
Can this be using Ghostscript to open the PDF created. I understand there were issues with adobe for some reason.
Refer to this link will give you better idea
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.pb_10.5.dwref/html/dwref/CHDDAFHF.htm
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.pb_10.5.dwref/html/dwref/CHDDAFHF.htm
ASKER
so you use XSLFOP to export the data window to PDF and then SaveAs to save it to the PDF file. is this correct?
Is this the standard way of doing it in PB.
The other thing is that they need to open the PDF file using some reader. Will Adobe or Ghost script used for that.
Is this the standard way of doing it in PB.
The other thing is that they need to open the PDF file using some reader. Will Adobe or Ghost script used for that.
It is a standard but not sure I would say it is the standard. I don't use XSLFOP but it is platform independant so it is more robust. All of my apps are on the windows platform but if I needed to support multiple platforms I would probably choose this method.
I am able to open all of my PDF files using adobe reader which is free.
I am able to open all of my PDF files using adobe reader which is free.
ASKER
so ur saying on a windows platform you can have the PB application do this
dw_1.SaveAs("C:\myfilename .pdf", PDF!, True)
which would generate a PDF file on the local drive - no executables needed
and then user will open it just like any PDF formatted file which is adobe reader.
dw_1.SaveAs("C:\myfilename
which would generate a PDF file on the local drive - no executables needed
and then user will open it just like any PDF formatted file which is adobe reader.
Yes
To open pdf file you can embed Microsoft OLE web browser control on your window and use below code to display the file..
ole_name.navigateurl('c:\t emp\file1. pdf')
Regards,
Sandeep
ole_name.navigateurl('c:\t
Regards,
Sandeep
ASKER
We would like to use standard adobe. would microsoft open it in web browser.
Do you think application dependency on Ghostscript now is that it is creating a Postscript file and then converting that to PDF.
Do you think application dependency on Ghostscript now is that it is creating a Postscript file and then converting that to PDF.
ASKER
loradin
if you check this, you will see that PB needs to export the file to postscript before it generates th PDF file. Are you using any tool for interpreting the postscript file
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.pb_10.5.dwref/html/dwref/CHDDAFHF.htm
if you check this, you will see that PB needs to export the file to postscript before it generates th PDF file. Are you using any tool for interpreting the postscript file
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.pb_10.5.dwref/html/dwref/CHDDAFHF.htm
You can use Web browser control to launch any web page in your PB window. It will launch internet explorer within it. YOu just need to give path of that file instead of any URL and it will display the pdf within that control. you just need to
Insert > OLE > insert control tab > select Microsoft web browser and write above code to display pdf within it.
Insert > OLE > insert control tab > select Microsoft web browser and write above code to display pdf within it.
We did implement ghostscript in the past. I didn't think it was still required but it still be using it. We have upgarded PB a few times since implementing it.
ASKER
I think if you remove gohstscript from your machines it may stop working.
but this is the issue. we don;t want to use ghost script.
If i udnerstand this correctly we can wither use:
1) XSL-FO but that requires to install the java libraries
2) microsoft ole web browser control
is this correct? but still i do not udnerstand why Adobe wont work instead of the above options.
but this is the issue. we don;t want to use ghost script.
If i udnerstand this correctly we can wither use:
1) XSL-FO but that requires to install the java libraries
2) microsoft ole web browser control
is this correct? but still i do not udnerstand why Adobe wont work instead of the above options.
ASKER
if i understand this correctly, PB has two options or creating and printing a PDF: XSL-FO or creating a postscript and distilling to PDF. IT seems the distill thing where it needs the ghostscript. do you agree?
Export.PDF.Method
Description
Setting that determines whether data is exported to PDF from a DataWindow object by printing to a PostScript file and distilling to PDF, or by saving in XSL Formatting Objects (XSL-FO) format and processing to PDF.
Applies to
Export.PDF.Method
Description
Setting that determines whether data is exported to PDF from a DataWindow object by printing to a PostScript file and distilling to PDF, or by saving in XSL Formatting Objects (XSL-FO) format and processing to PDF.
Applies to
ASKER
It seems you are either stuck with Ghstscript or XSL-FO files for PDF generation.
Deployment requirements
If your application uses the distill method, you must distribute the GNU Ghostscript files and default PostScript printer driver and related files (if using the default printer) with your application. If your application uses the XSL-FO method, you must distribute Apache FOP files and the Java Runtime Environment (JRE) with your application. For more information, see the chapter on deploying your application in Application Techniques.
Deployment requirements
If your application uses the distill method, you must distribute the GNU Ghostscript files and default PostScript printer driver and related files (if using the default printer) with your application. If your application uses the XSL-FO method, you must distribute Apache FOP files and the Java Runtime Environment (JRE) with your application. For more information, see the chapter on deploying your application in Application Techniques.
ASKER
invoice.txt