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     [SOLVED] Converting .txt to .pdf

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Converting .txt to .pdf
 Login/Join
 
Member
posted
We are currently taking .txt files and using Report Caster to archive the files and give users access to the reports using the Report Library. These reports are displaying fine using html.

We would like to display these reports using .pdf format.

I have tried using a pdf converter and also using the pdf option when scheduling the jobs. When I open the reports I get one of two things. An Adobe Reader (v8.1) message saying the file is damanged and can not be repaired, or it opens but displays the following instead of the report(this is just a sample of the first few lines):

%PDF-1.4 verypdf.com
3 0 obj
<>
stream
x£?û?nâ0??{
_ª?ô
qF?
h?Vj
A?÷
endobj
4 0 obj
358 endobj
2 0 obj

I am using IE6.

Any ideas or info would be appreciated. Thanks!

This message has been edited. Last edited by: Kerry,
 
Posts: 13 | Registered: April 18, 2008Report This Post
Virtuoso
posted Hide Post
Can you run the report in PDF by itself, not in ReportCaster? Is the report set up to run in PDF.

Also please update your signature with what version of WebFocus you are using.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Guru
posted Hide Post
What version of WF are you using? What version of Acrobat? Can you upload your fex and txt file.

Thanks,
Sayed


WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
 
Posts: 285 | Location: Texas | Registered: June 27, 2006Report This Post
Expert
posted Hide Post
Prarie is right, can you just output in PDf instead of TXT.

The other option is to PDFafy the TXT document.

This makes several assumptions, but if the report is a fixed width and layout, you should be able to read the TXT file with WF and output a PDF version of the report.

I have done this with COBOL produced TXT reports.

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
Member
posted Hide Post
Thank you all for your comments.

These reports (there are at least 50 of them) are created on the mainframe using Nomad and ftp'd to the WF Server as a .txt file. We do not have a way of creating the output in .pdf on the mainframe. It is after I ran them through a .txt to .pdf converter on the server that I received the errors when running them using RC.

Putting the .txt file into Report Caster has not been a problem. They work fine, but we would like the options to search and print using .pdf instead.

I am really new at all of this so any help or details you have are very much appreciated.
Thanks!
 
Posts: 13 | Registered: April 18, 2008Report This Post
Expert
posted Hide Post
I would do what Waz said. You need to create a generic master with one field in it and make the format the length of a print line which I assume would be 133 for the mainframe.

You would then need a FILEDEF or APP FI to relate the text file to the generic master. Then TABLE FILE generic, PRINT *, ON TABLE PCHOLD FORMAT PDF, END for example.

You might have to scan lines for headings and/or carriage control and do something fancier if you want styling, etc. But for now, start simple and see if you are happy with the results.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
<JG>
posted
Dawn,

As has been said,

TABLE FILE xx PRINT * ON TABLE HOLD FORMAT PDF

However you also say that this does not work.

ADOBE reader 8.1!

I use 7, 8 and 9 and do not have any problems, But that is WebFocus server dependant.
What version of the WebFocus server and caster are you using and more specifically where is it.
Extra configuration settings are required if you are on UNIX.

As for converter, which one? ABC TEXT Converter works extremely well and is very cheap.
free 30 day trial give it a go.
 
Report This Post
Member
posted Hide Post
We are on WF 7.6.3 on Windows. Adobe 8. I used VeryPDF for the conversion. I will the ABC Text Converter a try.

Thank you.
 
Posts: 13 | Registered: April 18, 2008Report This Post
Expert
posted Hide Post
Here is a very quick example of converting a Text report to PDF
TABLE FILE CAR
PRINT COUNTRY CAR MODEL
ON TABLE HOLD AS TXT_RPT FORMAT WP
END

-RUN

FILEDEF TXT_RPT DISK txt_rpt.wp

EX -LINES 5 EDAPUT MASTER,txt_rpt,CV,FILE
FILENAME=TXT_RPT, SUFFIX=FIX,$
SEGNAME=TXT_RPT, $
  FIELD=PRT_CTL,ALIAS=  ,A2   ,A2   ,$
  FIELD=LINE   ,ALIAS=  ,A130 ,A130 ,$

-RUN

TABLE FILE TXT_RPT
PRINT LINE AS ''
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD FORMAT PDF
END


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
Silver Member
posted Hide Post
Hello everyone,

Raising this thread from the dead, from 10 years ago because I'm now in the situation of the OP and the solution that Waz posted does not work.

We have a situation where we are unable to use a varbinary(max) / BLOB field to write out to a PDF and must find a way to use the text equivalent of the PDF which looks something like this:

%PDF-1.4 %âãÏÓ 34 0 obj <> endobj xref 34 40 0000000016 00000 n 0000001408 00000 n 0

I have already tried all of the steps in this post and simply printing out the field and doing a PCHOLD FORMAT PDF for example, will give a PDF version of the garbled text above, not the actual PDF output.

Thanks!


Production: WebFOCUS 8.202M
QA: WebFOCUS 8.206.01
Windows/SQL
 
Posts: 37 | Registered: May 24, 2017Report 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     [SOLVED] Converting .txt to .pdf

Copyright © 1996-2020 Information Builders