Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 5 Jahren, 9 Monaten
Letzter Beitrag:
vor 4 Jahren, 8 Monaten
Beteiligte Autoren:
FMUser, Tor-Bjarne, arronwall, Stefan Bentvelsen, GuenterP

[WD 16] Image Control will not display PDF from binary data

Startbeitrag von FMUser am 09.10.2012 18:13

I am trying to use an image control to render a binary field from our DB that is comprised both of JPEG and PDF. JPEGs render fine but PDFs show up blank.

My code looks like this:

IMG_MyImage = FileTable.BinaryFileData

I have tried other workarounds but nothing so far has worked and I don't particularly want to save it locally first.

Antworten:

Hi,

I`m not shure PDF is a valid image format. ¨

According to the doc supported img formats are:

Bitmap (*.BMP)
Graphics Interchange Format (*.gif)
Joint Picture Experts Group (*.jpg ; *.jpeg)
Kodak Photo CD (*.pcd)
PaintBrush (*.pcx)
Adobe Photoshop Format (*.psd)
TrueVision TARGA (*.tga)
Tagged Image File Format (*.tif ; *.tiff)
Note: the "tiled tiff" option of the tiff 6.0 standard is not supported. In this case, we advise you to save the image in tiff 5.0 standard.
Portable Network Graphics (*.png)
Windows MetaFiles (*.emf ; *.wmf)
Icons (*.ico ; *.icw)
Cursors (*.CUR) *.cur
Portable Document Format (*.pdf)
Scalable Vector Graphics (*.svg)



Cheers
Tor-Bjarne

von Tor-Bjarne - am 09.10.2012 18:29
Hi FMUser,

I've contacted PCS about this problem ones.
They sait, saving it locally first is the only possibility for PDF.

von Stefan Bentvelsen - am 10.10.2012 07:12
Hi,
the same problem appears, if you want to set button images with images from a database!
MyButton..image = MyFile.MyImage is still impossible - since v5.5 and probably for the next 100 years .. no one cares.
instead, you have to use two lines of code:
MyImageVariable = MyFile.MyImage
MyButton..image = MyImageVariable

For an image on a single button it's definitely not important.
But for two hundred buttons - listen to the harddisk!

However, it's possible to set an image control directly from a database field:
MyImage = MyFile.MyImage // ok for .jpg, .png, .gif etc. but not for .pdf. God knows why ..

Regards,
Guenter

von GuenterP - am 10.10.2012 08:29
Thanks guys. I guess I'll just save it locally. I was trying to avoid that but it seems like the only solution for now.

von FMUser - am 11.10.2012 14:44
HI,

In my example PDF was actually mentioned - I Feel a bit stupid, well the world goes further anyhow, sorry about that

Cheers
Tor-Bjarne

von Tor-Bjarne - am 11.10.2012 16:24
Hi, FMuser.
Have you found your way out? I am learning about how to create document viewer, such as
PDF viewers, with the help of some manual tools which can be customized by users according to our own favors to help view and display PDF files these days. You can also google it and select one whose way of processing is simple and fast to help you with the related work. Remember to check its free trial package first if possible. I hope you success. Good luck.



Best regards,
Arron


von arronwall - am 18.11.2013 04:12
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.