cancel
Showing results for 
Search instead for 
Did you mean: 

web service and SaveAs PDF

Former Member
0 Kudos

Hello again all,

I've hit another snag with my .net web service. I'm trying to "SaveAs" a datastore as a PDF! and it's failing. I am able to successfully SaveAs Text! and XLSX! without issue, so that leads me to believe that the issue is with the webservice's rights to use ghostscript.

I'm trying this on localhost, and I have a regular PB test app that runs the same code successfully. I have ghostscript 8.70 installed, the Sybase DW printer and I'm using Win7 64 bit.

I tried giving the IIS_IUSRS and the pbdotnet4apppool user full control of the gs8.70 folder. I also tried copying the gsdll32.dll file to my system32 and the webservice's bin folder. None of these helped.

Any ideas?

TIA,

Steve

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Steve (et al);

  Sorry for the delay in posting this code but I wanted to make sure that the initial code release (even though its a prototype) was a lot more robust. I also wanted to document the Installation & Configuration (for those new to WS's especially), give some architecture background information, and test it on more than one PC (now W7, W8 and W2008R2).

  I  have also now tested the solution with various versions of PB (12.1, 12.5.1, 12.6), Appeon Web and Appeon Mobile. All environments seem to work great using this Web Service solution to generate PDFs via Ghost Script in the middle tier.

I have now sent everyone an email with the download location.   

Thank you for your patience!


Regards ... Chris

Former Member
0 Kudos

Thanks so much Chris. You're the best. I will download it soon and give it a shot.

Steve

Former Member
0 Kudos

Hi Chris,

i didnt managed to receive your email on the URL. Could you re-send again?

ang_chee_boon@hotmail.com

thanks you so much.

Former Member
0 Kudos

Hi Chee Boon;

  I resent another email to the above address again. Let me know if you get it this time.

Regards ... Chris

Former Member
0 Kudos

Hi Steve;

   OK .. I had some time today so I built a Web Service using my framework that successfully creates a PDF file from a DWO/DS using PB Classic 12.1.

1)  The WS uses the MS-Windows "PowerShell" feature in my framework to create the PDF file.

2) The WS runs another PB Application EXE that builds the actual PDF. It also passes the location to the PB built EXE as to where to put the result.

3) The PDF gets built correctly and deposited in the WS' work area.

4) If you get the WS' to have the PDF generated into a "Report" work area, all you need to do then is use the INET object in PB to grab the PDF into the browser.

  This is still a rough prototype - but, looks like you could expand it from here. Let me know if you are interested in a copy of my early solution. I will now expand this into a full / robust web service and publish as an extension to my framework for the entire PB Community to use (in the near future). 

Regards ... Chris

Former Member
0 Kudos

That's awesome. I would love a copy. Can you email it to me? steve.woitkowski@firstinvestors.com

Former Member
0 Kudos

Hi Steve;

  Will do later this AM. I am just cleaning up the code a little and will also write a little documentation on how to deploy & use it.  

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

Can I have a copy too?

cgm.tah@gmail.com

Thank you,

Ta

Former Member
0 Kudos

Nice, nice, nice.

me too please.

Gimmy

Former Member
0 Kudos

Hi Ta;

  You sure can!  

I just finished cleaning up the prototype code. I will let you guys know shortly where to download it! 

Regards ... Chris

Former Member
0 Kudos

Hi Gimmy;

    I just checked with Santa Claus here at the North Pole in Canada (we also house the Magnetic north pole as well BTW) and he says that you have been very good this year. So .. OK - you can have a copy too ... Ho Ho Ho <LOL>!  

Regards ... Chris

Former Member
0 Kudos

hello Chris .

you're not Santa Claus ,. but an angel .

= )

gimmy.susan@gmail.com

Former Member
0 Kudos

Hi Chris,

would like to request for a copy as well.

ang_chee_boon@hotmail.com

Rgds

Former Member
0 Kudos

Hi Chris,

Could you send me the link also? kcskin@verizon.net

Thanks in advance

Former Member
0 Kudos

Done!  

Former Member
0 Kudos

Hi Steve,

If you use PB.Net instead of PB Classic you won't have to fool with ghostscript.

I would caution against using a web service for PDF creation if you have a lot of traffic. Make sure you set STAOperationBehavior.

hth,

Mark

Former Member
0 Kudos

Thanks for the advise Mark. I'll look up what STAOperationBehavior is.

Former Member
0 Kudos

Hi Mark.

i'm looking for informationa about 'STAOperationBehavior', but i do not find anythin that i understand.

what is 'STAOperationBehavior' ?

what i have to do ?

ty for answer.

G.

Former Member
0 Kudos

Click on this button...

Then check this box...

Former Member
0 Kudos

it's dot net.

i'm in classic

=(

Former Member
0 Kudos

Sorry Gimmy I didn't realize you were using Classic.

Good Luck!

Former Member
0 Kudos

Hi Steve.

Take a look at this solution. It works for me:

http://scn.sap.com/thread/3535221

Regards,

Luiz

Former Member
0 Kudos

Thank you Luiz. I'll give it a shot.

Is that a picture of you or an old pic of Angus Young from AC/DC?

former_member329524
Active Participant
0 Kudos

Hello, Steve

It is, most likely, permissions issue.

If this is a .NET web service, you might be better off using native .NET API of some PDF printer software. Sybase DW printer is really not the most reliable option even at the best of circumstances.