Exporting PDF from DB

Post Reply
Posts: 4
Joined: Wed Sep 21, 2005 8:25 am

Exporting PDF from DB

Post by greenwoo »

I'm uploading pdf files into my data base.

<FORM ACTION="FKC_ADMIN_QUERIES" NAME="searchform" METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE=FILE Name=ATTACHMENT size=30 class="formcreate">

In the db queries script I set a temp dump folder and passe the files there renaming them

<rand 100000 999999>
<sum "%s" "e:\data\dump\ALEX\" $USER $TYPE $ret "." pdf >
<$OUT = $ret>
<fmt "%s" $ATTACHMENT>

I then insert it into the data base. I can view the raw data in the table.

My question is how do I call it back into a browser in a pdf format.

I've tryed this but doesn't seem to work

I do an sql query. It ouputs the data!


Call a link called fulledit.pdf that is function below

<A HREF="./fulledit.pdf">$TITLE</A>

Create the function

<a name=fulledit PUBLIC>
<SQL MAX=1 ROW "select id, ACTIVITY, ATTACHMENT from FKCDATA where id = $id">
<fmt "%s" $ATTACHMENT>

This is the error message I'm getting

was unable to process the requested URL: ... lledit.pdf

Please ask the site administrator of <B></B> to check
vortex.log for problems.

<!-- 2 /tscript/fkc/tests:0: Can't open source file: Permission denied in the function: () -->
Status: 500 Script not found or Vortex error

Many Thanks

User avatar
Site Admin
Posts: 1267
Joined: Tue Apr 25, 2000 1:27 pm

Exporting PDF from DB

Post by Kai »

texis.exe runs as the CGI user when run from the web; for IIS that is usually IUSR or some variant. Make sure that user (or Everyone) has full control to the directory where your script(s) are, so that texis.exe can read the source, and write the .vtx file.
Post Reply