Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     PDF compound layout and SVG

Read-Only Read-Only Topic
Go
Search
Notify
Tools
PDF compound layout and SVG
 Login/Join
 
Virtuoso
posted
I am currently working on creating a PDF template that, among other things, will include a couple of company logo's in the heading. I know the preferred format for GRAPHs in PDF is SVG (because it scales, obviously).

So, I figured I should use SVG for the company logos too, but while I managed to get the URI reference in (the compound layout editor only accepts bitmap formats), they don't show up when I run the compound report from Dev Studio!

Is this not supported or am I doing something wrong?

My code is below:
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=CM, $
OBJECT=TOC, NAME='TOC', TEXT='<font face="ARIAL" size=10 color=#000000>Table of Contents</font>', MARKUP=ON, TOC-NUMBERING=ON, POSITION=(2.117 2.117), DIMENSION=(25.850 17.145), font='ARIAL', color=RGB(0 0 0),  size=10, METADATA=' TOCTITLE: Table of Contents', $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5^1', MERGE=OFF, ORIENTATION=LANDSCAPE, PAGESIZE=A4,  $
PAGELAYOUT=ALL, NAME='Page Master', $
OBJECT=IMAGE, NAME='LogoRight', IMAGE=logo_r.svg, POSITION=(25.215 0.423), DIMENSION=(4.022 1.270), METADATA='Z-INDEX: 102; POSITION: absolute; WIDTH: 4.022cm; HEIGHT: 1.27cm; TOP: 0.423cm; LEFT: 25.215cm', $
OBJECT=STRING, NAME='HeadingText', TEXT='<font face="ARIAL" size=14><center>Heading text</center></font>', POSITION=(4.154 0.344), MARKUP=ON, WRAP=ON, DIMENSION=(20.849 0.953), style=bold, METADATA='', $
OBJECT=IMAGE, NAME='LogoLeft', IMAGE=logo_l.svg, POSITION=(0.537 0.474), DIMENSION=(140.000 58.000), METADATA='Z-INDEX: 104; POSITION: absolute; WIDTH: 140px; HEIGHT: 58px; TOP: 0.474cm; LEFT: 0.537cm', $
COMPONENT='DfltCmpt2', POSITION=(0 0), DIMENSION=(0 0), $
PAGELAYOUT=1, NAME='Page layout 1', text='(default content)', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='DfltCmpt3', POSITION=(0 0), DIMENSION=(0 0), $
END
SET COMPONENT='DfltCmpt2'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
END
SET COMPONENT='DfltCmpt3'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
END
COMPOUND END


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
I found this in some Documentaion from 2008, I don't know if anything has changed. You might want to change it to a different format.

In addition, with respect to SVG format, the only SVG files WebFOCUS
supports are those created with our own graphics code. We do not support
SVG images created outside of WebFOCUS
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Thats a challenge..... Big Grin


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Prarie:
In addition, with respect to SVG format, the only SVG files WebFOCUS
supports are those created with our own graphics code. We do not support
SVG images created outside of WebFOCUS


*sigh*... leave it up to IBI to implement only part of a feature...

Right, any other way to embed vector graphics in a PDF compound report?
I was thinking perhaps a fragment of PDF code could do it?

I'd really prefer (scalable) vector images over (non-scalable) bitmap images - especially since WF apparently doesn't support embedding PNG-images either, so I'd end up with compression artefacts (JPEG) or low colour-depth (GIF). Regardless of what bitmap format I use I would end up with several versions of each image in different sizes too, one set for each paper-size used in the template.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
...Or... you use bitmap images of sufficient size that are scaled down on paper output so much that they don't look pixelish on a 1200DPI printer.

That's the workaround I'm currently using. The images are over 100kB each.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Here is a backup plan.

Create and save the logo in a PDF document.

Then you can use PDFBox to overlay one with the other.

Not the best solution, be can be done.

There may be other tools out there that will do this more gracefully.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
Here is something that I threw together that has worked on the 2 svg's I have.

Let me know how it goes for any others.

SVG Preparation for WebFOCUS


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
The style attribute on the path tag is not allowed, these are converted to attributes.


I think you meant to say something different for what those attributes are converted to?
Anyway, our SVG images appear to fall in that category.

There's also no output in either Firefox or IE8.

Firefox claims:
Unexpected value NaN,NaN 0.327148) parsing transform attribute.
String contains an invalid character
  node.setAttribute(attrItem[0],attrItem[1]) ;             svg_prep.html (line 73)


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Use a logo in a .gif or .jpg format.
eg:
SET HTMLARCHIVE = ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
SECTION=section1,LAYOUT=ON,$
PAGELAYOUT=1,NAME='Page Laout 1', text='Page Layout 1',TOC-LEVEL=1,BOTTOMMARGIN=0.5,
TOPMARGIN=0.5,METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0',$
OBJECT=IMAGE, NAME='image1', IMAGE=nyu2011_bw.gif, POSITION=(0.521 0.3), DIMENSION=(1.885 0.990), METADATA='Z-INDEX: 100; LEFT: 0.521in; WIDTH: 1.885in; POSITION: absolute; TOP: 0.3in; HEIGHT: 0.99in', $

we do it all the time. your logo doesn't have to be svg in compound pdf.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
quote:
There's also no output in either Firefox or IE8


Oops, cross browser support next.

Susannah, the benefits of SVG is the quality of the image in PDF, as its vector based, it can be resized, and no loss or degradation occurs.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Expert
posted Hide Post
OK,here is version 0.1a (better cross browser support)

Let me know if there are any more issues.

Note: For transforms, only translate is supported.

SVG Preparation for WebFOCUS

Here is a sample run from an svg from google.

Original: World_map_-_low_resolution.svg
Prepared: world_map_low_prep.svg
PDF Output: world_map_low_prep.pdf

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


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     PDF compound layout and SVG

Copyright © 1996-2020 Information Builders