Can anyone tell me a work-around in regards to using WRAP with PDF output. If you run the code below, you will see that if the text is in lowercase (blue text), the wrapping in the styling displays correctly. If the exact same text is all in uppercase (green text), the text gets cut off on the right side of the pdf document. All of the styling is exactly the same for both fields in the HEADING. The only difference is lowercase vs. uppercase. The data I need to display on the PDF document is coming from the Oracle database as all UPPERCASE and I need to display it in upper case on the report in a large font because the 8.5 x 11 sheet of paper needs to be attached to a pallet in a warehouse so the font needs to be large. Any help with a work-around would be appreciated!
DEFINE FILE CAR HEADING_TEXT_LC/A400 = 'this is example of really long text that doesn't wrap if it is in uppercase. when it is all lowercase it doesn't seem to have any issue. as soon as the same text is uppercase, it cuts off the text on the right edge when output to pdf. does anyone know how to get the wrap to work when the text is all uppercase?'; HEADING_TEXT_UC/A400 = 'THIS IS EXAMPLE OF REALLY LONG TEXT THAT DOESN'T WRAP IF IT IS IN UPPERCASE. WHEN IT IS ALL LOWERCASE IT DOESN'T SEEM TO HAVE ANY ISSUE. AS SOON AS THE SAME TEXT IS UPPERCASE, IT CUTS OFF THE TEXT ON THE RIGHT EDGE WHEN OUTPUT TO PDF. DOES ANYONE KNOW HOW TO GET THE WRAP TO WORK WHEN THE TEXT IS ALL UPPERCASE?'; END TABLE FILE CAR PRINT SALES NOPRINT HEADING "<HEADING_TEXT_LC" "" "<HEADING_TEXT_UC" ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT,ORIENTATION=PORTRAIT,FONT=ARIAL,$ TYPE=HEADING, LINE=1,SIZE=55, JUSTIFY=CENTER,WRAP=6.5, COLOR=BLUE,STYLE=BOLD, $ TYPE=HEADING, LINE=3,SIZE=55, JUSTIFY=CENTER,WRAP=6.5, COLOR=GREEN,STYLE=BOLD, $ ENDThis message has been edited. Last edited by: FP Mod Chuck,
Windows, All Outputs
That is certainly not right.
I would suggest opening a case with TechSupport
I am not sure, why do you think blue text was displayed correctly?
You were using JUSTIFY=CENTER for both, green text was displayed in center and blue text aligned towards left side.
Try to use page margins to wrap the text properly.
Are you running 8.104? I found a copy of 8.105M and your code wraps as expected. It also works properly in 8.206.
WebFOCUS 8206, Unix, Windows
I see no problems with text loss on the right unless I change the page size to A4 but then that's what I would expect.
As Pav suggests, you need to consider margins etc.
The issue for me is why isn't the JUSTIFY=CENTER being honoured (yes, it contains a "u" )?
If your only concern is text failing off the page on the right, then change the WRAP statement to a slightly smaller value.
Thanks to all of you for responding so quickly! I was hoping for Francis to respond as well so we will see. He's helped me out before several times!
I think the blue text is being displayed correctly because at least it's wrapping each line and nothing is running off the page on the right hand side and getting cut off. Both the Blue and Green text isn't honoring the 'JUSTIFY=CENTER'. The green text though is not wrapping even though the wrapping value is the same for both. I did try to reduce the wrap value but that didn't work on the first line but then seemed to work on the second line and all lines after that. I did try inserting into the styling 'rightmargin=2,$' but it didn't have any affect on the report at all. If I am placing the 'rightmargin' in the wrong place and you can get it to work, please post the code here.
I think I went to one of your presentations at Summit a few years ago. You are the 'bloke' from England with the great accent, aren't you? It's nice to hear from you again.
I didn't change the paper size at all when printing it out to PDF. I think the default is 8.5 x 11" here in the U.S. and Portrait orientation. The blue text seems to wrap correctly but the green text, which is the exact same text except it's in uppercase is getting cut off on the right side of the page. Like I said to Pav, I tried to change the margins but it didn't seem to help. I agree that the 'JUSTIFY=CENTER' seems to be not working on both sections. They both seem to be left-justified. I'm honoUred that you corrected our mis-spelling of the word honored! I did try changing the wrap value but like I mentioned to Pav, it doesn't work on the first line but then seems to work on all the lines after that which really doesn't help me. I need the first line to wrap.
Thanks for checking the code out in other releases! It's not the first time 8.104 has been tagged as the culprit for my pain! If I could go back in time, I would of told whoever made the decision to skip 8.104 but what can you do? We are in the process of upgrading to 8.206 but it's been a struggle so far and we are not even close at this point to upgrade. I will see if I can run the code in the 8.206 version we have on one of our sandbox enviornments.
Your posts on FocalPoint have also really helped me figure stuff out in the code many times in the past. Thanks for your insight throughout the years!
I'm going to take your advice and submit a ticket to support and confirm that it's a 8.104 issue. The field I'm using is only 50 characters long so my example is an exaggeration but because I need to display the text in at least a 50 font size( The specs called for 72), the text can't run off the right side of the page because it's the name of the customer that the pallet is being shipped to.
Again, thanks for all your help with this and if you could send me the code with margins and it's actually working in 8.104, please send it my way!
Windows, All Outputs
Francis has not been on the Forum in quite a while, I think he retired or just moved on...
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
I didn't mention it , but we have 8.1.04 and they do not align in that version.
Please try this once.
DEFINE FILE CAR HEADING_TEXT_LC/A400 = 'this is example of really long text that doesn't wrap if it is in uppercase. when it is all lowercase it doesn't seem to have any issue. as soon as the same text is uppercase, it cuts off the text on the right edge when output to pdf. does anyone know how to get the wrap to work when the text is all uppercase?'; HEADING_TEXT_UC/A400 = 'THIS IS EXAMPLE OF REALLY LONG TEXT THAT DOESN'T WRAP IF IT IS IN UPPERCASE. WHEN IT IS ALL LOWERCASE IT DOESN'T SEEM TO HAVE ANY ISSUE. AS SOON AS THE SAME TEXT IS UPPERCASE, IT CUTS OFF THE TEXT ON THE RIGHT EDGE WHEN OUTPUT TO PDF. DOES ANYONE KNOW HOW TO GET THE WRAP TO WORK WHEN THE TEXT IS ALL UPPERCASE?'; END TABLE FILE CAR PRINT SALES NOPRINT HEADING "<HEADING_TEXT_LC" "" "<HEADING_TEXT_UC" WHERE RECORDLIMIT EQ 1 ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * UNITS=IN, PAGESIZE='Letter', SQUEEZE=ON, ORIENTATION=PORTRAIT, LEFTMARGIN=0.5, RIGHTMARGIN=0.1, $ TYPE=REPORT,FONT=ARIAL,SIZE=35,$ TYPE=HEADING,LINE=1,ITEM=1, COLOR=BLUE, WRAP=8,WIDTH=8,JUSTIFY=LEFT,$ TYPE=HEADING,LINE=3,ITEM=1, COLOR=GREEN, WRAP=8,WIDTH=8,JUSTIFY=LEFT,$ ENDSTYLE END -RUN
|Powered by Social Strata|