Focal Point
PDF output file corrupt, full of weirdness

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

September 01, 2006, 11:06 AM
GreenspanDan
PDF output file corrupt, full of weirdness
Hi everyone,

We're having a problem generating PDF output on 5.3.4 on Solaris. When the same fex file uses html, DOC, or Excel as an output format it works fine, but when the format is changed to PDF, it generates a file of garbage. it correctly creates the file in the temp directory [random characters].pdf, but that file is full of very weird stuff, that doesn't remotely resemble the PDF file format. here is an example:

\254\355^Esr^Yibi.webfoc.wfapi.WFReportT}\376\204^LY\354\375^B^_Z^GaddLineI
burstCountI^HburstLenI^OcharacterLengthZ
firstFetchZ^MisBURSTReportZ^NisDecJustifiedZ isDecimalZ^MisGraphReportZ^OisMappingReportZ^VisMessageStringWrittenZ^Pi
sOLAPPaneReportZ^LisOLAPReportZ^LisRedirectedZ^PisReportFinishedZ^SisText_HtmlMimeTypeI^MnumberOfPagesL^NburstReportDirt
^RLjava/lang/String;L^WburstReportOutputStreamt^VLjava/io/OutputStream;[^KedaMessagest^S[Ljava/lang/String;L^HfileInfot^
_Libi/webfoc/wfutil/WFMimeEntry;L
ibiOptionst^ULjava/util/ArrayList;L^SinputStreamMimeTypeq~^AL^NmessagesStringq~^AL^Epagesq~^EL^SredirectionFileNameq~^AL
^YredirectionHeaderFileNameq~^AL^KreportCachet!Libi/webfoc/wfutil/WFObjectCache;L^NsavedVariablest^ULjava/util/Hashtable
;L^NsavedWF_VIEWERq~^AL^Fviewert"Libi/webfoc/wfapi/WFReport$Viewer;xp^A
\211&^A^Appur^S[Ljava.lang.String;\255\322V\347\351^]{G^Bxp^Bt50 NUMBER OF RECORDS IN TABLE= 49 LINES= 49tD(F
OC3218) NOTE: REPORT WILL BE PANELED; TOTAL WIDTH IS: 23.64 INCHESsr^]ibi.webfoc.wfutil.WFMimeEntry\362K^]\327\246\304ak
^B^EZ^RcontentDispositionZ^HisBinaryZ^HredirectL extensionq~^AL^HmimeTypeq~^Axp^At^D.pdft^Oapplication/pdfpq~^Qt\
333 0 NUMBER OF RECORDS IN TABLE= 49 LINES= 49^M
(FOC3218) NOTE: REPORT WILL BE PANELED; TOTAL WIDTH IS: 23.64 INCHES^M
^M
WebFOCUS Version 5.3.4 compiled and linked on Sat Jul 2 12:25:34 EDT 2005 (Gen WEB534:86)sr^Sjava.util.ArrayListx\201\3
22^]\231\307a\235^C^AI^Dsizexpw^D
xt^Lqmkebnim.pdft^Lipaqfsnr.pdfsr^_ibi.webfoc.wfutil.WFObjectCache\323+o\213/^T5\246^B^CI^OredirectionTypeL director
yt^NLjava/io/File;L^KfileTimeOutq~^Axpsr^Ljava.io.File^D-\244E^N^M\344\377^C^AL^Dpathq~^Axpt$/h/COTS/wfclient/ibi/WebFOC
US53/tempw^B/xt^D1200sr^Sjava.util.Hashtable^S\273^O%!J\344\270^C^BF
loadFactorI thresholdxp?@^Hw^H^K^Ct
ODP_targett^BONt^OIBIWF_mrcolumnst^A1t^NIBIWF_mreportst^Coffxt^1e7f930848923fb538a79d90674d79578010e756db6cbe7a0a4af9a7a
0690708e5814ab8c3499a9640dae6532e98d5sr ibi.webfoc.wfapi.WFReport$Viewerb\262\333+\247n\373^B^MI^KcurrentPageZ^OisCaseSe
nsitiveZ^OisForwardSearchI^LsearchOffsetI^PunderlinedStrLenL^Ealertq~^AL^Fcurposq~^AL^Dhomeq~^AL^HisViewerq~^AL^Dmultq~^
AL^LsearchStringq~^AL^Ftargetq~^AL^Fthis$0t^[Libi/webfoc/wfapi/WFReport;xp^A^Att^FSEARCHpt^GSESSIONpq~*pq~

it almost looks like peices of a trace log. for comparison, here is what the beginning of a valid PDF file looks like:

%PDF-1.2^M
6 0 obj^M
<<^M
/Length 7 0 R^M
>>^M
stream^M

these same fex files used to generate PDF files no problem. nothing has changed with them, and they're pretty straightforward anyway. i'm pretty sure it's not a problem with the fex themselves, rather some issue with configuration or something. does anyone have any ideas what could cause webfocus to create a PDF file that looks like the one above?
September 01, 2006, 03:22 PM
gregson06
I actually got this jarble today when I tried adjusting the settings on the stylesheet for the PDF properties...

I was able to reproduce a similar error by having thus:

TABLE FILE CAR
PRINT
*
BY MODEL
END

TABLE FILE CAR
PRINT
*
BY YEAR
ON TABLE PCHOLD FORMAT PDF
END

What happens is that since the first table wasn't held, the first portion of the data sorta spills the guts out of the PDF conversion (so to speak).

I would look at the different HOLDS for the rest of the program (if any), beyond that, it may have something to do with how you are declaring your PDF formatting...
September 01, 2006, 03:33 PM
GreenspanDan
interesting. thanks!


---------------------
WebFOCUS 7.6