Focal Point
[CLOSED]add/include the Image/logo & align the rpt heading to centre in PDF report

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

January 20, 2015, 11:04 AM
info4pal
[CLOSED]add/include the Image/logo & align the rpt heading to centre in PDF report
Hi,

Iam trying to add a logo or image to the PDF report output but am unable to do so.
Also am trying to make the report heading aligned to be center but not able to achieve this as well.

Any help with the sample example on how to do this would be greatly appreciated!

Thanks a lot in advance!

Regards!

This message has been edited. Last edited by: info4pal,


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 20, 2015, 03:45 PM
Waz
Can you post your code ?


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!

January 20, 2015, 11:59 PM
Ram Prasad E
Check this documentation.
http://infocenter.ibi.com/wf80...2Fsource%2FIMAGE.htm

Hope this helps.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
January 21, 2015, 04:01 AM
info4pal
Hi ,

Yes I did look into the link which you had provided Ram but its not working.

Waz and Ram ...
Please find my code below :
TABLE FILE CAR
PRINT *
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=TABHEADING, IMAGE=IBFS:/wfdev/EDA/EDASERVE/APPPATH/fldr/abc_im.jpeg,
POSITION=(.25 .10), SIZE=(1 1), $
ENDSTYLE
END
-EXIT

THis is the error message am getting :
TABLE FILE CAR
PRINT *
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=TABHEADING, IBFS:/wfdev/EDA/EDASERVE/APPPATH/fldr/abc_im.jpeg,
POSITION=(.25 .10), SIZE=(1 1), $
ENDSTYLE
END
-EXIT

Please let me know any workaround for the same.

Thanks a lot in advance!

Regards!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 21, 2015, 04:31 AM
Ram Prasad E
Hi,

Try placing it in REPORT instead of TABHEADING. From your code, there is no TABHEAD component.

TABLE FILE CAR
PRINT *
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, IMAGE=IBFS:/wfdev/EDA/EDASERVE/APPPATH/fldr/abc_im.jpeg,
POSITION=(.25 .10), SIZE=(1 1), $
ENDSTYLE
END
-EXIT

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
January 21, 2015, 04:33 AM
Ram Prasad E
In the example provided in the documentation link, you can notice below lines,

TABLE FILE GGORDER
ON TABLE SUBHEAD
"PRODUCTS ORDERED ON 08/01/96"

So there is a component for TABHEAD and so image will be placed there. But in your code, I do not see TABHEAD component.

So try placing Image in REPORT component in my previous post.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
January 21, 2015, 05:14 AM
info4pal
Hi Ram,

I tried it on the report but it is not working.
Please find the error message below :

(FOC757) WARNING. YOU REQUESTED PRINT * OR COUNT * FOR A MULTIPATH FILE
0 ERROR AT OR NEAR LINE 8 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC3251) IMAGE FILE UNREADABLE OR INVALID: null

Thanks a lot in advance!

Regards!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 23, 2015, 09:20 AM
Prarie
If you put the image in the same app path as the fex - you should be able to run this below.
You will have to play with the position and size.
TABLE FILE CAR
PRINT CAR SEATS COUNTRY COUNTRY 
BY COUNTRY
HEADING
" "
"</5"
" "
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=HEADING,
     IMAGE=MYIMAGE.gif,

    POSITION=(+2.700000 +0.000000),
     SIZE=(1.100000 1.10000),
$
ENDSTYLE
END  

January 27, 2015, 07:39 AM
info4pal
Hi ,

I tried placing my Jpeg image in the same app path and am still getting the below error message:
0 ERROR AT OR NEAR LINE 17 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC3251) IMAGE FILE UNREADABLE OR INVALID: my_image.jpeg


Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 27, 2015, 07:49 AM
<FreSte>
What happens if you rename the image to *.jpg (not *.jpeg)
January 27, 2015, 03:30 PM
Waz
I was going to say the same thing.

I think the extension drives how the file is handled, and if jpeg is not recognised, then this would explain it.


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!

January 28, 2015, 04:36 AM
info4pal
Hi,

I tried giving the extension as .jpg also but still it is throwing the same error message but am able to get the output in HTML.

Anything wrong with the PDF format.
Please let me know!

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 28, 2015, 04:54 AM
Waz
Are you sure it is a jpg file ?


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!

January 28, 2015, 05:00 AM
info4pal
Hi,

Yes Waz it is a Jpg file.

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 28, 2015, 05:01 AM
info4pal
Hi,

I meant the extension is Jpeg.

Thanks!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 28, 2015, 06:51 AM
Tony A
I can find no documentation that says that anything other than a GIF file is supported for PDF output.

Is this something that you have been advised, read in WF documentation or something that you just assumed?

If your output renders to HTML output with your JPEG image then that would indicate that the image file is not damaged.

I would advise converting to a GIF for PDF.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 28, 2015, 07:19 AM
info4pal
Hi Tony,

Sure,I will try changing the image format to GIF.

Thanks a lot everyone for your response and time!

Thanks a lot again!


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
January 28, 2015, 03:23 PM
Waz
I am a bit surprised.
We have been using jpg's for many years and they have always worked.

If they have taken jpg support out of v8, then thats a step backwards.


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!

January 28, 2015, 03:26 PM
Tom Flynn
Hey Waz,
They haven't, I use jpg's in WF8 and they display fine...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
January 28, 2015, 03:39 PM
Waz
Then perhaps the jpg is corrupt to a point that WF has problems reading it, but other tools work ??


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!

January 29, 2015, 03:23 AM
Tony A
quote:
using jpg's for many years and they have always worked.

I was only saying what I could find within documentation - never said that it was exhaustive Wink

It's also why I suggested rendering in HTML to check the image is able to be read.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
January 29, 2015, 03:44 PM
Waz
quote:
I was only saying what I could find within documentation


Just concerned that the documentation is in genral the source of truth, and although it would probably not happen......

......... Code tightening


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!

January 30, 2015, 05:21 AM
Tony A
quote:
never said that it was exhaustive

Razzer

T
February 01, 2015, 03:23 PM
Waz
Oh well, hopefully its just another case of general paranoia.

Wink


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!

February 02, 2015, 02:35 AM
Tony A
quote:
Last edited by: info4pal, 28 January 2015 12:20 PM

As IP changed the post subject to [CLOSED] shortly after suggesting converting to a gif, I am guessing that any potential image corruption (or otherwise Wink) was overcome by the conversion and usage of a gif.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10