如何将 PDF 文件发送到 Progress 应用服务器?

发布于 2024-08-02 02:17:44 字数 77 浏览 8 评论 0原文

我在客户端有一个 PDF 文件,我想在 AppServer 上发送该 PDF 文件。 我怎样才能在AppServer上发送这个pdf文件?

I have a PDF file at client and i want to send this PDF file on AppServer. How can i send this pdf file at AppServer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

云朵有点甜 2024-08-09 02:17:44
define temp-table ttFileList no-undo
    field file-id as integer
    field file-content as blob.

create ttFileList.
assign ttFileList.file-id = 1.

copy-lob from file("pdffilename") to ttFileList.file-content.

run DoSomethingWithAPDF on hAppServer
    ( input table ttFileList ).
define temp-table ttFileList no-undo
    field file-id as integer
    field file-content as blob.

create ttFileList.
assign ttFileList.file-id = 1.

copy-lob from file("pdffilename") to ttFileList.file-content.

run DoSomethingWithAPDF on hAppServer
    ( input table ttFileList ).
好久不见√ 2024-08-09 02:17:44

这取决于您使用的进度版本,如果您使用的是 v9,那么您将需要使用分段流式传输的小块原始数据。 使用 OpenEdge(可能是 10.1B),我们获得了 CLOB 和 BLOB 支持,您可以创建一个将临时表作为参数的过程。

它还取决于您的呼叫语言。 对于 .NET 和 Java,这将被转换为字节数组。

为您的应用程序服务器创建一个类似于以下内容的过程:

def temp-table ObjectTransfer no-undo
    field Code          as char
    field Number        as int
    field DataContent   as blob
    field MimeType      as char.

procedure AddObjectData:
    def input param table for ObjectTransfer.

    def var k as int no-undo.

    for each ObjectTransfer:
        find last ObjectTable no-lock
            where ObjectTable.Code = ObjectTransfer.Code
            no-error.
        if avail ObjectTable then
            k = ObjectTable.Number + 1.
        else
            k = 1.

        create ObjectTable.
        assign
            ObjectTable.Code = ObjectTransfer.Code
            ObjectTable.Number = k
            ObjectTable.MimeType = ObjectTransfer.MimeType
            ObjectTable.DataContent = ObjectTransfer.DataContent
            .
    end.
end procedure.

生成代理,您现在将使用简单的字节数组作为输入临时表数据类型从 .NET 和 Java 调用此过程。

This depends on the version of progress you are using, if you are using v9 then you will need to use small chunks of raw data streamed in segments. With OpenEdge (might have been 10.1B) we got CLOB and BLOB support, you can create a procedure which takes a temp-table as an argument.

It also depends on your calling language. For .NET and Java this will get translated into a byte array.

For your app-server create a procedure similar to the following:

def temp-table ObjectTransfer no-undo
    field Code          as char
    field Number        as int
    field DataContent   as blob
    field MimeType      as char.

procedure AddObjectData:
    def input param table for ObjectTransfer.

    def var k as int no-undo.

    for each ObjectTransfer:
        find last ObjectTable no-lock
            where ObjectTable.Code = ObjectTransfer.Code
            no-error.
        if avail ObjectTable then
            k = ObjectTable.Number + 1.
        else
            k = 1.

        create ObjectTable.
        assign
            ObjectTable.Code = ObjectTransfer.Code
            ObjectTable.Number = k
            ObjectTable.MimeType = ObjectTransfer.MimeType
            ObjectTable.DataContent = ObjectTransfer.DataContent
            .
    end.
end procedure.

Generate proxies, you will now call this from .NET and Java using a simple byte array as an input temp-table data-type.

左耳近心 2024-08-09 02:17:44

使用原始数据类型,您可能需要以块的形式发送文件。 另一种选择是使用字符+BASE64。

Use raw datatype, you might need to send the file in chunks. Another alternative is to use character+BASE64.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文