Sorry for the delay to acknowledge your kind response to my question, but 
due to an accident on the main road we were with intermittent internet 
service.
I have an application on which I do effectively manage close to 200.000 PDF 
documents (Which they reside on a document server on various directories 
and sub-directories) and it’s working properly and ever since 2019.
However there is this new app, which will have less than 400 docs in pdf 
and the desire was to avoid the need of having the pdf OUTSIDE the DB, I 
have done that with all other file format, but never with PDF (hence my 
question)

With this scrip, I think it will work and I’m grateful for your great help 
and sharing. 
Once again Thank You
Dr. Robert Rugilo

On Thursday, November 27, 2025 at 9:54:59 AM UTC-3 Dewan Monjoruzzaman 
wrote:

> Dear Mr. Dr. Robert Rugilo,
>
> Greetings.
>
> We frequently use R:Base to store PDF files in our software. I shared my 
> script. I will be pleased if it helps you.
>
> ----Start
> CLEAR VAR vfile1,vfile2,vcap,iv%
>
> SET VAR vfile1 TEXT = NULL,vcap TEXT ='Loading PDF'
>
> CLS
>
> PLUGINS loadfilename.rbl vfile1 +
> |FULLPATH on |TITLE 'Select file to upload PI Copy' +
> |FILTER image files .BMP,.JPG |FILTER all files *.* +
> |MULTISELECT off |SHOW_HIDDEN off +
> |NO_LONG_NAMES off |OLD_STYLE off +
> |NO_NETWORK_BUTTON off |HIDE_READ_ONLY on +
> |NO_CHANGE_DIR on
>
> IF vfile1 IS NULL OR vfile1 ='[Esc]' THEN
>   RETURN
> ENDIF
>
> SET VAR vstoring_dt TEXT =((FORMAT(.#DATE,'mmm-yy')))
>
> SET VAR vdirectory TEXT=('D:\PI\'+.vstoring_dt)
>
> SET VAR vdir_check INTEGER =(CHKFILE(.vdirectory))
>
> IF vdir_check = 0 THEN
>   SET ERROR MESSAGE 2269 OFF
>   MKDIR .vdirectory
>   SET ERROR MESSAGE 2269 ON
> ENDIF
>
> ---Create an URL where the file will be saved. Here 'vpiuid' is my PI 
> identificatin no.
> SET VAR vfile2 =(.vdirectory+'\'+(CTXT(.vpiuid))+'.pdf');
>
> SET ERROR MESSAGE 2077 OFF
> --If already exist
> ERASE .vfile2
> --Copy the file to the directory
> COPY .vfile1 .vfile2
> SET ERROR MESSAGE 2077 ON
>
> --Update the file url in a column of a table. Also record the user who 
> stores the file and the storing date.
> UPDATE pi_upload SET pi_pdf =.vfile2,upl_by =.vuid,upl_dt =.#now WHERE 
> piuid =.vpiuid
>
> RECALC
>
> --To retrieve the file in a PDF viewer
> IF vpi_pdf IS NOT NULL THEN
>   PROPERTY pi_pdf FILENAME .vpi_pdf
> ELSE
>   SET VAR vblank_file TEXT = 'D:\utah\pi\blank.pdf'
>
>   PROPERTY pi_pdf FILENAME .vblank_file
> ENDIF
> RETURN
> ----End
>
> To retrieve the file in a PDF viewer placed in a form. Please add the code 
> in the EEPs. 
>
> ---Start
>
> IF vpi_pdf IS NULL THEN
>   PAUSE FOR 2 USING 'PI not yet Uploaded' CAPTION 'Warning!' ICON stop
> ELSE
>   LAUNCH .vpi_pdf |||MAXIMIZED
> ENDIF
>
> RETURN
>
> ---End
>
> [image: image.png]
>
>
>  Best regards,
>
>  
>
> Dewan Monjoruzzaman
>
> Manager Software | Utah Group 
>
> M: +8801916864347 <+880%201916-864347>
>
> W: http://www.utahgroup.com
>
>
> On Thu, Nov 27, 2025 at 3:28 AM [email protected] <[email protected]> 
> wrote:
>
>> Hello everyone, I have used R:base to store all kinds of images 
>> (BMP,PNG,JPG,ICO, etc)
>> without a problem, but it seem that I missed out the class on how to 
>> store and retrieve a PDF file.
>> Is there anyone who has done that (I imagine the answer is yes)  and care 
>> to tell me what I'm doing wrong?
>> Thank you in advance for the help you can give me.
>> Dr. Robert Rugilo
>>
>> -- 
>> For group guidelines, visit 
>> http://www.rbase.com/support/usersgroup_guidelines.php
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "RBASE-L" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/rbase-l/cc100161-466b-494f-9f37-bbfce51c8a10n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/rbase-l/cc100161-466b-494f-9f37-bbfce51c8a10n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/rbase-l/aa8c8cfe-6c69-4ed3-bdcc-47f082d25f0fn%40googlegroups.com.

Reply via email to