Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CODE] Rotating Text in PDF's and other interesting things
Go
New
Search
Notify
Tools
Reply
  
[CODE] Rotating Text in PDF's and other interesting things
 Login/Join
 
Expert
posted
If you have ever wanted to say rotate the titles on a PDF report, but everyone says its impossible, they're wrong.

I have created a utility (Written in FOCUS) that can do this.

There are limits to this, some are WF based, some not.


  • Currently only tested on WF 7.1.6 and WF 7.6.4
  • Can only process 12 items at a time, this process could be rewritten in a scripting language such as Perl.
  • With WF the file must be post processed to remove trailing spaces.
  • You cannot use PCHOLD OR ONLINE-FMT = PDF.


Can simulate a PCHOLD with the command

SET HTMLFORMTYPE = PDF
-HTMLFORM {name of pdf file without extenstion}


Here is a sample

The example PDF is here

A zip file of the code and samples is here

If you have any issues with the code, please add to this post, and I'll attempt to fix the problem.

If anyone is interested in how this is done, please add to this post and I'll explain what I know.

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


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Very nice Warren, manipulating the PDF file stream itself, amending control objects etc.

Also good to see that you've tried to incorporate full error vetting as well.

It would have been good to know what environment and platform from your signature, but I guess that you are running on a unix box due to the following code snippet?
! sed 's/[ ]*$//' tmp_pdf.ftm > &UTLPDFFX_File
This obviously restricts it, but should be able to be coded to for some other platforms by using &FOCMODE tests.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5601 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
I've just made some changes to the PDF Effects routine.

Fixed some bugs

And

Added an outline functionality.

This will allow you to either have text as an outline or filled outline.

The obvious use for the outline would be a watermark in the report like DRAFT.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Very nice!


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
I've just replaced the SED command with Dialog Manager, so now the utility is pure FOCUS code.

This has been tested with WF 7.1.6 (Unix) and 7.6.4 (Windows and Unix)


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Oops another typo, seems to get worse the older I get, or are the keyboards changing ? Music


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
-* Write out a master to read the BSB_ACC list
EX -LINES 5 EDAPUT MASTER,pdf_effects,CV,FILE

just this wee bit of syntax by itself is the most brilliant thing i've ever seen...
wow




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
so it seems that DEALER_COST is the key element in this whole thing..
One of the TITLE's has to be set
with a whole lot of room vertically, in the usual sense, in order to get the rotated titles to fit.

so the entry for [c] could be an explicit blank
-SET &UTLPDFFX_Fx3 = '[c];R0;;; ' ;
and the AS phrase for DEALER_COST
DEALER_COST AS '[c], , ,Dealer'
will make the whole title bar tall enough to handle flipped titles.

this is sooooooo sweet.
i hope you won a tv or a car or a house or something.
Last year T and I won iPods...very sweet,
but this one's worth a sailboat.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
or are the keyboards changing
You must have had the same batch as mine - it's disl dyls can't spell either Wink

As for the top tip Summit 2008, a worthy winner Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5601 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Susannah, if you need more info on EDAPUT, have a look here

As for how it works, yes, you have to consider the space that WebFOCUS will leave.

I won an iPod, its billiant.

Perhaps next time the prize will be an iPhone ??

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


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
And no matter what size font you use the print on the screen just keeps getting smaller!


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
And no matter what size font you use the print on the screen just keeps getting smaller!

Pat, I don't follow. Confused


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
quote:
Oops another typo, seems to get worse the older I get, or are the keyboards changing ?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
i think its a comment about our eyes Wink




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
The eyes are going, and the keyboards are getting smaller. Sweating


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
The result is extremely cool! To be frank I barely understand how it works. OK, I'll admit right now I don't understand how it works at all Roll Eyes

However I must say that it appeals to my sense of irony that the winning entry is based on a feature that is both undocumented and unsupported, which of course makes the achievement even more impressive.

Do you think they'll 'code-tighten' then ask for the ipod back when it no longer works?






Live and Direct from the University of Virginia.


DevStudio 7.6.9 - WF-7.6.9 - Win2k3 - MRE - RC - MSSQL - XBOX-360 Elite - Playstation 3 - Wii - PSP - Nintendo DSi - iPod Touch - Suzuki B-King - Honda Valkyrie - Subaru WRX STI - Canon EOS 1D Mark IV - Lover of Toys.
 
Posts: 21 | Location: Virginia | Registered: May 10, 2005Reply With QuoteReport This Post
Member
posted Hide Post
Oh now I get it!

Veeery nice.






Live and Direct from the University of Virginia.


DevStudio 7.6.9 - WF-7.6.9 - Win2k3 - MRE - RC - MSSQL - XBOX-360 Elite - Playstation 3 - Wii - PSP - Nintendo DSi - iPod Touch - Suzuki B-King - Honda Valkyrie - Subaru WRX STI - Canon EOS 1D Mark IV - Lover of Toys.
 
Posts: 21 | Location: Virginia | Registered: May 10, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
its not even a feature
its all 'Waz', hacking a result out of thin air and magic.
Waz is the real 'David Copperfield'




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Stop it, my head is getting bigger, oopps it exploded. Red Face

But seriously, any of us can do this sort of thing, you just have to keep an open mind and think outside the box, well perhaps in another container in another port. Winky


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
Waz.... great routine. Thanks. I needed to add parentheses around the code in line 202 of your zipped utlpdffx to get it to work for me, else it gave an:
 0 ERROR AT OR NEAR LINE    202  IN PROCEDURE UTLPDFFXFOCEXEC *
 (FOC279) NUMERIC ARGUMENTS IN PLACE WHERE ALPHA ARE CALLED FOR


works great as:

 S&Cntr..ALin2/I9    = IF ('&UTLPDFFX_Efct.&Cntr' CONTAINS 'R270')
                       (OR '&UTLPDFFX_Efct.&Cntr' CONTAINS 'R90')




Prod: WebFOCUS 7.1.6 Servlet - Self Service on Solaris 8 - Apache Tomcat 5.0.28
DevStudio 7.1.6 on MS Windows XP SP2
Output: HTML, Excel 2000 and PDF
 
Posts: 4 | Registered: May 24, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks zoogy55, i've fixed it in the zip in the link above.

The new version has some other general fixes as well.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
Doesn't appear to work correctly with 7.7.03. Looks like some syntax errors. Working to try to correct them.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 1 | Registered: July 10, 2014Reply With QuoteReport This Post
Expert
posted Hide Post
Not sure if I have ever tested it on 7.7 and certainly not 8.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6104 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CODE] Rotating Text in PDF's and other interesting things

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.