Focal Point
[CLOSED] URL Images not displaying in PDF reports

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/632104145

October 06, 2010, 10:18 AM
selva ganapathy
[CLOSED] URL Images not displaying in PDF reports
I am using the following code

SET PAGE-NUM=OFF
DEFINE FILE CAR
IMAGE/A300= "'';
END

TABLE FILE CAR
PRINT
COUNTRY
IMAGE
ON TABLE PCHOLD FORMAT PDF
END

URL IMAGE link in define field will be like this:
http://upload.wikimedia.org/wi...on_builders_logo.gif

When i use output format as "HTML" i am able to see the images in html output. But if i change the output format to PDF, URL values are displayed in pdf outputs instead of images.

Note: Image url value are a separate define field. So i need to print it as like a column.


Please help me how to get the image in PDF output.

Thanks in advance

This message has been edited. Last edited by: Kerry,
October 06, 2010, 12:43 PM
Francis Mariani
Read the documentation:

Creating Reports With WebFOCUS Language > Laying Out the Report Page > Adding an Image to a Report > Add an Image to a PDF, PS, or HTML Report With Internal Cascading Style Sheet


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 06, 2010, 01:13 PM
selva ganapathy
Francis,

As of my understanding,In the link you provided has the 2 methods:
1) how to embed image from URL into HEADING/FOOTING of report.
TYPE={REPORT|heading}, IMAGE={url|file|(column)} [,BY=byfield]
[,POSITION=([+|-]x [+|-]y )] [,SIZE=(w h)] [,PRESERVERATIO={ON|OFF}],$

2) how to embed BLOB image field into report.
TYPE=DATA, COLUMN=imagefield, IMAGE=(imagefield), SIZE=(w h),
[PRESERVERATIO={ON|OFF},] $

My scenario is: I get URL value from one real field.
I need to display the images using the URL values in PDF.

Original Table data
-------------------
Sno Image-URL
--------------
1 urlvalue1
2 urlvalue2
3 urlvalue3


In PDF output it should be like
-------------------------------
Sno Images
--------------
1 Image1
2 Image2
3 Image3

Image1,2 and 3 are images in pdf.

If there is any other option, can you please suggest me .....


Selva

This message has been edited. Last edited by: selva ganapathy,
October 06, 2010, 04:12 PM
Waz
Images in PDF must be available as a file to the WebFOCUS server.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 06, 2010, 04:27 PM
Francis Mariani
Here's a possible solution, found by doing a Search in FocalPoint:

Image in row of a PDF report


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
October 06, 2010, 04:51 PM
Waz
Are the images local or accessible to WebFOCUS ?

i.e. Not a url.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

October 06, 2010, 05:15 PM
IBI96
I had the same problem with a self-service app. In my environment, I determined that images for HTML output must reside on the Web Server and images for PDF output must reside on the Reporting Server.


WF Client 7.6.10 on Solaris
WF Reporting Server 7.6.10 on AIX


WebFOCUS Client 8.201 on Windows
WebFOCUS Reporting Server 8.2
ReportCaster 8.201
DataMigrator 8.201
WebSphere 8.5
All output formats
October 06, 2010, 08:55 PM
Waz
Here is something that I have been playing with for a while.

If the images are on a webserver not accessible directly, and not behind a proxy server, this may help.

-SET &Conf = FGETENV(7,'EDACONF',80,'A80') ;
-SET &Conf = TRUNCATE(&Conf) ;
-SET &TmpDir = TEMPPATH(80,'A80') ;
-SET &TmpDir = TRUNCATE(&TmpDir) ;

FILEDEF CALL DISK call.ftm

-RUN

-SET &Img_Name = '{image name}' ;

-WRITE CALL BEGIN
-WRITE CALL  HOST = {webserver}
-WRITE CALL  PORT = {port number}
-WRITE CALL  REQUEST_METHOD = GET
-WRITE CALL  URI = {web alias}&Img_Name
-WRITE CALL  EXCLUDE=ON
-WRITE CALL END
-WRITE CALL BEGIN
-WRITE CALL CONTENT=data
-WRITE CALL END

-RUN
! type call.ftm
! attrib +r call.ftm
! dir
! &Conf.EVAL\bin\interp.bat -httptst &TmpDir..call.ftm
-RUN
! attrib -r call.ftm

! rename call.hto &Img_Name

! dir
-RUN

DEFINE FILE CAR
 LOGO/A20 = '&Img_Name' ;
END
TABLE FILE CAR
HEADING
" "
PRINT COUNTRY
      LOGO 
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
-*TYPE=REPORT, IMAGE=&Img_Name, $
TYPE=DATA, COLUMN=N2, IMAGE=(LOGO),$
ENDSTYLE
END


Its convoluted, but will pull an image from a web location and write it in the temp directory.

This is definitely not what interp was intended to be used for !




Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!