on 05-20-2015 2:13 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
i didnt managed to receive your email on the URL. Could you re-send again?
thanks you so much.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's awesome. I would love a copy. Can you email it to me? steve.woitkowski@firstinvestors.com
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steve.
Take a look at this solution. It works for me:
http://scn.sap.com/thread/3535221
Regards,
Luiz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.