FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How do you think, if I save PDF file to Blob field in MySql?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How do you think, if I save PDF file to Blob field in MySql?
Posted: Tue Aug 22, 2017 09:10 AM

Dear All,

I have step to save receipt in PDF file format. If I save to Mediumblob field in MySql.
1. Is it stable to extract and re-use PDF file?
2. Does it make load time longer, when we fetch data of this table?

Thanks for any idea and suggestion.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: How do you think, if I save PDF file to Blob field in MySql?
Posted: Tue Aug 22, 2017 09:51 AM
dutch wrote:Dear All,

I have step to save receipt in PDF file format. If I save to Mediumblob field in MySql.
1. Is it stable to extract and re-use PDF file?
2. Does it make load time longer, when we fetch data of this table?

Thanks for any idea and suggestion.


If you have doubts, use to save another table related to the same key field as the main table
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: How do you think, if I save PDF file to Blob field in MySql?
Posted: Tue Aug 22, 2017 02:17 PM

Dutch:

Cristobal's advice is a great option, my experience

1.- Is it stable ?, Yes, of course it is very stable.
2.- Yes, it takes more time to load the records

an other options are

Tinyblob
Blob
MeniumBlob
LongBlob

Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How do you think, if I save PDF file to Blob field in MySql?
Posted: Wed Aug 23, 2017 12:33 AM

Thanks Narvarro and Armando,

I have another question, how to preview PDF in Mediumblob field in MySql?
Does the XIMAGE support PDF preview?

I read many post in forum, but it is no success case to preview PDF object?

Thanks in advance for any idea or suggestion.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: How do you think, if I save PDF file to Blob field in MySql?
Posted: Wed Aug 23, 2017 01:11 AM
Dutch, some options:

1) For only preview first page of pdf document

viewtopic.php?f=6&t=32550&p=191290&hilit=Reader+Acrobat#p191378

2) With an external application

viewtopic.php?f=6&t=32550&p=191295&hilit=sumatra#p191296

3) With ActiveX ( search "AcroPDF.PDF.1" )

Code (fw): Select all Collapse
REDEFINE ACTIVEX oActiveX ID 800 OF oDlg PROGID "AcroPDF.PDF.1"

// Or DEFINE ACTIVEX ...


viewtopic.php?f=6&t=28148&hilit=Reader+Acrobat#p157419

3) Other solution ( please read all topic )

viewtopic.php?f=6&t=33439#p197146
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How do you think, if I save PDF file to Blob field in MySql?
Posted: Wed Aug 23, 2017 02:21 AM
Dear Navarro,
Thank you so much for your suggestion.
RICHTEDIT5 and ACTIVEX is working well for a PDF FILE. How to preview PDF data from a field (blob, MySql)?

Thanks in advance.
cnavarro wrote:Dutch, some options:

1) For only preview first page of pdf document

viewtopic.php?f=6&t=32550&p=191290&hilit=Reader+Acrobat#p191378

2) With an external application

viewtopic.php?f=6&t=32550&p=191295&hilit=sumatra#p191296

3) With ActiveX ( search "AcroPDF.PDF.1" )

Code (fw): Select all Collapse
REDEFINE ACTIVEX oActiveX ID 800 OF oDlg PROGID "AcroPDF.PDF.1"

// Or DEFINE ACTIVEX ...


viewtopic.php?f=6&t=28148&hilit=Reader+Acrobat#p157419

3) Other solution ( please read all topic )

viewtopic.php?f=6&t=33439#p197146
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion