Insert image into the existing "placeholder" [CS5] [JS]
Hi all
I have searched the Scripting guide but have found no clear answer to my problem (again...).
I am currently using InDesign CS5 with JavaScript.
I (attempt to) create a solution that will allow users to customize business cards by inserting an image in a document template.
My proposed solution is:
- Include in the template, a rectangular frame
- When the user selects the image they would like to use in the card, insert the selected image in the rectangular frame
My problem is to insert the image in a page in the template element. How is that possible? Literature primary refers to the creation of page elements, and I keep hitting error messages when you try to view existing page items!
Thank you very much
Ben
Hi Ben,
I think you expect to move the jpg or frame everything which, like you exepct, use the code below js.
myDoc var = app.activeDocument;
myFrame var = mydoc.rectangles [0];
IMG = myframe.place (new File("~/Desktop/smile.jpg") var);
If you want the frame moving rectangles do not change the line below or move the jpg pic change the simple app.select (img) .
App.Select (MyFrame);
App.Selection [0]. Move ([15.15]);
Please return back this desire that you wait or not?
THX
csm_phil
Tags: InDesign
Similar Questions
-
Can I insert image into the existing identity document and make the text flow around it?
I now get text properly formatted in InDesign CS4. Is it possible for me to add pictures to this already existing document and that the text automatically adjust to autour flow of these images comes to be inserted?
Thank you
Just use File > place command to add your photos. Edition > clear all before do you.
After you have placed your images, select them using the Selection (black arrow) tool, choose window > text wrapping and text wrap. After that, the text flows around this image when you take on the top of the text.
-
How can I insert image into the image in adobe first pro cc 2015
How can I insert image into the image in adobe first pro cc 2015. I want to put a fixed image on a video sequence as a pip.
1 import the photo into your project (CTL-I or just drag & drop in the project Panel)
2 dag photo imported on your timeline in a track located above the video you already have.
3. click the clip of the photo in the timeline panel and then click on the control panel of the effect of the Source Panel tab.
4. here you can resize, move, and even rotate the picture of the "query" fixed effect. You can use the sliders or click on the area next to the word "Query" and use your mouse to do everything from the program Panel.
Good luck and have fun. BTW: once you get it you like, you can even animate the PIP to fly in or any other movement, you can think of with keyframes.
-
Cannot insert field or paste into the existing local Variable (Boolean container)
Cannot insert field or paste into the existing local Variable (Boolean container)... TestStand 4.1.
It is very strange, especially since I've done it before.
'Paste' and "insert field" selections are grayed out and disabled in the context menu. I tried everything I could imagine and tried various combinations of positions. I'm sure it's something simple, bu redicoulously, I can't find the redicule to solve this annoying problem issue.
The local variable is a container of Boolean. It has 90 elements and I need to add one more. I can not change / rename or do something with this Local. Must be karma (for those who know me in the LabVIEW forum). Usually, you do a right click, insert field and that's where... Not this one...
Anyone seen this before? Closing and re-opening TestStand doesn't change anything. There is a collection in LabVIEW that feeds the local section in TestStand.
It is a container of data custm type. To change flags are ok (edit is allowed). Can't think of any other valuable information...
He finds...
It should be edited in the Data Types... It was not automatic after reloading the prototype of LabVIEW.
I knew it was something stupid that I didn't... I became close... but had not sought far enough.
I was looking at the range of Types, but not in the file of the sequence...
-
Insert data into an existing timechannel
Hello
I'm trying to insert data into an existing timechannel. To illustrate my use case, I prepared a few data :
Absolute timechannel D1 D2 D3
14.02.2013 03:22:51.3930 - 4-92-703
14.02.2013 03:22:52.3930 - 4-92-697
14.02.2013 04:06:19.7280 - 1-75-674
14.02.2013 04:06:20.7280 - 1-75-696As you can see there is a chronological gap between the second and the third group of data. Now, I want to insert a line with NoValues in this interval.
The data has been saved with a sampling rate of 1 Hz. After processing the data, they should look like this:Absolute timechannel D1 D2 D3
14.02.2013 03:22:51.3930 - 4-92-703
14.02.2013 03:22:52.3930 - 4-92-697
14.02.2013 03:22:53.3930 NV NV NV
14.02.2013 04:06:19.7280 - 1-75-674
14.02.2013 04:06:20.7280 - 1-75-696Insertion of the NoValues in the data channel works very well with 'DataBlInsertVal '. But I'm having a hard time to achieve the same in the timechannel. Especially with a dependency on the sampling rate.
Someone has tried to do the same thing or has some tips how to do this? The main objective is to avoid reporting to connect the data points on this chronological gap.Best regards, Marc
Hi Marc,
I tried what you wanted to do and he worked with DIAdem 2012 without any problem.
I used the attached file and copy the following code:
Call DataBlInsertVal(Data.Root.ChannelGroups(1).Channels("Time"), 13, 1, NV)
Can you try this line with my file?
Cheers, RMathews
-
Insert data into the source of destinator Table
Hi all
Need to insert data in sample_table1 table xxc_source_table sample_table2
create table xxc_source_table (DESCRIPTION varchar2 (10));
Insert the table xxc_source_table values('A201.) ABC.4084.GR');
create table sample_table1 (col_1 varchar2 (10), col_2 varchar2 (10), col_3 varchar2 (10), col_4 varchar2 (10));
create table sample_table2 (col_1 varchar2 (10), col_2 varchar2 (10), col_3 varchar2 (10), col_4 varchar2 (10), moved_flag varchar2 (2));
col_1 = A201
col_2 = ABC
col_3 = 4084
col_4 = GR
Note: Insert data into the col_1, the col_3, the col_4 of the xxc_source_table sample_table1
(2) if the next (form xxc_source_table) data is exist in the sample_table2, and then set the moved_flag as Y in this column
3) xxc_source_table has 17000 lines
Thank you.
Post edited by: Rajesh123 please do not consider cross the line message
Hi Renon,
Why you don't want substr and instr? For best performance, you should go with substr and instr instead of regexp_substr. However you asked me to provide the code instead of substr and InStr. Then try the below...
INSERT ALL
IN VALUES sample_table1 (col1, col2, col3, col4)
IN sample_table2 VALUES (col1, col2, col3, col4, 'Y')
SELECT REGEXP_SUBSTR (DESCRIPTION,'[^.] +', 1, 1) col1,.
REGEXP_SUBSTR (DESCRIPTION,'[^.] +', 1, 2) col2.
REGEXP_SUBSTR (DESCRIPTION,'[^.] +' 1, 3) col3.
REGEXP_SUBSTR (DESCRIPTION,'[^.] +' 1, 4) col4
OF xxc_source_table;
Thank you
Ann
-
Cannot insert data into the database
Hello world
I stuck with a problem in DB juice. When I try to insert data into the database using DB tool, I get a repeated error message (error 1). Please find the my vifile below and solve say.
Problem is use Labiew 8.2. So try to answer accordingly
Try it with a cluster instead of a string or an array.
-
Get the date value. MinValue and insert it into the DB
Hello
I'm developing an adf application using jdev11g.
I need to recover the 3 values of page jsf (inputText 2 + 1 date. MinValue) and insert them into DB
so I create a method in appModuleImpl:
{public createAffAgVehNewRow (Date date, around km, veh Integer) Sub
Get the id of the current user
String ag = ADFContext.getCurrent () .getSessionScope ().get("idAg").toString ();
getSequenceNumber
oracle.jbo.domain.Number seq = new oracle.jbo.domain.Number (0);
SequenceImpl seqImpl = new SequenceImpl ("AFF_AV_SEQ", getDBTransaction());
SEQ = seqImpl.getSequenceNumber ();
Insert values into the DB table
Line r = getAffAgVehView1 () .createRow ();
ViewObjectImpl vo = this.getAffAgVehView1 ();
r.setAttribute ("IdAg", Integer.parseInt (ag.toString ()) ");
r.setAttribute ("IdAffAv", seq);
r.setAttribute ("KmDep", km);
r.setAttribute ("IdVeh", veh);
r.setAttribute ("DateAff", date);
r.setAttribute ("KmArriv", null);
r.setAttribute ("ConsoCarb", null);
vo.insertRow (r);
this.getDBTransaction () .commit ();
}
also, I changed the default value of the EO (AffAgVeh) to adf.currentDate () and the user interface as simpleDate format: "MM/DD/YYYY.
the problem as whene I enter 3 inputValues and click on the button I get this message:
Timestamp format must be yyyy-mm-dd hh: mm: [.fffffffff]
someone knows how to solve this problem
Thank you
Mark
Hi Dev
Please pass.
java.sql.SQLException: column type invalid in the adf
Thank you
Subramanian M
-
How to insert images in the content pane HTMLEditor?
How to insert images in the content pane HTMLEditor? or a hyperlink?
> know the position of the caret
Well, there is no public API on the HtmlEditor to know that.
You could create an tweak asks to add such an api.
In the meantime, I believe that the HtmlEditor is implemented as a contentEditable has WebView below, so I think it's possible to hack together a solution if you want to.
To do this:
1. create a program that uses the HtmlEditor.
2. run the program and use ScenicView to work on the css to display embedded Web search path.
3. Once your HtmlEditor appears on a scene, use a node search to dig up a reference to the Web view.
4. Once you have a reference to the Web mode, use executeScript to get the position of the caret by using JavaScript.
5. Once you know where the caret, use a mechanism similar to my example program above to allow you to insert an image to the location of the caret (get the html text, put the position appropriate, up-to-date then set it again).
Of course, you don't need to use a HtmlEditor control to do this, you can also just use a plain WebView with contentEditable flag put on it or any number of 3rd party JavaScript html editors have image insert functions.
-
What trigger to use to insert data into the table db forms
Hello
My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
Is - shutter release key of the form-level validation?
Please notify.
Thank you
Didi.You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.
Hi didi.
And this is my last post I'll sleep. ;)
Take form level trigger named preform
and write on it:SYSTEM.MESSAGE_LEVEL := 5;
I hope this works...
Hamid
Mark correct/good to help others to get the right answers. *
-
How to insert image in the region
Hello!
How to Insert Image in the region, as I upload image with the name "bar_color.jpg" in my workspace. And in the attributes of the region, I found
1-static id
2-region attributes
View 3-region selector
image 4-region
The 5-image tag attributes
Attributes of cells 6-region HTML table
What to enter in these attributes.
I entered bar_color.jpg in the column region's image, but the image does not appear
Any help!Hello
You can not simply use an img tag in the Source of the region ? :
Otherwise, you can view the type of the Image to displayitem, if you want to display the image directly from the BLOB.
-
How to insert data into the table by using the expression builder in the assign activity
How to insert data into the table by using the expression builder in affect business in BPEl, I use SOA Suite 11.1.1.5
Can someone help me pleaseHello
I don't think that oraext:query-database() can insert data into the table.
What are your needs?
Can not you plan to use the DB adapter with the insert operation?Kind regards
Neeraj Sehgal -
How to insert data into the database using smartview
Hello
I am trying to insert data into the database using * "Send data" * button on the Ribbon of Essbase.
My database is empty.
I opened an ad hoc network, it returns * "#missing" * in all cells
I have modified the cells and provided data in the cells that I want to. Now, I supported on * "Send data" * button.
It just reloaded the adhoc grid instead of submit data, I rechecked the data through data console Administrative Service are not inserted.
I am following the right way to insert data? If not, could you please suggest me how (Populate) insert default data in the database?
--
VINETYou go about it the right way, once you have submitted if you réactualisiez then data values should be there, if you POV is against members of dynamic calc and then data not written to the database, you need to check the Member properties of your POV.
See you soon
John
http://John-Goodwin.blogspot.com/ -
How can I insert html into the Actions Panel to format text?
I am trying to create text using html, so I could format it in html. I created a text box, it has given an instance name, "Dynamic text" selected and clicked 'display the text in html format. When I click F9 (go on the Panel shares) to insert my html code, I get the message "current selection cannot have actions applied to it. Am I missing something? How can I insert html into the Actions Panel to format text?
In order to assign html text to a textfield, you must assign your htmlText of a textfield property. If you must give a name of uinstance to the textfield and then assign the text. If you named the "tField" textfield, in the scenario that contains the textfield you EF text html as follows...
tField.htmlText ="
your text
";You should watch the TextFields htmlText property in the help documents to determine the limited number of html tags that are supported by Flash.
-
Add an Image to the existing document
Hai
I'm new to Indesign JavaScript. I want to add an image to the existing indesign document. When I add an image to the page, it is placed above the text. But I need, when I add an image to x = 0, y = 0 if no text already there it should be placed after the image.is it possible?
Code:
myPage.place (myGraphicFile, [0,0]), where myPage = app.documents.item (0).pages.item (0); If any text in 0,0 TI should be placed after the image.
Thanks in advance
Hi Kumar
U just needs to assign textWrap to this image.
App.Selection [0].textWrapPreferences.textWrapType = TextWrapTypes.JUMP_OBJECT_TEXT_WRAP;
App.Selection [0].textWrapPreferences.textWrapOffset = ["1 p","0p","1 p", "0p"];
Maybe you are looking for
-
How can I view the HTML code of a site on a Tablet using Firefox, as I can on a Windows PC?
-
Firefox frequently loses focus of the window
It seems that Firefox frequently loses focus of the window when I opened a new page. It can be a bookmark, a link open in a new tab using CTRL-click left or whatever. The following scenario always translates into the window loses focus (for me). Open
-
Original title: fable: the lost chapters? Hi all I was wondering if someone can help me... I had problems installing the fable tlc game disc 2 so I did troubleshooting to run on newer windows, but now I can't even install disc one if anyone has any i
-
my microsoft updates won't configure
I had my computer set up so that it automatically installs important updates, but they are not configuration and therefore fail. I'm now up to 19 updates.
-
UBS driver does not recognize the device
There is almost a month my driver which works well with a printer and a phone I plugged and used and I have also used my USB for school work. I have 4 ubs ports on my laptop and they all night, stop working and I reinstalled and restarted and re ever