How to embed images in an INX file using script
Hi All,
Kindly help me in embedding images in INX file using Indesign Javascript.
I have used the following code to embed images in an indd document and exporting that document to inx. But the images in inx are not embedded by default.
var linksCount = myDocument.links.count();
var linksOnPage = myDocument.links;
for(var x=0;x<linksCount;x++){
var linkedItem = linksOnPage.item(0);
linkedItem.unlink();
myDocument.save(new File("filename.indd"));
myDocument.exportFile(ExportFormat.INDESIGN_INTERCHANGE, File("filename.inx"), app.pdfExportPresets.item("[Press Quality]"));
Thanks in advance,
Anitha
Hi
I think your script has two mistakes
you embed only first link image in for loop => set x for linksOnPage
exporting to inx isnot need PDF export preset => remove app.pdfExportPresets.item("[Press Quality]") from exportFile()
this work for me.
myDocument = app.documents[0];
var linksCount = myDocument.links.count();
var linksOnPage = myDocument.links;
for(var x=0;x < linksCount;x++){
var linkedItem = linksOnPage.item(x);
linkedItem.unlink();
myDocument.save(new File("filename.indd"));
myDocument.exportFile(ExportFormat.INDESIGN_INTERCHANGE, File("filename.inx"));
thank you
Similar Messages
-
How to embed images in long text of PM Notifications/Orders
Dear Sir,
How to embed images in long text of PM Notifications/Orders? Kindly help.
Thanks & Regards
PM Team.Hi,
Unfortunately, You will not be able to view the graphics within the Long text editor screen.Only Limited word functionality is available on these editors.
You will have to store these pictures separately as an attachment, through generic object services and then view them through that.
Regards
Narasimhan -
How can I create an csv/excel file using pl/sql and then sending that file
How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.968776 wrote:
How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
Whay do you want database (pl/sql) code to do these things?
Anyhow, you may be interested in :
{message:id=9360007}
{message:id=9984244} -
How to extract text from a PDF file using php?
How to extract text from a PDF file using php?
thanks
fabio> Do you know of any other way this can be done?
There are many ways. But this out of scope of this forum. You can try this forum: http://forum.planetpdf.com/ -
How to create a table in the file using java code.?
HI,
I should export the data from the view objects to a word document. I have done that but I should
display the data in the form of a table.
Kindly come up with the necessary information on how to create a table in the file using java.
Thanks,
PhaniHi, Thank you for responding to my query.
The below are the details of my code.
DCBindingContainer dcBindings =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding StudentDetailsContent =
(DCIteratorBinding)dcBindings.get("StudentView1Iterator");
OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
Row currentRow =
StudentDetailsContent.getRowSetIterator().first();
Object a[]= currentRow.getAttributeValues();
int i;
for(i=0 ;i<=a.length;i++){
w.write(a.toString());
w.write(" ");
w.flush();
I am usning this coding to achieve the task of exporting data to file.
I need to display this information in the table that is where I need help from you people.
Thanks, -
How to call text file using Script in Data Integrator
Dear All,
Can any one assit me in how to call a text file using script with the help of Data Integrator.
and one question ?
M having 32 csv files i want to club thos 32 csv files into one table with the help of Data Integrator, can
any one assist me.mary,
since you knew the file name ,when clicked in name send to server,read the file and write to servlet outputstream.
I think this would help you.
If anything wrong in mycode ..forums will help you further
BufferedInputStream bis=null;
BufferedOutputStream bos=null;
int bytesRead=0;
byte buff[]=new byte[1024];
File f=new File(test.txt);
try{
bis= new BufferedInputStream(new FileInputStream(f));
bytesRead=bis.read(buff,0,buff.length);
if(bytesRead!=-1){
// create a BufferedOutputStream from ServletOutputStream
bos=new BufferedInputStream(response.getOutputStream());
do{
bos.write(buff,0,bytesRead);
}while((bytesRead=bis.read(buff,0,buff.length))!=-1)
}catch(Exception e){
////error handling
} -
How can i scan to a pdf file using hp officejet 4500 scan feature
how can i scan to a pdf file using hp officejet 4500 scan feature. only give a jpg or bit extension
pf1tarac wrote: how can i scan to a pdf file using hp officejet 4500 scan feature. only give a jpg or bit extension
Hello pf1tarac, I don't believe that is possible. In order to create a PDF file, you would need Adobe Acrobat or some other PDF compatible product to save a scan to the PDF format.
There are some free PDF programs available. Here is a link to one of them.
Please click the White Kudos star on the left, to say thanks.
Please mark Accept As Solution if it solves your problem. -
How to get Header in Downloaded .xls file using GUI_Download function
How to get Header in Downloaded .xls file using GUI_Download function ???
How to use the the Header parameter available in GUI_Download function .HI,
see this sample code..
data : Begin of t_header occurs 0,
name(30) type c,
end of t_header.
data : Begin of itab occurs 0,
fld1 type char10,
fld2 type char10,
fld3 type char10,
end of itab.
DATA: v_pass_path TYPE string.
append itab.
itab-fld1 = 'Hi'.
itab-fld2 = 'hello'.
itab-fld3 = 'welcome'.
append itab.
append itab.
append itab.
append itab.
append itab.
t_header-name = 'Field1'.
append t_header.
t_header-name = 'Field2'.
append t_header.
t_header-name = 'Field3'.
append t_header.
CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
EXPORTING
default_extension = 'XLS'
IMPORTING
fullpath = v_pass_path.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = v_pass_path
filetype = 'DBF'
TABLES
data_tab = itab
FIELDNAMES = t_header
Cheers,
jose. -
How to get field separator in flat file using GUI_DOWNLOAD function
hi,
how to get field separator in flat file using GUI_DOWNLOAD function.
thanking you.Hi,
Use WRITE_FIELD_SEPARATOR = 'X'.
Check this sample code
REPORT z_file_download.
DATA: w_name(90) TYPE c.
DATA:
BEGIN OF fs_flight,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
price LIKE sflight-price,
currency LIKE sflight-currency,
END OF fs_flight.
DATA:
BEGIN OF fs_head,
carrid(10) TYPE c,
connid(10) TYPE c,
fldate(10) TYPE c,
price(10) TYPE c,
curr(10) TYPE c,
END OF fs_head.
DATA:
t_head LIKE
TABLE OF
fs_head.
DATA:
t_flight LIKE
TABLE OF
fs_flight.
fs_head-carrid = 'CARRID'.
fs_head-connid = 'CONNID'.
fs_head-fldate = 'FLDATE'.
fs_head-price = 'PRICE'.
fs_head-curr = 'CURRENCY'.
APPEND fs_head TO t_head.
SELECT-OPTIONS:
s_carrid FOR fs_flight-carrid.
START-OF-SELECTION.
SELECT carrid
connid
fldate
price
currency
FROM sflight
INTO TABLE t_flight
WHERE carrid IN s_carrid.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\flight.xls'
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = t_head
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'D:\flight.xls'
filetype = 'ASC'
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = t_flight
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc EQ 0.
MESSAGE 'Download successful' TYPE 'I'.
ENDIF.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
I have Adobe Photoshop 9. I am a novice. How can I resize photos in my files using batch resize?
In the Editor, use File...Process Multiple Files. See the Help for more info.
Ken -
How can we get tag of XML file using SAX
Hi ,
I'm parsing one SAX parser , I'have almost done this parsing. i have faced problem for one case, i'e how can we get tag from XML file using SAX parser?
XML file is
<DFProperties>
<AccessType>
<Get/>
</AccessType> <Description>
gdhhd
</Description>
<DFFormat>
<chr/>
</DFFormat>
<Scope>
<Permanent/>
</Scope>
<DFTitle>gsgd</DFTitle>
<DFType>
<MIME>text/plain</MIME>
</DFType>
</DFProperties>
I want out like GET and Permanent... means this one tag which is present inside of another tag.
Handler class like
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
if(_ACCESSTYPE.equals(localName)){
accessTypeElement=ACCESSTYPE;
public void characters(char[] ch, int start, int length)
throws SAXException {
if (_ACCESSTYPE.equals(_accessTypeElement)) {
String strValue = new String(ch, start, length);
System.out.println("Accestype-----------------------------> " + strValue);
//System.out.println(" " + strValue);
public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if (_ACCESSTYPE.equals(localName)) {
_accessTypeElement = "";
. please any body help meHi ,
I have one problem,Please help me.
1. How can I'll identify where exactly my Node is ended,means how how can we find corresponding nodename? in partcular place
<Node> .............starttag1
<NodeName>Test</NodeName>
<Node>................starttag2
<nodeName>test1</NodeName>
</Node>..................endtag2
<Node>.....................starttag3
<NodeName><NodeName>
<Node> .........................starttag4
<NodeName>test4</NodeName>
</Node>.......enddtag4
</Node>...........end tag3
</Node>............endtag1
my code is below
private final String _NODENAME = "NodeName";
private final String _NODE = "Node";
private String _nodeElement = "";
private String _NodeNameElement = "";
public void startElement(String namespaceURI, String localName,
String qName, Attributes atts) throws SAXException {
if (_NODENAME.equals(localName)) {
NodeNameElement = NODENAME;
if(_NODE.equals(localName)){
System.out.println("start");
if (_NODENAME.equals(localName)) {
NodeNameElement = NODENAME;
public void characters(char[] ch, int start, int length)
throws SAXException {
if (_NODENAME.equals(_NodeNameElement)) {
String strValue = new String(ch, start, length);
String sttt=strValue;
System.out.println("NODENAME: ************* " + strValue);
if(_NODE.equals(_nodeElement)){
if (_NODENAME.equals(_NodeNameElement)) {
String strValue = new String(ch, start, length);
String sttt=strValue;
System.out.println("nodevalue********** " + strValue);
public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if (_NODENAME.equals(localName)) {
_NodeNameElement = "";
if(_NODE.equals(localName)){
System.out.println("NODENAME: %%%%%%%%%");
please help me. How can I figure node ending for particular nodename -
How 2 get the path of a file Using jsp
how 2 get the path of a file Using jsp
i have tried getPath...but i'm geting the error
The method getPath(String) is undefined for the type HttpServletRequest
any idea how 2 get the path of a fileYou need ServletContext#getRealPath().
API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String) -
How can i make calculation in two file using two parameter
how can i make calculation in two file using two parameter
Solved!
Go to Solution.i am having two differnt file, both file having no and time , i want to make programme that when, number and tiome is same in both file give that index onle in , i am going to attached the file
Attachments:
iisc11-jan2010extract.txt 1253 KB
sp3.xlsx 12 KB -
How to hide or lock toolbar fileds by using script
Hi experts,
Could you please let me know how to lock or hide toolbar fields by using script.
Thanks,
PavanHi Pavan,
I dont think its possible using scripting because I don't find any APIs for toolbars.
However, you can achieve this using toolbar customization.
You can use the following config :
Customization Type: Business Object
Target Class ID: Contract Document (2002)
Target Toolbar ID:system.toolbar.document.doccommon.contractdocument.contractdocumentactions.actions
Overrides:
Hidden -- Yes
Let us know if you are looking for something else.
Thanks
Devesh -
How to embed images in e-mail?
How do you embed images in an e-mail?
You can either place the cursor where you ant the image, go to the image on the screen, slect it and copy, change back to mail and paste. _OR_
when composing, place the cursor wher you would like the image and Attach the file to the email.
Maybe you are looking for
-
Help with CRT display...
Hi all... I'm facing a nasty problem connecting an external crt display to my MacBook Pro. First here's the setup: -Two MacBook Pro 2.4 GHz -G4 Cube 450MHz -iBook G3 800MHz -CRT DPRO750SB 17" (Nec-Mitsubishi) -CRT AT897D-1 17" (Formac) -Problem: I us
-
Office 2013 apps showing templates error after Sysprepping Windows 7 with CopyProfile setting
Here is my setup: I installed Windows 7 Professional. I entered Audit Mode (which automatically logged me in as the built-in Administrator user) and installed the entire Office 2013 Professional Plus suite. In Audit Mode, I opened Word 2013 to get th
-
How do I play a video and audio file at the same time on Apple Tv?
I need to play a video loop (with no audio) on my apple tv and also play some music in the background. Its a video loop with no audio and then I need music to play in the background. The loop needs to repeat all day because its only 5 min long and th
-
How to use jmf convert the rtp packet (captured by jpcap) in to wav file?
I use the jpcap capture the rtp packets(payload: ITU-T G.711 PCMU ,from voip) and now I want to use JMF read those data and convert in to wav file How to do this? please help me
-
Embedding remote swf not working
I am using Acrobat X Pro.I am Unable to embed https swf in pdf by specifying the url in the f;ash tool.If I use http url it works. The Pdf is blank