Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

Saveas PDF not working in Web application using assembly created by PB.NET 12.6

$
0
0

Hi,

 

I’m using PB12.6. I have a web application that need to print the report created by PB. I create a simple assembly in PB.Net to test it. This assembly has a simple function using datastore to save the dataobject as PDF. Some code as below:

 

datastore n_ds

n_ds = createdatastore

n_ds.dataobject = 'd_test'

n_ds.SetTransObject(sqlca)

n_ds.retrieve()

n_ds.Modify("DataWindow.Export.PDF.Method = Distill!")

n_ds.Modify("DataWindow.Export.PDF.Distill.CustomPostScript=1")

n_ds.Modify("DataWindow.Printer='Generic PostScript Printer'")

return n_ds.saveas('C:\test.pdf', PDF!, false)

 

I also installed GhostScript 9.05 and a PDF printer called ‘Generic PostScript Printer’. This function is OK in PB with a PDF file is created. But in the web application, this function always return -1 and no file is created. I try to reference to some library of PB but I have the same result.

Can anyone help me?

 

Richard


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>