Selecting Hebrew text uses incorrect line breaks
On both an iPhone and an Android device running the latest version of Adobe Reader (10.4), as well as in Adobe Reader XI on a Win7 laptop, using the text selection tool to select Hebrew text is inaccurate. Often the line breaks are incorrect due to the RTL nature of Hebrew text. Also, at times, words are skipped entirely within the text selection region.
I have tried this with multiple documents prepared by different PDF tools.
Has anyone else foudn a way to make text selection work correctly with Hebrew PDF files?
On both an iPhone and an Android device running the latest version of Adobe Reader (10.4), as well as in Adobe Reader XI on a Win7 laptop, using the text selection tool to select Hebrew text is inaccurate. Often the line breaks are incorrect due to the RTL nature of Hebrew text. Also, at times, words are skipped entirely within the text selection region.
I have tried this with multiple documents prepared by different PDF tools.
Has anyone else foudn a way to make text selection work correctly with Hebrew PDF files?
Similar Messages
-
Master Data Text Used as Line Items in ODS
Hi Experts! </br></br>
I would just like to know if I can use the text I loaded of master data Revenue Type from R/3 in BW? </br></br>
What I have done already is that I have created a customized extractor in R/3 under the CO-PA-IO node in RSA6 (since I think this is where this data is coming from/should belong under. A consultant of ours (before I got here) have already set up the other individual extractors for Sub Product A & B, Product Line, others in the FS10N transaction, document line item details.</br>Hi Experts! </br></br>
I would just like to know if I can use the text I loaded of master data Revenue Type from R/3 in BW? </br></br>
What I have done already is that I have created a customized extractor in R/3 under the CO-PA-IO node in RSA6 (since I think this is where this data is coming from/should belong under. A consultant of ours (before I got here) have already set up the other individual extractors for Sub Product A & B, Product Line, others in the FS10N transaction, document line item details.</br></br>
Once I have created it, I already replicated it in BW and have already setup the infosource. I created a InfoObject as Master Data with text and I loaded data from infosource. After loading, when I maintain Master Data for the characteristic I created in BW, I can see the pulled data that I have loaded from R/3. It is correct. </br></br>
Now this is where I am having a problem. I need to know how to be able to use this Master Data text when I load line items (0EC_PCA_3) to my PCA ODS. As it is right now, I have setup the EC_PCA datasource, replicated it and activated it as well, and I have already added a Revenue Type characteristic to this datasource already and have mapped it accordingly. However, I am unable to pull any data when i manage the contents of the ODS, but i can see the it in the maintain master data. </br></br>
How can i set it up such that I am also able to match my line items with their corresponding Rev Type Text in the ODS results? It is important to note that for Sub Product A, B, and Product Line fields, the previous setup is able to do so, and I am able to see results for these in the ODS line items results. These are also setup as master data text in BW by our previous consultant and I followed the same procedure and setup. </br></br>
I feel that I am just missing a step on how to tell BW that the master data text should also be matched to the Line Items in the ODS during loading.</br></br>
Kindly seeking for your assistance and advance thanks!
Once I have created it, I already replicated it in BW and have already setup the infosource. I created a InfoObject as Master Data with text and I loaded data from infosource. After loading, when I maintain Master Data for the characteristic I created in BW, I can see the pulled data that I have loaded from R/3. It is correct. </br></br>
Now this is where I am having a problem. I need to know how to be able to use this Master Data text when I load line items (0EC_PCA_3) to my PCA ODS. As it is right now, I have setup the EC_PCA datasource, replicated it and activated it as well, and I have already added a Revenue Type characteristic to this datasource already and have mapped it accordingly. However, I am unable to pull any data when i manage the contents of the ODS, but i can see the it in the maintain master data. </br></br>
How can i set it up such that I am also able to match my line items with their corresponding Rev Type Text in the ODS results? It is important to note that for Sub Product A, B, and Product Line fields, the previous setup is able to do so, and I am able to see results for these in the ODS line items results. These are also setup as master data text in BW by our previous consultant and I followed the same procedure and setup. </br></br>
I feel that I am just missing a step on how to tell BW that the master data text should also be matched to the Line Items in the ODS during loading.</br></br>
Kindly seeking for your assistance and advance thanks!Hi Simon, </br></br>
Thanks for the reply! </br></br>
First of all, yes, I think we are on the same page regarding what I want to do... I have created a master data infoObject in BW, created a customized extractor in R/3 under CO-PA-IO node, and mapped them to each other in BW such that when i execute a package in InfoSource in BW, i am able to load master data text in InfoObject Rev Type in BW. </br></br>
Kindly explain more on "you should have created the revenue type as a text datasource and loaded the data into the text and not the master data". Do you mean to say that I should have just created a regular datasource (i.e. Flexible Update in any Data Target InfoSource), rather than a direct update of Master Data datasource? </br></br>
However, if this is what you meant, please remember that for other characteristics such as Sub Product A, B, Product Lines, Sales Region, Business Center etc. (as seen in FS10N tcode per GL), are reflected in ODS per line item, and they are setup as master data. So I was thinking maybe i just missed a step in mapping. </br></br>
Is this what you meant? My main goal is to be able to have the line items i load in ODS be matched to the particular revenue type for that GL's profit center (seen in FS10N tcode in R/3)</br></br>
Thanks again. -
FXML - Line break for text-attribute (LABEL)
Hi!
How to define a text with a line break for a label in FXML?
For example, I cant get this to work (\n):
<Label text="Break\nLine"/> Thanks,
JörnHi,
If you use SceneBuilder Developer Preview 1.1 you will see that SceneBuilder generates this:
<Label layoutX="266.0" layoutY="172.0" text="Break Line" />To enter a new line in a text label in SceneBuilder is easy (even though a bit hidden).
If you hover the mouse over the label text property in the Inspector (right hand side), you will see a little cog menu fading in. If you click on it - you will be able to 'Switch to multi-lines mode' - you can then enter a text with new lines - then save the file and see how it's been handled...
hope this helps,
-- daniel -
How to handle line break embeded inside CSV column
Hi there,
I am under the pressure to make it work. I already put this question on APEX forum, but on second thought, I think it relates more to PL/SQL rather than APEX since APEX 4.1 already have utility to handle CSV Upload.
If you read it already in APEX forum, please ignore.
I am sorry for that. Thanks for reading.
I need to develop an app that allows user to upload CSV file to a interface table.
The APEX version at my workplace is 4.0.2.
I used the code from
http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:11000346061523
It all works well till recently I find out
If a column in a CSV file cotain a line break (or new line) e.g. (The tester copy and paste this text which has line break into a column in a spreadsheet)
This is the first sentence.
This is the second sentence.
It will break the “This is the second sentence”. To a new column.
The contents of the CSV viewed in Notepad look as below
Assessment Date,Scheduled Date,Assessment Provider,Assessor Name,Court,First Name,Middle Name,Last Name,PRN Person Record Number,NHI Number,Defendant Attended Y/N,Is Dependent Y/N,Notes,Primary Ethnicity,"Ethnicity Other, please specify",Gender,Currently in Treatment Y/N,Substance of Concern 5,Other Substance Specified
22/09/2012,,Provider Co Name,Warren Edgley,Wellington,,,Salty,2545554,dgsdf,ergerg,,"This is the first sentence.
This is the second sentence.",Japanese,,Female,b,,
Here is the code from the CSV UTIL, please help me to find out how can I replace the line break to a space so that the uploading process is correct.
CREATE OR REPLACE PACKAGE BODY "CSV_UTIL"
AS
--strip the beginning and the end quotes, then replace double quotation with single
FUNCTION de_quote (p_str IN VARCHAR2, p_enc_by IN VARCHAR2)
RETURN VARCHAR2
IS
v_str VARCHAR2(32767) := p_str;
BEGIN
IF (p_enc_by IS NULL)
THEN
RETURN p_str;
ELSE
IF SUBSTR(p_str,-1) = p_enc_by THEN
v_str := SUBSTR(p_str,1,LENGTH(p_str)-1);
END IF;
IF SUBSTR(p_str,1,1) = p_enc_by THEN
v_str := SUBSTR(v_str,2);
END IF;
RETURN REPLACE (v_str,
p_enc_by || p_enc_by,
p_enc_by
END IF;
END de_quote;
PROCEDURE parse (p_str IN VARCHAR2, p_enc_by IN VARCHAR2, p_sep IN VARCHAR2)
IS
l_n NUMBER DEFAULT 1;
l_in_quote BOOLEAN DEFAULT FALSE;
l_ch NCHAR (1);
l_len NUMBER DEFAULT NVL (LENGTH (p_str), 0);
BEGIN
IF (l_len = 0)
THEN
RETURN;
END IF;
g_words := g_empty;
g_words (1) := NULL;
FOR i IN 1 .. l_len
LOOP
l_ch := SUBSTR (p_str, i, 1);
IF (l_ch = p_enc_by)
THEN
l_in_quote := NOT l_in_quote;
END IF;
IF (l_ch = p_sep AND NOT l_in_quote)
THEN
l_n := l_n + 1;
g_words (l_n) := NULL;
ELSE
g_words (l_n) := g_words (l_n) || l_ch;
END IF;
END LOOP;
g_words (l_n) := de_quote (g_words (l_n), CHR(10));
g_words (l_n) := de_quote (g_words (l_n), CHR(13));
FOR i IN 1 .. l_n
LOOP
g_words (i) := de_quote (g_words (i), p_enc_by);
END LOOP;
END parse;
Author: Oleg Lihvoinen
Company: DbSWH
Changes:
10.02.2011, There was a miscalculation of the file line last position in case it is the end of file
PROCEDURE upload (p_file_name VARCHAR2, p_collection_name VARCHAR2, p_enc_by IN VARCHAR2, p_sep_by IN VARCHAR2, p_rows NUMBER)
IS
v_blob_data BLOB;
v_clob_data CLOB;
v_clob_len NUMBER;
v_position NUMBER;
v_char NCHAR (1);
c_chunk_len NUMBER := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array vcarray;
v_rows NUMBER := 0;
n_seq NUMBER := 1;
dest_offset NUMBER := 1;
src_offset NUMBER := 1;
amount INTEGER := DBMS_LOB.lobmaxsize;
blob_csid NUMBER := DBMS_LOB.default_csid;
lang_ctx INTEGER := DBMS_LOB.default_lang_ctx;
warning INTEGER;
l_sep VARCHAR2(100) := CASE WHEN p_sep_by = '\t' THEN chr(9) ELSE p_sep_by END;
BEGIN
htmldb_collection.create_or_truncate_collection
(p_collection_name => p_collection_name);
-- Read blob from wwv_flow_files
SELECT blob_content
INTO v_blob_data
FROM wwv_flow_files
WHERE NAME = p_file_name;
v_position := 1;
DBMS_LOB.createtemporary (lob_loc => v_clob_data,
CACHE => TRUE,
dur => DBMS_LOB.SESSION
DBMS_LOB.converttoclob (v_clob_data,
v_blob_data,
amount,
dest_offset,
src_offset,
blob_csid,
lang_ctx,
warning
v_clob_len := DBMS_LOB.getlength (v_clob_data);
IF v_clob_len = 0 THEN
RETURN;
END IF;
WHILE (v_position <= v_clob_len + 1)
LOOP
v_char := DBMS_LOB.SUBSTR (v_clob_data, c_chunk_len, v_position);
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When the whole line is retrieved and not end of file or end of file
IF v_char = CHR (10) AND v_position < v_clob_len OR v_position = v_clob_len + 1
THEN
parse (p_str => v_line, p_enc_by => p_enc_by, p_sep => l_sep);
v_data_array := g_words;
FOR i IN 1..g_words.count LOOP
IF i <= 50 THEN
v_data_array(i) := g_words(i);
ELSE
exit;
END IF;
END LOOP;
FOR i IN g_words.count + 1..50 LOOP
v_data_array(i) := null;
END LOOP;
v_rows := v_rows + 1;
-- exit if uploaded specified number of rows
IF p_rows IS NOT NULL AND v_rows > p_rows THEN
EXIT;
END IF;
-- Store data to collection
n_seq :=
htmldb_collection.add_member
(p_collection_name => p_collection_name,
p_c001 => v_data_array
(1),
p_c002 => v_data_array
(2),
p_c003 => v_data_array
(3),
p_c004 => v_data_array
(4),
p_c005 => v_data_array
(5),
p_c006 => v_data_array
(6),
p_c007 => v_data_array
(7),
p_c008 => v_data_array
(8),
p_c009 => v_data_array
(9),
p_c010 => v_data_array
(10),
p_c011 => v_data_array
(11),
p_c012 => v_data_array
(12),
p_c013 => v_data_array
(13),
p_c014 => v_data_array
(14),
p_c015 => v_data_array
(15),
p_c016 => v_data_array
(16),
p_c017 => v_data_array
(17),
p_c018 => v_data_array
(18),
p_c019 => v_data_array
(19),
p_c020 => v_data_array
(20),
p_c021 => v_data_array
(21),
p_c022 => v_data_array
(22),
p_c023 => v_data_array
(23),
p_c024 => v_data_array
(24),
p_c025 => v_data_array
(25),
p_c026 => v_data_array
(26),
p_c027 => v_data_array
(27),
p_c028 => v_data_array
(28),
p_c029 => v_data_array
(29),
p_c030 => v_data_array
(30),
p_c031 => v_data_array
(31),
p_c032 => v_data_array
(32),
p_c033 => v_data_array
(33),
p_c034 => v_data_array
(34),
p_c035 => v_data_array
(35),
p_c036 => v_data_array
(36),
p_c037 => v_data_array
(37),
p_c038 => v_data_array
(38),
p_c039 => v_data_array
(39),
p_c040 => v_data_array
(40),
p_c041 => v_data_array
(41),
p_c042 => v_data_array
(42),
p_c043 => v_data_array
(43),
p_c044 => v_data_array
(44),
p_c045 => v_data_array
(45),
p_c046 => v_data_array
(46),
p_c047 => v_data_array
(47),
p_c048 => v_data_array
(48),
p_c049 => v_data_array
(49),
p_c050 => v_data_array
(50)
-- Clear the line
v_line := NULL;
END IF;
END LOOP;
END;
END;In my apps, I save these straight into a table rather than an APEX collection because the number of columns can be longer than 50.
I want to find out how can replace these line break inside a column to a space.
If any one has any ideas, please let me know.
Thanks a lot in advance.
AnnAnn586341 wrote:
I think the code split the whole thing by this line
-- When the whole line is retrieved and not end of file or end of file
IF v_char = CHR (10) AND v_position < v_clob_len OR v_position = v_clob_len + 1
THEN
Yes, exactly. That piece of code believes all CHR(10) occurences are record delimiters.
It is not smart enough to recognize that a CHR(10) within quotation marks are part of the data.
Optimally a solution should keep the CHR(10) rather than replacing with spaces, but that will be a bigger rewrite of the UTL_CSV code ;-)
If you are happy with replacing with spaces, a "simple" solution could be something like:
Declare a boolean variable in upload procedure:
v_within_text_column boolean := false;And use it like this:
WHILE (v_position <= v_clob_len + 1)
LOOP
v_char := DBMS_LOB.SUBSTR (v_clob_data, c_chunk_len, v_position);
IF v_char = '"' THEN
v_within_text_column := NOT v_within_text_column;
ELSIF v_char = CHR(10) AND v_within_text_column THEN
v_char := ' ';
END IF;
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When the whole line is retrieved and not end of file or end of file
IF v_char = CHR (10) AND v_position < v_clob_len OR v_position = v_clob_len + 1
THEN
v_within_text_column := false; -- To be safe always set this on "true" linebreaks
{code}
+(This is untested code just written here in the text editor.)+
It should work by toggling a flag whether you are "within" the quotes or not and then replacing CHR(10) with a space if you are within a text column.
This way we avoid having to go through the clob more than once (it is enough that this code walks the clob one character at a time...)
It will not handle if the clob contains situations like:
{code}
abc,123,"This is a text with a quote from a man who said \"To Be,
or Not To Be\" some hundred years ago",123,xyz
{code}
Escaped quotes would need separate attention ;-) -
Applescript batch convert DOC to TXT with line breaks
Hey guys, I recently got stuck at work having to convert over 1,000 DOC files to TXT files with line breaks.
I've found online several different Applescripts that work great at converting DOC files to TXT files but I can't find one that will do the TXT files with line breaks.
If anyone has a script that can do this I would be crazy grateful.
Converting these one by one with Word is taking forever to do.
Thanks for any help you can give me.Excuse me for a moment for speaking harshly to you. You are causing yourself utterly unnecessary headaches by not being clear with us and not stopping to think, and it's high time you learned that that is an incorrect way to approach anything on a computer. Consider:
you don't know what you're doing (in the sense that you don't know what 'text with line breaks' means)
you don't know (or at least haven't explained) why this needs to be done
(therefore) you don't know if this needs to be done at all
(and yet) you are doing it anyway, in a mindlessly repetitive fashion, driving yourself batty and irritating me
At least for the time being, humans are the ones who think and computers the ones who grunt away mindlessly; try to reverse those roles and everything gets done badly and slowly. Stop, look, think, plan ahead - that's what your brain is good at if you give it a chance.
Now, as far as I can tell from poking around the web, 'text only with line breaks' means that the document is saved as a plain-text file, but with a carriage return linefeed combination (CR/LF) as a paragraph delimiter (this is a Windows format - unix uses a single linefeed, Macs might use a single carriage return or a single linefeed). I don't know why anyone would want that format - most software will convert that seamlessly (or at least can be told to convert that). Are you trying to feed this into some dinosaur of a database? At any rate, if that's what you want, this script should do it. caution, this script overwrites the original files; I suggest you make a copy of one or two files in a separate folder, and run the script on them first to check that the output works for whatever reason you're doing this:
set baseFolder to choose folder with prompt "Choose a folder of files to process"
tell application "Finder"
set fileList to (every file of baseFolder whose name extension is "txt") as alias list
end tell
repeat with thisFile in fileList
set itsText to read thisFile
if (offset of (return & linefeed) in itsText) = 0 then
-- file is not already formatted with CR/LF, so convert
set itsChunks to tid(itsText, {return, linefeed})
set itsNewText to tid(itsChunks, return & linefeed)
set fp to open for access thisFile with write permission
set eof of fp to 0
write itsNewText to fp as text
close access fp
end if
end repeat
on tid(input, delim)
-- handler for text items conversions
set {oldTID, my text item delimiters} to {my text item delimiters, delim}
if class of input is list then
set output to input as text
else
set output to text items of input
end if
set my text item delimiters to oldTID
return output
end tid -
Can someone help me?
I just wanna make a line break in a txt file...
I tried it this way
FileWriter fw = new FileWriter("W:\\write.txt");
fw.write(string1 + "\n" + string2);
fw.close();
I don't know why it doesn't work.
in the file it apears just a black block, but if i copy it in this text area, theres automaticly a line break
thx for your support
GuardianEverything has been said, but I thought I'll just make it more clearly :-)
The thing is:
Unix use a line break; <or was it vice versa>
Afterwards someone decided text had to be devided in linebreaks and paragraph;
That's why you have <p> and <br> in html
Now line break just means, I'm on the end of a line and i must break but i don't want to
so please if you can, hold it on the same line when displaying.
So to keep multiple platform oparability it's a good thing to use both:
newline character + carriage return = break to other line -
Line break symbol in WAD Chart
Hi,
We have WAD 3.5 but Query Designer 7.0. And Internet Explorer 7.
We have a query where the column description has been split in two lines in the Query Designer.
When this query is put as chart in WAD a strange symbol is shown where the text is supposed to be split (and the line is not split, but that is less of an issue.)
However when the same query is put as table in WAD, everything is fine.
Any suggestions on getting rid of this symbol?
Thanks in advance for your feedback.
ReynirHi Reynir,
I too have encountered the enter symbol in the Chart Legend. I think the only way to get rid of the same is to avoid using a line break in the Char desc in Query Designer, use a separator ( ) or so to denote what you wish to on the 2nd line - but that would make the col width too wide in the table view.
--Priya -
Line breaks and wrapping incorrect on hebrew+english text
i have a string of mixed text with hebrew and english, usually the english is only the last word in the string.
when trying to show on a limited space (110px more or less) the line break looks like it performs incorrectly since the string is all mixed and it shows the english word in between the hebrew words.
I'm using the following, in a *pure* as3 project in the flex ide using sdk 3.5 and last version textframework swc.
private function addText():void{
//title is a string brought from xml.
title = "Canazei סקי איטלקי במיטבו בעיירה";
var titleLine:StringTextLineFactory = new StringTextLineFactory();
titleLine.text = title;
titleLine.paragraphFormat
titleLine.compositionBounds = new Rectangle(0,0,120,120);
titleLine.spanFormat = formatMe(blue, 12, "bold");
titleLine.createTextLines(callbackTitle);
function callbackTitle(tl:TextLine):void{
addChild(tl);
tl.y = 12;
tl.x = 109 - tl.width;
//thats the formatMe function:
public function formatMe(colour:uint, size:uint, weight:String):TextLayoutFormat{
characterFormat = new TextLayoutFormat();
characterFormat.fontSize = size;
characterFormat.color = colour;
characterFormat.direction = flashx.textLayout.formats.Direction.LTR;
characterFormat.textAlign = flashx.textLayout.formats.TextAlign.START;
characterFormat.fontFamily = "Arial, Helvetica, _sans";
characterFormat.lineHeight = "100%";
if (weight == "bold"){
characterFormat.fontWeight = flash.text.engine.FontWeight.BOLD;
return characterFormat;
any help with this will be greatly appreciated, unfortunately the bidi support is not clear and sometimes the examples in the docs are not working.I played around with your example a little, and removed the explicit line placement you added, and have this (see below). It works as expected if you consider English the dominant language. If you wanted it to assume Hebrew instead, you should set the direction to RTL instead of LTR. Please let me know if this works for you.
Thanks!
package
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.factory.StringTextLineFactory;
import flashx.textLayout.formats.TextLayoutFormat;
import flash.geom.Rectangle;
import flash.display.Sprite;
import flash.text.engine.TextLine;
public class TCMTestFocus extends Sprite
public function TCMTestFocus():void{
//title is a string brought from xml.
var title:String = "Canazei סקי איטלקי במיטבו בעיירה";
var titleLine:StringTextLineFactory = new StringTextLineFactory();
titleLine.text = title;
titleLine.paragraphFormat
titleLine.compositionBounds = new Rectangle(0,0,120,120);
titleLine.spanFormat = formatMe(0x0000FF, 12, "bold");
titleLine.createTextLines(callbackTitle);
function callbackTitle(tl:TextLine):void{
addChild(tl);
// tl.y = 12;
// tl.x = 109 - tl.width;
public function formatMe(colour:uint, size:uint, weight:String):TextLayoutFormat{
var characterFormat:TextLayoutFormat = new TextLayoutFormat();
characterFormat.fontSize = size;
characterFormat.color = colour;
characterFormat.direction = flashx.textLayout.formats.Direction.LTR;
characterFormat.textAlign = flashx.textLayout.formats.TextAlign.START;
characterFormat.fontFamily = "Arial, Helvetica, _sans";
characterFormat.lineHeight = "100%";
if (weight == "bold"){
characterFormat.fontWeight = flash.text.engine.FontWeight.BOLD;
return characterFormat; -
Ignore Line break in find text using grep
Hi everyone!
I need to find the text in document using grep.
find text for :
Xereptatiuria que alique volo eium qui dolupid ut
voluptatiam earum saestorepel iuscit im quas et modisimodit.
The above sentence cannot having line breaks. But document having multiple line breaks.
so, please to give a tip to find the text using grep.
I am not excepting this type of result by following.
Xereptatiuriaque\n alique volo\neium qui dolupid ut\r voluptatiam earum\n saestorepel iuscit im quas et\n modisimodit. ------------this is not.
Any another way to find (i.e)., ignore the line break
simply like this,
(?s:Xereptatiuria que alique volo eium qui dolupid ut
voluptatiam earum saestorepel iuscit im quas et modisimodit.) --------- the line break wherever it is found,ignore line break in single command.
Thanks by,
John Peter.johnp45247251,
what do you really want to do?
Like pkahrel in your other thread Find Grep And Ignore the line break said:
pkahrel schrieb:
You're a moving target: you change your question in each post. Do yourself a favour and go and read up on GREP.
johnp45247251, one question:
Could it be possible, that you doesn't understand correctly, how Grep really works?
<edit by pixxxel schubser>
Furthermore your example text is different to your screenshot. Your text is:
»Xereptatiuriaque\n alique volo\neium qui dolupid ut\r voluptatiam earum\n saestorepel iuscit im quas et\n modisimodit.«
And your screenshot shows:
»Xereptatiuriaque\n alique volo\n eium qui dolupid ut \rvoluptatiam earum\n saestorepel iuscit im quas et\n modisimodit.«
Normally the text should look like this:
»Xereptatiuriaque\nalique volo\neium qui dolupid ut\rvoluptatiam earum\nsaestorepel iuscit im quas et\nmodisimodit.«
Please explain what do you really want to do and exactly if additional spaces are exists or not!
Could it be:
you have a text with paragraphs and with many line breaks in that paragraph and there are no spaces exists before or after your line breaks. And is your destination to remove all the line breaks from your text?
</edit by pixxxel schubser>
Then the way is not to find the text completly and to ignore the line breaks – the way is to find the line breaks and replace with a space, e.g. like that:
find:
\n
replace with:
\s
(change all)
Regards
pixxxel schubser -
Javascript: select all text, break link to style
Hi
I'd like to select all text in a Document (in different independent textboxes) and then break the link to it's style (in the program in the Flyout-menu of the paragraph styles)
Is this function scriptable (javascript)?
How do I select all the text?
InDesign CS6, OS10.7.4
ThanksIn fact, I use the adobe findchangebylist to modified, I want to do a clear setting script, not only break link to style, but when i run the script that will get error, can u help me to fix it, my script is shown as below:
main();
function main(){
var myObject;
//var myCheckSelection = false;
//Make certain that user interaction (display of dialogs, etc.) is turned on.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
if(app.documents.length > 0){
if(app.selection.length > 0){
switch(app.selection[0].constructor.name){
case "InsertionPoint":
case "Character":
case "Word":
case "TextStyleRange":
case "Line":
case "Paragraph":
case "TextColumn":
case "TextFrame":
case "Text":
case "Cell":
case "Column":
case "Row":
case "Table":
myDisplayDialog();
break;
default:
//Something was selected, but it wasn't a text object, so search the document.
//myFindChangeByList(app.documents.item(0));
//alert("Nothing Selected, Please Select Text Frame or Text.");
else{
//Nothing was selected, so simply search the document.
//myFindChangeByList(app.documents.item(0));
alert("Nothing Selected, Please Select Text Frame or Text.");
else{
alert("No documents are open. Please open a document and try again.");
function myDisplayDialog(){
var myObject;
var myDialog = app.dialogs.add({name:"Joan New Clear Setting_v1.0"});
with(myDialog.dialogColumns.add()){
with(dialogRows.add()){
with(dialogColumns.add()){
staticTexts.add({staticLabel:"Search Range:"});
var mySearchButtons = radiobuttonGroups.add();
with(mySearchButtons){
radiobuttonControls.add({staticLabel:"Current Document", checkedState:true});
if(app.selection[0].contents != ""){
radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
with(dialogColumns.add()){
with(borderPanels.add()){
staticTexts.add({staticLabel:"Clear Setting:"});
var myDateButtons = radiobuttonGroups.add();
with(myDateButtons){
radiobuttonControls.add({staticLabel:"English", checkedState:true});
radiobuttonControls.add({staticLabel:"Chinese"});
var myResult = myDialog.show();
if(myResult == true){
switch(mySearchButtons.selectedButton){
case 0:
BreakLinktoStyleDocument();
TurnOffHyphenationDocument();
myObject = app.documents.item(0);
myCheckSelection = false;
break;
case 1:
BreakLinktoStyleSelection();
TurnOffHyphenationSelection();
myObject = app.selection[0];
myCheckSelection = true;
break;
switch(myDateButtons.selectedButton){
case 0:
myFindChangeByList1(myObject, myCheckSelection);
break;
case 1:
myFindChangeByList2(myObject, myCheckSelection);
break;
myDialog.destroy();
//myFindChangeByList1(myObject);
else{
myDialog.destroy();
function TurnOffHyphenationDocument() {
app.activeDocument.stories.everyItem().texts.everyItem().hyphenation=false;
myTables = app.activeDocument.stories.everyItem().tables.everyItem();
myTables.cells.everyItem().paragraphs.everyItem().hyphenation=false;
function TurnOffHyphenationSelection() {
app.selection[0].texts[0].hyphenation=false;
app.selection[0].cells.everyItem().texts[0].hyphenation=false;
function BreakLinktoStyleDocument() {
app.activeDocument.stories.everyItem().texts.everyItem().applyParagraphStyle(app.activeDoc ument.paragraphStyles.item(0), false);
app.activeDocument.stories.everyItem().texts.everyItem().applyCharacterStyle(app.activeDoc ument.characterStyles.item(0), false);
myTables = app.activeDocument.stories.everyItem().tables.everyItem();
myTables.cells.everyItem().paragraphs.everyItem().applyParagraphStyle( app.activeDocument.paragraphStyles.item(0), false);
myTables.cells.everyItem().paragraphs.everyItem().applyCharacterStyle( app.activeDocument.characterStyles.item(0), false);
function BreakLinktoStyleSelection() {
app.selection[0].texts.everyItem().applyParagraphStyle(app.activeDocument.paragraphStyles. item(0), false);
app.selection[0].texts.everyItem().applyCharacterStyle(app.activeDocument.characterStyles. item(0), false);
app.selection[0].cells.everyItem().texts[0].applyParagraphStyle(app.activeDocument.paragra phStyles.item(0), false);
app.selection[0].cells.everyItem().texts[0].applyCharacterStyle(app.activeDocument.charact erStyles.item(0), false);
function myFindChangeByList1(myObject, myCheckSelection){
var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit;
var myStartCharacter, myEndCharacter;
var myFindChangeFile = myFindFile("/ScriptSupport/te.txt")
if(myFindChangeFile != null){
// Because the selection will change as we add/remove characters,
// we'll need to reset the selection after each pass if we are
// checking the selection. We'll get the index of the first character
// in the selection (relative to the start of its parent story) and
// the index of the last character in the selection (relative to the
// *end* of the story, and we'll use them later in the script to
// keep the ends of the selection in place.
if(myCheckSelection == true){
var myStart = myObject.characters.item(0).index;
var myEnd = myObject.characters.item(-1).index;
var myStory = myObject.parentStory;
var myStoryEnd = myStory.characters.item(-1).index;
myEnd = (myStoryEnd - myEnd)+1;
myFindChangeFile = File(myFindChangeFile);
var myResult = myFindChangeFile.open("r", undefined, undefined);
if(myResult == true){
//Loop through the find/change operations.
do{
myLine = myFindChangeFile.readln();
//Ignore comment lines and blank lines.
if((myLine.substring(0,4)!="text")||(myLine.substring(0,4)!="grep")||(myLine.substring(0, 5)!="glyph")){
myFindChangeArray = myLine.split("\t");
//The first field in the line is the findType string.
myFindType = myFindChangeArray[0];
//The second field in the line is the FindPreferences string.
myFindPreferences = myFindChangeArray[1];
//The second field in the line is the ChangePreferences string.
myChangePreferences = myFindChangeArray[2];
//The fourth field is the range--used only by text find/change.
myFindChangeOptions = myFindChangeArray[3];
switch(myFindType){
case "text":
myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
case "grep":
myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
case "glyph":
myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
if(myCheckSelection == true){
myStartCharacter = myStory.characters.item(myStart);
myEndCharacter = myStory.characters.item(-myEnd);
myObject = myStory.texts.itemByRange(myStartCharacter, myEndCharacter);
app.select (myObject);
} while(myFindChangeFile.eof == false);
myFindChangeFile.close();
alert("Done");
function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change preferences before each search.
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
app.findChangeTextOptions = NothingEnum.nothing;
var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
myFoundItems = myObject.changeText();
//Reset the find/change preferences after each search.
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
app.findChangeTextOptions = NothingEnum.nothing;
function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change grep preferences before each search.
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences = NothingEnum.nothing;
app.findChangeGrepOptions = NothingEnum.nothing;
var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
var myFoundItems = myObject.changeGrep();
//Reset the find/change grep preferences after each search.
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences = NothingEnum.nothing;
app.findChangeGrepOptions = NothingEnum.nothing;
function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change glyph preferences before each search.
app.changeGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
app.findChangeGlyphOptions = NothingEnum.nothing;
var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
var myFoundItems = myObject.changeGlyph();
//Reset the find/change glyph preferences after each search.
app.changeGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
app.findChangeGlyphOptions = NothingEnum.nothing;
function myFindFile(myFilePath){
var myScriptFile = myGetScriptPath();
var myScriptFile = File(myScriptFile);
var myScriptFolder = myScriptFile.path;
myFilePath = myScriptFolder + myFilePath;
if(File(myFilePath).exists == false){
//Display a dialog.
myFilePath = File.openDialog("Choose the file containing your find/change list");
return myFilePath;
function myGetScriptPath(){
try{
myFile = app.activeScript;
catch(myError){
myFile = myError.fileName;
return myFile;
and here is my text file, te.txt
//001
grep {findWhat:"."} {appliedLanguage: app.languagesWithVendors.item("English: USA"), kerningMethod: "無"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
//002
grep {findWhat:"."} {kinsokuSet: "繁體中文避頭尾(s)"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
//003
grep {findWhat:"."} {mojikumi: "nothing"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
//004
grep {findWhat:"."} {ligatures:false} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
//005
grep {findWhat:"."} {gridAlignment: 1852796517} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
//006
grep {findWhat:"."} {leadingModel: 1248619858} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true}
//007
grep {findWhat:"."} {characterAlignment: 1247896172} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, includeLockedStoriesForFind:true, widthSensitive:true} -
Selecting type with text tool - grabbing lines
This is has happened in the past but much more so with my current version of illustrator (I have CS2). When I use the text tool to revise text, it seems to want to select whatever lines are closest to the text rather than the text. This is very frustrating - I want my text tool to select whatever TEXT it is closest too, not lines. Is this a fault of the program or is there a setting somewhere I can change to make this happen less, or preferably, not at all?
Pressing Alt is
supposed to force-toggle the infuriating text tool between the TypeTool and the TypeOnAPathTool.
So if the path that you don't want to turn into a PathType object is an open unfilled path (like a manually-drawn underline, and it is in front of the text object you want to edit, this seems to work, when the TypeTool is selected:
1. Press Ctrl to momentarily invoke the most recently-used pointer. Select the underlying text object.
2. Release Ctrl. The TypeTool cursor returns. Note that when the cursor is in proximity to the path, it changes to the TypeOnAPathTool cursor (the one with the wavy line).
3. Press Alt. Note that the cursor changes to the TypeTool, and has a circle around it. Click and you should enter the text, not create a PathType object.
However, as far as I can figure out (actually, as far as I can bear to muck with this awful interface), this does not work correctly if the unwanted path is filled. Try this:
1. Create a text object with some text in it.
2. Draw a filled rectangle that overlays just part of the text.
3. TypeTool: Press Alt to momentarily invoke a pointer. Click the text object to select it.
4. Release Alt. TypeTool comes back.
5. Hover within proximity to the filled rectangle. The cursor becomes the normal TypeTool cursor enclosed in a circle.
This suggests that a click will enter the text, not create a PathType. Alas, it creates a PathType anyway. Try it again, this time pressing Alt. Pressing Alt makes the cursor change to the TypeOnAPath cursor, with no circle around it. Clicking creates a PathType.
Worst text-handling interface I have ever seen.
JET -
File adapter-How to set line break in text file-split record into two lines
Dear Guru's,
I have to solve following problem with XML (with mulitiple records) to TEXT file scenario using file adapter. I have to output for ever ONE data record in XML always two identical lines in text file. Second line should have a little bit different mapping in few fields like date,... So I did duplicate fileds in my output structure in mapping and need to know how to set line break in the middle and see half of structure in first line and next structure half in second line
My output structure in mapping is:
CASHFLOW
- INTERFACE
- GESELLSCHAFT
- ANWENDUNG
- PRODUKT
- VERTRAG
- BETRAG
- WAEHRUNG
- DIRECTION
- BEWEGUNGSTYP
- FAELLIGKEIT
- ZINSFESTSTELLUNG
- ZAHLUNGSTAG
- RENDITE
- INTERFACE2
- GESELLSCHAFT2
- ANWENDUNG2
- PRODUKT2
- VERTRAG2
- BETRAG2
- WAEHRUNG2
- DIRECTION2
- BEWEGUNGSTYP2
- FAELLIGKEIT2
- ZINSFESTSTELLUNG2
- ZAHLUNGSTAG2
- RENDITE2
Question is how can I set on receiving file adapter in Content Conversion Parameters that fields from first structure half INTERFACE...RENDITE should be outputed in one line and fields from second half of structure INTERFACE2...RENDITE2 should start on second line in final text file.
I'm getting at the moment one line only and I need to know how can set line break so that second line starting with INTERFACE2(CA)...RENDITE2 will start in new line.
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000",CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
This should be final output:
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000"
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
My file adapter settings:
RecordsetStructure=CASHFLOW
CASHFLOW.fieldNames=INTERFACE,GESELLSCHAFT,ANWENDUNG,PRODUKT,VERTRAG,BETRAG,WAEHRUNG,DIRECTION,BEWEGUNGSTYP,FAELLIGKEIT,ZINSFESTSTELLUNG,ZAHLUNGSTAG,RENDITE
CASHFLOW.fieldSeparator=,
CASHFLOW.endSeparator='nl'
CASHFLOW.fieldNames=INTERFACE2,GESELLSCHAFT2,ANWENDUNG2,PRODUKT2,VERTRAG2,BETRAG2,WAEHRUNG2,DIRECTION2,BEWEGUNGSTYP2,FAELLIGKEIT2,ZINSFESTSTELLUNG2,ZAHLUNGSTAG2,RENDITE2
CASHFLOW.fieldSeparator=,
It wont help if I add two identical structures in mapping because in output i would see for multiple entries section with first lines only and after that section with second lines only. And CASHFLOW is one part of more complex mapping ...
(This is final output structure RecordsetStructure=HEADER,CASHFLOW,CONDITION,REFERENCE,CONTRACT - more sections with different data and all these should have duplicate lines at the end)
Thanks a lot for any help
Cheers
Marian
Edited by: Marian Luscon on Jul 14, 2009 11:44 AMHi Ivan,
right, I did test just for sure.
Putting constant 'nl' into field CASHFLOW-INTERFACE1 didnt help - still getting one line instead two lines.
CA ,"0100" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,2 ,12 ,2009-01-28 ,2009-01-27 ,2009-01-28 ,"0.0000000" ,'nl' ,"GTP1" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,1 ,10 ,2009-01-27 ,2009-01-27 ,2009-01-27 ,"0.0000000"
So there is still question. Is there any way (mapping,...) how to output always 2 lines in text file for one record in XML. It always does 1 record in mapping structure = 1 line but we need 2 lines ...
Example:
Input: 4 records in XML
Output: 8 lines in final text file ...
Thanks to you all guys
Marian -
Hi,
I am facing the problem that when I read the content of the
texteditor, store it in a javascript variable, and then write it
again into the editor area, all line breaks (not html line breaks,
just the line breaks for the code structure) are gone.
For Example if the content of the Editor is the following:
Test line 1
Test line 5
If I know call my function the value of the texteditor will
be somethign like: "Test line1 Test line 5"
I tried finding the linebreaks and replacing them (either \n,
\r or \n\r) but had no success in doing that.
My code of the function:
var theDom=dw.getDocumentDOM();
var temp = theDom.documentElement.outerHTML;
theDom.documentElement.outerHTML="";
theDom.documentElement.outerHTML=temp;
So I assume Javascript and dw are using different formats,
but I cant find much information about whats being used.
Any help appreicated!
Best,
DavidHi Brent,
Use CHR(10) in text editor for a new line. for example( 'SAP' & CHR(10) & 'Visual' & CHR(10) & 'Composer') will display like,
SAP
Visual
Composer
Hope it helps....
Regards
Basheer -
Problem in formatting of long text -- line break not recognized.
Hi ,
We have a PO smartform in our SRM system and we are facing problem with formatting of long text on the smartform for long texts maintained for the PO.
for ex, we maintain the long text as --
"this is long text for item 1.
1. this is line 1.
2. this is line 2."
On the smartform it is displayed as --
this is long text for item 1. 1. this is line 1. 2. this is line 2.
So basically, the line breaks in the text are not considered in the smartform .
Any suggestions on how to fix this issue ??
Thanks.Hello Harmeet,
Which Std. FM are you using to fetch the PO texts? If the PO doesn't exist in your system, i'm afraid you cannot use Include Texts as mentioned by Harsh.
As an alternative you'll have to create a table & pass the text lines to it! I don't think SmartForms are not smart enough to identify new-line character.
BR,
Suhas -
Can you put line break in text in the data box when creating a chart.
i.e. if you have a bar chart with text underneath each bar, can you break it when you’re entering it instead of manually afterwards
Thankshttp://help.adobe.com/en_US/illustrator/cs/using/WS3f28b00cc50711d9fc86fa8133b3ce158e-8000 .html
See "Enter labels"
Maybe you are looking for
-
New 17" MBP, any ideas on a nice easy-to-use bag that will protect the MPB
Does anybody know if the new magic mouse and the wireless keyboard work and work well with the latest editions of MBPs? I guess I will ask while I am here. I need a nice bag to protect the MBP since there will e days I can use the 13' and days I will
-
Reset deadlines of intermediate timer events from within the process
Hi Is it possible to manipulate a Task completion deadline from another Event or Activity? Example: Human-Activity 1 has completion deadline 28.06.2010 which is saved in a data object do_deadline Parallel, Human-Activity 2 has an output-mapping which
-
IPod Classic will not restore because firmware file cannot be found
It was suggested by an Apple store agent that I should restore my ipod to stop a an issue with tracks skipping that I suspect are related to bad sectors on the disk as all the songs play ok on my macbook. However, when I try to restore I get an error
-
IdeaCentre B320 - Veriface application, how can I download this?
I have just received my IdeaCentre B320 All-in-one desktop PC and am absolutely loving it! When I was looking through the specs before I bought it they stated that one of the features of the desktop was the Veriface application. However I cannot fin
-
Hello collegues, I have a problem using RF exits. I need to change the screen 2151 of the program 'SAPLLMOB'. I had follow those steps: 1. created the custom screen 9151 in the program SAPLXLRF 2. inserted in spro Customizing for Logistics -> Mobile