Forums
FOCUS/WebFOCUS
[CODE] Rotating Text in PDF's and other interesting things|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Guru |
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.
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...
|
||||||||||
|
|
Expert |
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_FileThis obviously restricts it, but should be able to be coded to for some other platforms by using &FOCMODE tests. T Old FOCUS coders never die, they just become functionally stable. (Tony A
|
|||||
|
|
Guru |
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...
|
|||||||||||
|
|
Expert |
Very nice!
Francis Env 1: WebFOCUS 5.3.2 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - IIS/New Atlanta ServletExec - MS SQL Server 2000 - DataMigrator 5.3.4 Env 2: WebFOCUS 7.6.5 Servlet - MRE/BID/Self Service - MS Windows XP SP2 - Apache Tomcat/5.5.25 - MS SQL Server 2000 Env 3: WebFOCUS 5.3.3 CGI - Self Service - AIX 5.2 - IBM DB2 Output formats: HTML, Excel 2000 and PDF |
|||
|
|
Guru |
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...
|
|||||||||||
|
|
Guru |
Oops another typo, seems to get worse the older I get, or are the keyboards changing ?
Waz...
|
|||||||||||
|
|
Expert |
-* 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
|
|||||
|
|
Expert |
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.
|
|||||
|
|
Expert |
You must have had the same batch as mine - it's As for the top tip Summit 2008, a worthy winner T Old FOCUS coders never die, they just become functionally stable. (Tony A
|
|||||
|
|
Guru |
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...
|
|||||||||||
|
|
Master |
And no matter what size font you use the print on the screen just keeps getting smaller!
Pat WF 5.3.2 AIX, NT, AS/400, Focus AS/400, AIX, Oracle, JDE, DB2, Lotus Notes |
|||
|
|
Guru |
Pat, I don't follow. Waz...
|
|||||||||||
|
|
Master |
Pat WF 5.3.2 AIX, NT, AS/400, Focus AS/400, AIX, Oracle, JDE, DB2, Lotus Notes |
|||
|
|
Expert |
i think its a comment about our eyes
|
|||||
|
|
Guru |
The eyes are going, and the keyboards are getting smaller.
Waz...
|
|||||||||||
|
|
Member |
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
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.6 - WF-7.6.4 - Win2k3 - MRE - RC - MSSQL - XBOX-360 (dead) - Wii - PSP - iPod Touch - Suzuki B-King |
|||
|
|
Member |
Oh now I get it!
Veeery nice. Live and Direct from the University of Virginia. DevStudio 7.6.6 - WF-7.6.4 - Win2k3 - MRE - RC - MSSQL - XBOX-360 (dead) - Wii - PSP - iPod Touch - Suzuki B-King |
|||
|
|
Expert |
its not even a feature
its all 'Waz', hacking a result out of thin air and magic. Waz is the real 'David Copperfield'
|
|||||
|
|
Guru |
Stop it, my head is getting bigger, oopps it exploded.
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. Waz...
|
|||||||||||
|
|
Member |
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 |
|||
|
|
Guru |
Thanks zoogy55, i've fixed it in the zip in the link above.
The new version has some other general fixes as well. Waz...
|
|||||||||||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Forums
FOCUS/WebFOCUS
[CODE] Rotating Text in PDF's and other interesting things