PxPlus User Forum

Twitter Twitter Twitter

Recent Posts

Pages: 1 ... 5 6 [7] 8 9 10
61
Web Services / Re: Publishing a PDF through PXPlus web engine
« Last post by Mike King on March 07, 2024, 09:58:08 PM »
Here is a simple web program that will return a PDF file:

Code: [Select]
0010 OPEN (HFN)"*pdf*;file=output.pdf"
0020 FOR i=1 TO 20
0030 PRINT (LFO)"This is line ",i
0040 NEXT i
0050 CLOSE (LFO)
0060 OPEN (HFN,ISZ=-1)"output.pdf"
0070 READ RECORD (LFO,SIZ=1000000)contents$
0080 CLOSE (LFO)
0090 WRITE RECORD (%print_fn)contents$
0100 LET %Content_type$="Application/pdf"
0120 END

It creates a PDF file on "output.pdf" with lines 1 thru 20, sets the content type, and returns the PDF file contents.

You should be able to save this on your PxPlus Web server in the document root directory as something like pdf.pxp then call up the URL.  It will display the PDF.

Obviously in production you would dynamically create the PDF output file name and delete it when done.
62
Web Services / Re: Publishing a PDF through PXPlus web engine
« Last post by pwhirley on March 07, 2024, 06:21:11 PM »
Well, Mike.  I'm sure I'm doing something wrong.  I've tried using an HTML format with <head> and <body> putting the content-type: application/pdf and content-size in the <head> and the binary in the <body>.  I've also tried an HTTP POST format, which I've never used to send *to* a web browser.  Neither one worked. 

I've also tried using <embed>, <object> and <img> with encoding/decoding the pdf data.

What format should I be using?  I'm testing with just the web engine directly.  Eventually I'll probably be using IIS or Apache, but those aren't set up to use, yet.  I've never used the web engine except with iNOMADS, Webster+ and the old Sage 100 eBusiness stuff.

- Phil
63
Web Services / Re: Publishing a PDF through PXPlus web engine
« Last post by Mike King on March 06, 2024, 04:18:29 PM »
Let me know if you have any issue with setting the content type.  It should work.

As for me, while we have left PVX Plus Technologies, I am enjoying semi-retirement.  Doing some ad-hoc consulting in order to keep active and busy.

Anyway, if you need help feel free to contact me and we will see what we can do.
64
Web Services / Re: Publishing a PDF through PXPlus web engine
« Last post by pwhirley on March 06, 2024, 04:07:29 PM »
Thanks Mike,
I think that the application/pdf might well work.  I'm not sure why I didn't think of that.  It should work fine with the IIS front end, I believe.

I appreciate the quick response.  I hope you're enjoying retirement as much as I am.  :-)

Phil

Philip Whirley
phil@whirley.org
65
Web Services / Re: Publishing a PDF through PXPlus web engine
« Last post by Mike King on March 06, 2024, 03:18:05 PM »
Another thought, if the web server is Apache you might be able to use ProxyPass (and possibly ProxyPassReverse) to have the web simply re-route the specific request to your backend PVX Plus web server. 

This could be used to forward to whole request and return the result or to forward a request for the resultant PDF file and simply leave the PDF files on the PxPlus server.

There is something similar available for IIS if needed.
66
Web Services / Re: Publishing a PDF through PXPlus web engine
« Last post by Mike King on March 06, 2024, 02:56:22 PM »
How is the website forwarding the request to the PxPlus web server?  If its by a standard web request you likely could have the PxPlus web server application respond with the contents of the web file and set the content type to "application/pdf".  Basically open/read the resultant PDF file as a binary file and write it to %PRINT_FN.

Assuming the webs site forwards the response that it receives along with its headers the PDF should get displayed.
67
Web Services / Publishing a PDF through PXPlus web engine
« Last post by pwhirley on March 06, 2024, 02:30:45 PM »
I need to create a label of a specific size, format, font, etc and present it to be printed on the website.  The PVXPlus web engine will be running on one server and the website is on another server.  The website host will not have access to the folders for the application. The only access is through the web engine.

I'm using the *PDF* special file to create the PDF, but I do not know how to get the web server to publish that back to the website.  I'm sure it's simple.

Thanks - Phil
68
ODBC / Re: What is the _S on table definition fields
« Last post by Len Vassos on March 04, 2024, 11:55:54 AM »
We do not provide support for mas.   You will need to contact Sage for any support with Mas90 or Sage 100.
69
Nomads / Re: CHART Legends font/size
« Last post by Jane Raymond on March 04, 2024, 09:37:12 AM »
Jean,
I'll start by recommending you don't use the Native charts, as you can see in your example, you can't see all the values in 3D. You can control the values in the dataset legend on the left using the Minimum and Maximum settings, but don't really have any control over the font sizes of the legends in the Native chart.


I recommend using the Plus chart. Here is an example of a 3D Column chart using an Arial font, Regular size.
70
Nomads / Re: Tool to update providex.ddf file to new version
« Last post by Jane Raymond on March 04, 2024, 09:13:25 AM »
This will depend on what you plan to do. If the dictionary files are updated to the current version, but you don't change any definitions, then there is no issue using them with previous versions.
If you do change some definitions, it will depend on the fields that you change. For example, the ddf file has added a FLAGS$ field to the end of the iolist, and the dde file has added an ORIGINATOR$ and ELEMENTTIP$ field to the end of the iolist. If you update a file definition in the current version using these fields, then modify the file again in the old version, you may lose the values in these fields.
Pages: 1 ... 5 6 [7] 8 9 10