Measuring Line Width Of Composed Text

Hi,
In the solutions.pdf of the CS4 SDK, there is a piece of code listed in example 9 that will estimate the width of the text. I tried implementing it as a snippet but upon compiling the code in xcode, I get an invalid static_cast from type IFontInstance* to type const IPMUnknown* that originate from the line of code InterfacePtr<IFontInstance> fontInstance(nil).
I haven't changed any part of the code, and I don't think adobe would post examples of non-working code on a document named solutions.pdf , so I'm betting that I missing something here but I can't figured out what... any hints is highly appreciated... thanks!
-- Jeff

To procede, omit the "(nil)" argument and you should be fine for that line, or specialize the method in question.
I tried this, but I got error messages pointing to a function that uses the fontInstance pointer. The function is in the form of:
EstimateStringWidth(WideString run, IFontInstance* fontInstance)
and the error tells me that the line:
     totalWidth += EstimateStringWidth(charBuff, fontInstance);
has no matching function.
Also, most of the samples in the SDK creates a IFontInstance using an InterfacePtr.
I tried this approach because solutions.pdf suggests this method to estimate text widths... I want to measure the text width of a composed line to determine the raggedness (degree of whitespace left on the end of each line) of a paragraph. But with this issues, am I better off using the GetWidth method of IWaxLine to get the width.
Now, my next question would be, can I get the estimate width of the line if I change the properties of the paragraph, ie. justification settings, without actually composing the text in the ui. I need this so that I can compute for the optimal settings to changed so that the degree of raggedness of the paragraph would be less than the original.
Thanks again!

Similar Messages

  • Any way to set line width on outgoing (text) messages?

    My messages to a mailing list (and probably elsewhere) sometimes get chopped up by the addition of extra returns, so they're hard to read by the recipient (we've all seen this, especially on messages forwarded several times). I always send text-only email. A correspondent suggest setting my outgoing message line width down to 60 characters to avoid this, but I can't find anywhere in Mail's preferences to do this (I seem to remember such a setting on another email client years ago). I'm embarrassed to report back to my Windows-using correspondent that Apple Mail doesn't offer this option. Can anyone tell me it does, and where?

    No, I'm not putting in any extra returns. I seem to remember this from back in the 90s: that some points in the Internet's email system allow lines of only 60 characters' length, so if your message arrives with 72 character (or longer) lines, it'll get all chopped up; and the solution is to set your email client to produce only 60-character lines. But I can't find any way to do this in Mail.

  • Email with text attachment with line width 1250

    Dear all,
                 I want to send the email with text attachment whose line width in text file is 1250. Kindly let me know how to send email attachment with more than 255 line width.
    Regards,
    Manoj
    Moderator Message: Frequently Asked Question. Please search for available information before posting.
    Edited by: kishan P on Apr 29, 2011 2:48 PM

    Hi,
    What ever text you are sending in the email, create a standard text for it using tcode SO10. In the program use the FM READ_TEXT to get the data into internal table which will be of length 132 char. If you want line widht of 255 chars convert using FM SX_TABLE_LINE_WIDTH_CHANGE as below,
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        EXPORTING
          line_width_dst              = '255'
        TABLES
          content_in                  =  it_data
          content_out                 = it_mess_att
        EXCEPTIONS
          err_line_width_src_too_long = 1
          err_line_width_dst_too_long = 2
          err_conv_failed             = 3
          OTHERS                      = 4.
    Use FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send email.
    Hope this will help you.
    regards,
    Tulasi.

  • Problems rendering Every-line Composer texts with Adobe Media Encoder

    I find the text paragraph setting "Adobe Every-line Composer" a huge time saver when dealing with large amounts of text in after effects. I rarely have to do any manual tracking or line breaks to make it look good, as opposed to working with the standard Single-line Composer.
    The problem is that when I render through Adobe Media Encoder (which I'm forced to do since they removed H264-mp4 support from AE:s internal renderer) the text is treated like single-line composed text. So the final render doesn't look like my AE project.
    I've found two solutions to this problem:
    1. Render a lossless video file in the AE renderer and then compress it with Media Encoder. This takes more time and HDD space, and it doesn't allow me to continue working in AE while rendering.
    2. Only use Single-line composed text and make all adjustments manually, the old school way. This would not be a problem if I had not already used, and fallen in love with, the Every-line option.
    Is there anyone that can think of a third, and preferably better, solution?
    I use the CC 2014 versions of AE and AMC.

    No, the text doesn't animate at all. It's just a normal static text box. The text part is extremely simple. All animations are done in other layers and pre-comps, combined with pre-rendered 3D graphics from Cinema 4D, rendered as image sequences. My problem is a bug, plain and simple. Or perhaps you could call it a "lack of feature support" or an "incompatibility between AE and Adobe Media Encoder".
    My problem appears only when my AE project has text boxes with the "Every-line Composer" option enabled (press the menu button in the Paragraph window to find it), AND the project is rendered through Adobe Media Encoder, no matter which output format I use. I have no problems what so ever inside of after effects, or when rendering Single-line Composer text in AMC.
    So, the problem is that Media Encoder doesn't recognize Every-line composed text. Instead it changes it to Single-line composed text, messing up text tracking and line breaks.
    To clarify: the Adobe Every-line Composer is analyzing the entire text box instead of only the current line. That way it can automatically change the tracking of individual lines to better distribute the line breaks and build a better whole, avoiding those stray words on the last line for example. Extremely handy, if you could only render it.
    I never wrote anything about animating text or that the codec is related to the text problems in any way. AMC is the problem. The codec is only a secondary problem since its the lack of mp4 H264 support that forces me to use Media Encoder in the first place, instead of using the AE render queue as I did in previous versions of AE. I like many things about rendering through AMC, like being able to continue working in AE while rendering, but there are still way too many glitches. And of course, there's the inability to render flv-files in AMC CC 2014, and Adobe's inability to provide a solution other than "Use an older version of AMC". Flv is their own damn format for christ's sake.
    Well, enough rambling.
    To put it simple:
    Has anyone had a problem with "Every-line Composer" in combination with Adobe Media Encoder? Did you find a solution other than the two less-than-perfect ones in my first message?
    Thanks!

  • Why the text field frame's line width cannot be adjusted?

    I am now working on a PDF file with some text fields with combo turned on, specifying the number of chars the fields can hold. Their frames' line width is not thick. This is what I want. This is shown in the picture below:
    But when I try to preview the PDF, I discover that these fields do not follow what I have specified: no matter what thickness I choose, the frames are always thick. I want them to be thin!
    See below:
    Why is it so? What should I do? Any ideas are welcomed.

    I have sent my form to you to take a look. Thanks for your support!
    By the way, I have uninstalled Acrobat 8 and installed Acrobat 9 Pro, but I am facing serious problems. Whenever I open Acrobat I will face an EULA page and if I click "Accept" or "Decline", the whole program will close immediately.
    I have googled and added an EULA value (=1, in hex) in the regedit. No effect. I want to uninstall Acrobat 9, and there is NO RECORD in the Install/Uninstall section in the Control Panel. I am using Vista Home Basic.
    I am now frustrated. I tried Acrobat 9 and it failed, and now I can't even uninstall it and revert to ver 8.......My God....

  • Report Text line width

    Is there a way to set the text line width on a report to 80 characters and then have it wrap to the next line. I'm getting very long cells that I have to scroll over with the arrow key to see the text past my screen size.

    Any one know the HTML command to set text line size?

  • Reports Builder: line width of a graphic and generated PDF

    Hello,
    I change the line width of a graphic but in the generated pdf the line width remains equal.
    Some pics:
    The graphic in Reports Builder:
    !http://i25.tinypic.com/20famuu.jpg!
    The xml code:
    <SeriesItems>
    <Series id="0" markerType="MT_BAR" borderTransparent="true" transparent="true"/>
    <Series id="1" markerType="MT_MARKER" color="#101df" lineWidth="9"/>
    <Series id="2" markerType="MT_MARKER" color="#101df" lineStyle="LS_DASH" lineWidth="9"/>
    <Series id="3" markerType="MT_MARKER" color="#b4045f" lineWidth="1"/>
    <Series id="4" markerType="MT_MARKER" color="#b4045f" lineStyle="LS_DASH" lineWidth="1"/>
    <Series id="5" markerType="MT_MARKER" color="#0" lineWidth="9"/>
    <Series id="6" markerType="MT_MARKER" color="#0" lineStyle="LS_DASH" lineWidth="1"/>
    </SeriesItems>
    The graphic in the PDF report:
    !http://i25.tinypic.com/2emq3b5.jpg!
    Why in the PDF report the size is different?
    Thanks in advance and sorry for my english...

    To procede, omit the "(nil)" argument and you should be fine for that line, or specialize the method in question.
    I tried this, but I got error messages pointing to a function that uses the fontInstance pointer. The function is in the form of:
    EstimateStringWidth(WideString run, IFontInstance* fontInstance)
    and the error tells me that the line:
         totalWidth += EstimateStringWidth(charBuff, fontInstance);
    has no matching function.
    Also, most of the samples in the SDK creates a IFontInstance using an InterfacePtr.
    I tried this approach because solutions.pdf suggests this method to estimate text widths... I want to measure the text width of a composed line to determine the raggedness (degree of whitespace left on the end of each line) of a paragraph. But with this issues, am I better off using the GetWidth method of IWaxLine to get the width.
    Now, my next question would be, can I get the estimate width of the line if I change the properties of the paragraph, ie. justification settings, without actually composing the text in the ui. I need this so that I can compute for the optimal settings to changed so that the degree of raggedness of the paragraph would be less than the original.
    Thanks again!

  • SAPScript: how tu adjust heigh and width of standard text (logo)?

    Hi!
    how to adjust heigh and width of standard text (logo)?
    I do not want to edit the logo, because it is used elsewhere, so I need to adjust heigh and width when using it in a form.
    For now stadard text comes over the window. Here is how I use it:
    INCLUDE ZHEX-LOGO OBJECT TEXT ID ST
    Will reward,
    Mindaugas

    Hi Mindaugas,
    While uploading using RSTXLDMC. You have to maintain your size of the logo.
    Go through below mentioned document.
    Upload TIFF files to SAPscript texts
    Description
    The report RSTXLDMC allows a TIFF graphics file to be uploaded from the file system of the R/3 GUI to a standard text in the R/3 word processor SAPscript. (TIFF is a registered trademark of the Aldus Corporation.)
    When uploading, the TIFF graphic is converted either into a black and white raster image (parameter type=BMON ) or as a color raster image with a maximum of 256 colors (parameter type=BCOL).
    The black and white raster images ( BMON) can be printed using the following printer types:
    PCL-5 printer
    PostScript printer
    Kyocera PRESCRIBE printer
    Device type SAPWIN (with SAPlpd 32-bit as of Version 2.41 for Windows NT or Windows 95)
    The color raster images (BCOL) can be printed using the following printer types:
    PCL-5 printer with color capability (e.g. HP Color LaserJet). Color graphics are not printed properly on monochrome PCL-5 printers (e.g. HP LaserJet 5), because the printer cannot set the color palette as required and does not perform any gray-level conversion.
    PostScript printer (color graphics are automatically converted to gray levels on black and white printers using PostScript) Device type SAPWIN (with SAPlpd 32-bit as of Version 2.41 for Windows NT or Windows 95) During TIFF graphic import, the basic set " Baseline TIFF 6.0 " of the TIFF specification 6.0 is supported.
    To maintain compatibility with earlier versions of the report RSTXLDMC, it is also possible to convert the TIFF graphic directly into a black and white raster image for a particular printer type when uploading. These are the three printer types PCL-5 (parameter type=PCL ), PostScript (parameter type=POST) and Kyocera PRESCRIBE (parameter type=PRES ). A raster image uploaded in this manner can only be printed using the appropriate printer type.
    Besides TIFF raster graphics, direct printer commands in the respective printer language (PCL-5, PostScript or Prescribe) can also be contained in the file which is to be uploaded (printer macros). They are then transferred to the standard text unmodified.
    The graphics are output by inserting the standard text into the document which is to be printed, directly or using an INCLUDE command. The printer commands, which for example draw a company logo on the page, are only output if the print request is processed by the printer driver corresponding to the macro type, otherwise they are ignored. Example: A macro of type PCL is contained in a print request. If the request is output to a printer with type HPLJIIID (to which the driver HPL2 is assigned), the macro data is sent to the printer. If the request is printed on a printer of type POSTSCPT (to which the driver POST is assigned), the output of the macro data is suppressed.
    In the standard text, the printer commands are inserted between the HEX ... ENDHEX command lines in hex notation. Various report parameters allow the graphic or printer macro to be placed on the page or at the current text position. Note: When the /:HEX command line which precedes the macro appears in the text, a line break is generally made before the graphic is output. The output of the macro therefore begins in the next text line at the left window border of the current page window, as long as a shift to the right is not specified (see below).
    If your own printer macros are uploaded and not TIFF files, you must ensure yourself that the normal (text) output of the driver is not impaired when the printer commands are inserted in the output from the uploaded file. The printer drivers pass the data contained in the file to the printer unmodified, therefore without control over the individual actions this triggers on the printer. For example, syntax errors should not be generated by the PostScript commands (type POST), or form feeds should not be contained in the file (unless this was intended) for PCL-5 (type PCL).
    Restrictions:
    In general, the output of graphics generated via RSTXLDMC from R/3 is not suitable for mass printing (that is, unless you are using the "Graphic resident on printer" feature): the R/3 spooler has to hold significantly more data in its output files. If the graphics occur several times in a spool request, the data also reoccurs. Apart from this, the network is more heavily loaded in sending the increased volume of data to the printer and the printer output is slowed significantly (varies according to printer model) if raster graphics are output as well as the text.
    If your graphics reside on your printer during a printing job, the degree of 'correctness' with which they are printed depends on the amount of memory available in your printer. R/3 print drivers are unable to determine whether the amount of memory available is enough! If one of the graphics that you have marked as resident is not displayed, try reloading the graphic and switching off the parameter "Graphic resident on printer".
    When printing black and white graphics on PCL-5 printers, image data is compressed in order to greatly reduce the file size.
    The output of graphics and macros on PCL-5 printers, PostScript printers and device type SAPWIN (type BMON, BCOL, PCL, POST) is adapted to the page orientation used, that is if landscape is used instead of portrait, the graphic is also turned when output. This is not the case for the PRESCRIBE printers (type BMON, PRES)! With these printers, the graphic is not automatically turned when landscape is used, but appears on the page in the identical position as for portrait. You are therefore recommended not to output raster images when printing in landscape on PRESCRIBE printers.
    PRESCRIBE printers do not support the resolutions 200 and 600 dots per inch when printing raster images.
    Not all PCL-5 compatible printers support the resolutions 200 and 600 dots per inch when printing raster images.
    TIFF graphics with compression type 2 ("CCITT Group 3 1-Dimensional Modified Huffman run length encoding ") can currently not be imported although this is a component of the Baseline TIFF 6.0 specification for monochrome images.
    Color TIFF graphics with full color representation (ie. a lot more than 256 colors) are automatically converted into 256 gray levels when uploading with type BCOL.
    When TIFF graphics are converted to black and white raster images (type BMON, PCL, POST, PRES) there is no default simulation of gray levels or colors of the original image on the printer (for example, by using different tones of gray). Each pixel of the original image is converted to a white or black pixel on the printer according to its intensity value.
    The parameter "Number of TIFF gray levels" does, however, allow a simulation of gray/colour tones of the original image through levels of gray on the printer, when using type PCL, POST or PRES. This parameter is ignored for type BMON.
    The conversion of TIFF graphics can be so time-consuming that it is recommendable to execute the report RSTXLDMC in batch processing. Note: in batch, the file is always read from the file system of the application server (ie. not from the file system of the GUI).
    The length of an individual text in the text file is limited. When importing TIFF graphics with very large dimensions, especially if more than 2 gray levels are used, a termination can therefore occur when saving the standard text ("EXPORT_TOO_MUCH_DATA"). This restriction can only be avoided by reducing the TIFF graphics. Note: The display of a raster image in Postscript or PRESCRIBE format needs from two to three times as much space as displaying in PCL-5.
    When processing very large TIFF images on PostScript printers, a print termination can occur with PS error message "limitcheck". In this case the internal memory of the printer is insufficient to scale the required raster image. This implementation limit cannot be influenced by changing the report parameters when importing.
    Requirement
    The file which is to be uploaded can contain the following formats/ commands:
    Baseline TIFF 6.0 raster image files. The image information of the TIFF file is converted into black and white/color raster images when uploading. Note: As the TIFF format allows a variety of variants, only a basic set of TIFF 6.0 formats is supported here described in the TIFF 6.0 specification as Baseline TIFF 6.0.
    PCL : PCL-5, Hewlett Packard Printer Control Language 5 for HP LaserJet 3, 4, 5 series and compatible printers. The data is output by the printer driver HPL2 only.
    PRES: Kyocera PRESCRIBE for Kyocera laser printers. The data is output by the printer driver PRES only.
    POST: Adobe PostScript or EPS format (encapsulated PostScript ) for PostScript printers. The data is output by the printer driver POST only. In the upload, one of the end-of-file markers (CTRL-D, hex $04) which may be contained in the PostScript file is not transferred.
    For PostScript files which contain a bounding box entry (for example, all EPS files) the macro/graphic can be scaled to a size specified by the user. In this case, a small lead text and trailer are generated by the report for the macro data and inserted in the standard text.
    Parameters of RSTXLDMC
    File name
    Path and file name of the file to be uploaded in the file system of the R/3 frontend (dialog processing) or in the file system of the application server (batch processing)
    Type
    Way which the data contained in the file is to be converted. Possible values are BMON, BCOL, PCL, POST and PRES. With parameter values BMON and BCOL, a TIFF 6.0 file is expected. This is converted into either a black and white raster image (BMON) or a color raster image (BCOL). These raster images are printer-independent and can be printed using various printer types (see above).
    With parameter values PCL, POST and PRES, either a TIFF 6.0 file or a file with printer commands in the appropriate printer langauge is expected. If the file is a TIFF file, it is converted into a black and white raster image for the printer type specified in the parameter. The presence of a TIFF file is recognized automatically. If the file is not a TIFF file, the file contents are regarded as the printer macro of the respective type. Data loaded with type PCL, POST or PRES can only be printed on the respective printer type.
    Resolution for TIFF raster images
    Resolution which should be used when importing a TIFF raster image, in dots per inch (dpi). If an allowed value is entered here, this overrides the resolution information in the TIFF file. The allowed values are:
    75 dpi
    100 dpi
    150 dpi
    200 dpi (not for type PRES, for PCL only HP LaserJet 4,5 series)
    300 dpi
    600 dpi (not for type PRES, for PCL only HP LaserJet 4,5 series)
    Changing the resolution affects the size of the graphic on the printer. If a resolution of 300 dpi is stated in the TIFF file and this parameter is set to 75 dpi, the graphic is four times as big when printed as at the outset.
    Note: Kyocera PRESCRIBE printers do not support 200 and 600 dpi resolutions.
    Note: Not all PCL-5 printers support resolutions 200 and 600 dpi, for example HP LaserJet 3 series does not, but LaserJet 4 and 5 series do.
    Graphic Resident on Printer
    Normally, graphics that occur more than once in a printing job (a company logo that appears on each page, for example) are sent to the printer repeatedly each time they are needed. In order to avoid this kind of redundancy, you can select this checkbox on the selection screen. The R/3 print driver then stores the graphic in the printer's memory and the printer retrieves the 'resident' graphic memory every time that re-occurs in your job.
    Caution: Whether or not the printer correctly reproduces the graphic depends on the amount of memory available in the printer during the printing job! You should avoid using this feature with color graphics since they take up a lot more memory than monochrome graphics.
    This parameter can only be used with types "BMON" and "BCOL".
    Absolute positioning
    Determines whether the macro/graphic is positioned absolutely or is to be output at the current text position. If this checkbox is selected, the graphic is positioned absolutely (parameters "X-position" and "Y-position" are used), if this checkbox is not selected, the graphic is positioned at the current text position (parameters "Reserved height" and "Shift to right" are used)
    Absolute X-position
    Horizontal position (space from left border) of the macro/graphic, if absolute positioning is required. This is the parameter XPOS of the HEX command.
    Absolute Y-position
    Vertical position (space from upper border) of the macro/graphic, if absolute positioning is required. This is the parameter YPOS of the HEX command.
    Reserve height automatically
    If this checkbox is selected, the system automatically inserts the actual height of the graphic during printing into the subsequent "Reserved height" parameter.
    Reserved height
    If positioned at the current text position, this parameter specifies the horizontal spacing to be reserved for the macro/graphic, which must not be printed with text from the paragraph. This is the parameter HEIGHT of the HEX command.
    Shift to right
    If positioned at the current text position, this parameter specifies the space between the left border of the macro/graphic and the left border of the page window. If this value is increased, the macro/graphic is shifted to the right. This is the parameter LEFT of the HEX command.
    Unit of measurement for positioning
    The unit of measurement in which the position values (X,Y, height, shift) are specified. Possible values are CM (centimeters), MM (millimeters), IN (inches), PT (typographic point = 1/72 inch), TW (1/20 point = 1/1440 inch)
    Text title
    Comment used for the attribute "Title" of the standard text generated as well as as a comment line in the text itself
    Line width
    Number of columns to be used in the standard text when generating the HEX...ENDHEX command lines. The default value is 132
    Text name
    Name of the standard text to be generated. If an * character occurs in the name, it is replaced by the value of the parameter "Printer type". For example, if the entry is ZHEX-IMAGE1-* and the printer type = PCL, the text name ZHEX-IMAGE1-PCL is generated. The default value for the name is ZHEX-MACRO-<printer type>, but the standard text can be named as required (take into account customer reserve). Standard texts are client-dependent!
    Note: The name of a standard text can be up to 32 characters long !
    Text ID
    ID of the standard text to be generated. The default value is ST (general standard texts)
    Text language
    Language key of the standard text to be generated. The default value is the logon language
    PostScript scaling
    Flag which determines how the macros/graphics of type POST are handled. If set to 'X', the report expects a PostScript comment line in the file
    %%BoundingBox llx lly urx ury (e.g. %%BoundingBox -1.5 0 21.4 14.1)
    as present, for example, in all EPS files, in which the dimensions and the position of the macro/graphic are specified (if a bounding box comment is not included, 0 0 1 1 is assumed as the default value). This information is then used by the report to insert PostScript commands which scale the macro/graphic to the size specified in the parameters "Width" and "Height" (listed below).
    If the flag is set to ' ' (blank), the PostScript file is transferred to the standard text without any additions (any transformations to the coordinate system used by the printer driver must already be contained in the file).
    The flag must be set to 'X' for the import of TIFF files for type POST.
    Width according to PS scaling
    Required width of the macro/graphic if the flag PostScript scaling is set. Can remain at zero for the import of TIFF files, the size is then determined by the resolution of the graphic.
    Height according to PS scaling
    Required height of the macro/graphic if the flag PostScript scaling is set. Can remain at zero for the import of TIFF files, the size is then determined by the resolution of the graphic.
    If you want to scale the PostScript graphic with these parameters, one of the two values, width or height, can be specified with zero. The graphic is then scaled so that the width-to-height ratio remains unchanged and the original graphic is not distorted.
    Unit of measurement for PS scaling
    Unit of measurement in which the parameters "Width" and "Height" are specified. Possible values are CM (centimeters), MM (millimeters), IN (inches), PT (typographic point = 1/72 inch), TW (1/20 point = 1/1440 inch)
    Number of TIFF gray levels
    Number of gray tones which are to be used on the printer for displaying the original image. Note: This parameter is only evaluated when using types PCL, POST or PRES!
    Possible values are 2,4,9. With the default value 2, each pixel of the original image is converted either to a white or a black pixel on the printer. With the value 4, each pixel of the original image is converted on the printer with 4 pixels, which simulate 4 different gray levels. With the value 9, each pixel of the original image is converted on the printer with 9 pixels which simulate 9 different gray levels.
    Note: With values 4 or 9 the resolution of the image is doubled or tripled. The restrictions on the possible resolutions (see previous parameter) then apply for the resulting resolution.
    Output
    Individual steps of the upload procedure are logged in the report list generated and, if necessary, errors reported. The uploading of TIFF graphics, in particular, is cancelled if there is a variant which is not supported. A message to this effect is then issued. If execution is successful, the report generates a standard text with the key specified in the parameters. If the standard text already exists, a window appears with a warning before the text is overwritten.
    Regards,
    Ameer Baba.

  • Change line width in Apple Mail?

    Is there a way I can change the line width in the e-mails I write? Maybe a plug-in?

    Bump.
    Are these phantom extra line breaks and vanishing line breaks not occurring to anyone else?
    In Mail Preferences > Composing > Responding > Quote the text of the original message
    ...I tried disabling (unchecking) it, but it doesn't make much difference. Again, the problems occur in the body of a
    Message > Reply
    ...not a newly-created message. I've even pasted the body text into TextWrangler and done a "Zap Gremlins" and "Remove Line Breaks," but after I paste it back into Mail and reset my line breaks like I want, I still get extra and/or removed line endings when I review my sent message.

  • JLabel - calculating the number of lines in HTML wrapped text

    Hi folks,
    I've run into a problem. I have a JTable with row and column headers embedded within a JScrollPane. I have this component sized just how I like it. What I want to do is add a label above it serving as a title to the chart. I want this title to respect the width of the table - in other words, if the text within it is too long, I want it to wrap rather than to enlarge the size of the Table to fit it.
    I found that wrapping the title in "<html><center></center></html>" tags takes care of the wrapping. And furthermore I found code to handle the "dimension" of said label.
         * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4348815
        class WrappableJLabel extends JLabel {
               private final int preferredWidth;
               public WrappableJLabel(final int preferredWidth)
                  this.preferredWidth=preferredWidth;
               @Override
               public Dimension getPreferredSize()
                  Dimension superPreferred=super.getPreferredSize();
                  return new Dimension
                      (int) Math.min(preferredWidth,superPreferred.getWidth()),
                      (int) superPreferred.getHeight()
        }The problem is that the height does not get calculated correctly for the label. If I knew how many lines the JLabel's text took up, then I could multiply the height returned by the getPreferredSize() method by that number and get the correct size. I need to do all of this at compile time (so calling getHeight() on label doesn't help) so that I can size the JPanel holding both my table and my label to be of the correct size.
    Does anyone have any clues on how to do this?
    Thank you

    Maybe you need to calculate it yourself. The Java Developers Almanac 1.4 contains an general example:
    [http://www.exampledepot.com/egs/java.awt/TextDim.html|http://www.exampledepot.com/egs/java.awt/TextDim.html]
    You can obtain the font with the getFont() method on any component.

  • Line Graph - Line Width

    i am having line graph with 2 lines . lines are coming thicker by default i want to make one of the line in my graph thinner. how can i do that below is my graph xml
    chart:
    <Graph seriesEffect="SE_AUTO_GRADIENT" graphType="LINE_VERT_ABS" graphicAntialiasing="true">
    <LegendArea visible="true" />
    <Title text="Center Growth" visible="true" horizontalAlignment="CENTER">
    <GraphFont bold="true" italic="false" underline="false" />
    </Title>
    <SeriesItems>
    <Series id="0" color="#0000FF" />
    <Series id="1" color="#FF0000" />
    </SeriesItems>
    <O1Title text="Weeks" visible="true" />
    <Y1Title text="Attendances" visible="true" />
    <LocalGridData colCount="{count(xdoxslt:group(.//G_2,  'FWN'))}" rowCount="2">
    <RowLabels>
    <Label>RSum V</Label>
    <Label>RSum</Label>
    </RowLabels>
    <ColLabels>
    <xsl:for-each-group select=".//G_2" group-by="FWN" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <Label>
    <xsl:value-of select="current-group()/FWN" />
    </Label>
    </xsl:for-each-group>
    </ColLabels>
    <DataValues>
    <RowData>
    <xsl:for-each-group select=".//G_2" group-by="FWN" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <Cell>
    <xsl:value-of select="sum(current-group()/RSUM2[.!=''])" />
    </Cell>
    </xsl:for-each-group>
    </RowData>
    <RowData>
    <xsl:for-each-group select=".//G_2" group-by="FWN" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <Cell>
    <xsl:value-of select="sum(current-group()/RSUM1[.!=''])" />
    </Cell>
    </xsl:for-each-group>
    </RowData>
    </DataValues>
    </LocalGridData>
    </Graph>
    please let me know i what is the code i need to add to make my line line thinner.
    i checked line style but it didn't help..

    is it possible to control line width in line graph.i tried to look for the option to control the width of lines ,not able to find anything on this.

  • Line width of e-mail

    Some e-mail text displays with lines of fixed width, i.e., text appears as a column and doesn't fill the whole width of the pane. Is there a way to undo this, so that I have complete control of the width of text by resizing the pane?
    iMac PPC G5   Mac OS X (10.4.10)  

    The closest you can get is to use a fixed with font (such as Courier) and also don't hit the enter key at the end of each line of text unless you are at the end of a paragraph.

  • Check Box Line Width

    Hi. Is it possible to reduce the weight of check boxes? With some small boxes the default width seems heavy. Is there a way to change the width of the check box lines?

    Thanks for the response. I thought, aha, that's it! Well, I applied those changes and according to LiveCycle designer the changes were applied but the line width of each box remained unchanged. I then tried to change the color of the lines from black to grey to confirm if the settings were being effected. They were. Perhaps I am already at the lower limit of the box line width, but the printer can certainly handle finer lines as the text strokes literally more than twice as thin as the box lines. The box lines were originally .0069". I reduced that to .0030". The width of the boxes appears unchanged in both screen and paper print.

  • JavaFX, Display Line Chart with additional text

    Hello:
    I am new to Java and JavaFX. I have been able to create a line chart that has four series using example code from the Oracle Javafx Documentation home. Below is the syntax used to create the line chart once the series info has been populated:
    Scene scene = new Scene(lineChart,800,600);
    lineChart.getData().addAll(series1, series2, series3, series4);
    When I display the chart, I would also like to display additional text.
    My chart measures four different averages by month. I would like to use the text to give more info about each series (ex: 6 month and 1 year total avg for each series). The Line Chart and the text that I want to add do not need to be related. I will calculate the 6 & 12 month avg and list it in the text separately.
    I am struggling to find a way to display the line chart with a separate text field. If anyone can point me to some sample code that does something similar I would greatly appreciate it.
    Thanks,
    Troy

    Hi,
    My data points in my line chart are an average for a single month for each series.
    Ideally I would like a table as shown below centered under the Line Chart if possible (I was unable to use underscores or spaces to build the example. The + signs would really just be a line and the ' are used for spaces):
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++``````````````++``Series 1```++```Series 2```++``Series 3```++``Series 4``++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++6 Month Avg````++```5.6`````++``````7.8 ```++ ````4.8`````++`````8.4``++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++12 Month Avg```++```6.9`````++``````9.3 ```++ ````2.5`````++```5.7````++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Edited by: user8835022 on Jul 26, 2012 3:35 AM

  • Find the width of a text string inside a text box?

    Hi,
    I have a text box with a long text string in it. I would like to know what the width of the text string is so that I can scroll it inside the textbox using the text box scrollviewer.
    var sv = this.foodieItemText.GetFirstDescendantOfType<ScrollViewer>();
    sv.ScrollToHorizontalOffsetWithAnimation(this.foodieItemText.Width, 20);
    The scrolling works fine but I don't know what value to use for the width offset in the first argument to ScrollToHorizontalOffsetWithAnimation. For my purposes I want it to scroll the full length of the text string (which is longer than the actual with of
    the text box). Any ideas?

    Hi duffybr,
    Yes, there is a ScrollViewer inside TextBox template and we could scroll to the specific position as we need, however there is no direct way to get the string width in TextBox, however we could get the width in TextBlock, by measure method.
    See this discussion for more information:
    http://stackoverflow.com/questions/9126076/how-can-i-calculate-the-width-of-a-string-in-metro-without-displaying-it
    Besides, there are some third party libraries help us get the String width.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Report Logo - Displays on HTML, not on PDF report  (Apex report_)

    Hi Gurus. I thought I'd report this here, as we are having a BI Publisher error, and I'm not getting any help on the Apex subforum. +We have a system environment setup where we have BI Publisher Enterprise and Apex 3.1.2 talking together to create PD

  • Setting chart colors in palette.cxml

    I've modified the chart colors in two palette.xml files: /OracleBI/web/app/res/s_PeerApp/chartsupport /home/padmin/OracleBI/oc4j_bi/j2ee/home/applications/analytics/analytics/res/s_PeerApp/chartsupport Not working well at all – for both new and old c

  • 'All Photos' is sorted randomly. Cannot be changed.

    Ok, this is very frustrating. I have 10.10.3 and Photos 1.0 (209.52.0). I've just dragged about 9000 photos in Photos (all taken with my various iPhones over the years, correct metadata, EXIF, etc). Everything imported fine, with the exception that t

  • Asset capitalization in specific ledgers/depreciation areas

    Scenario: Example: Leading Ledger 0L: IFRS- Book depreciation 01 in AA u2013Posting to GL Non Leading Ledger  Z0: US GAAP Depreciation Area 04 in AA- Posting to GL Non leading ledger Z1 :JP GAAP:  No depreciation area in AA ( We donu2019t want to cap

  • Bug in latest 2 bios updates for FM2-A55M-E33

    Hey guys, Today I tried to update my bios of my FM2-A55M-E33 to the latest version(7721vA4.zip). Once everything completed succesfully, the bios wouldn't boot anymore. I plugged out my 3TB hdd and it worked fine. I installed an earlier version of the