Placing a PDF graphic into an existing XML hierarchy?

I have an existing XML hierarchy that has a picture element that looks like this:
<picture href=""></picture>
which is already placed in a TextFrame.
I'd like to place a PDF graphic at the location of this element, in essence updating it.
I'm able to update the href attribute with the correct filename, but this doesn't create a placed graphic AFAICT.
I can place a graphic in my TextFrame, but don't understand how to specify this <picture> element as its location.
Any pointers to example code, or hints/tips?
Greatly appreciated!
Charles

Oh, right. Did we forget to tell you that trying to use XML in InDesign is usually a bad idea and that you could do much better without it?
Anywhohowwhichwhywhere...
In keeping with that theme, XML doesn't really come into play. If you have a rectangular frame rect and a filename filename and you want to place  filename in the rect then you just use: rect.place(filename);
So in your case, it's just about defining the two. I guess:
var rect, filename;
rect = app.documents[0].selection[ROW].associatedXMLElement.
    xmlElements[COL].xmlElements[0].xmlElements[0];
filename = new File(rect.xmlAttributes[0].value);
rect.place(filename);
Of course, if your filename is really a URL you'll have a spot of trouble there, maybe.
And you might be better off using XPath, i.e. .evaluteXPathExpression("//picture") to get your rectangle.
And what if href= isn't the first attribute of the <picture/> tag?
I suppose that perhaps you should consider using the .placeIntoFrame() and .placeXML() methods of the XMLElement class. I suspect you'll be sorry if you try, but go ahead :-).

Similar Messages

  • Moving flat file data into a nested xml hierarchy

    Post Author: jlpete72
    CA Forum: Data Integration
    I am working to build data flows which move data from fixed lenght flat files into nested hierarchical xml files.  I think I have the transforms mapped correctly but there must be something I'm missing.  The data flows validate with no errors, but when executed it appears that they are getting stuck in a loop.  My flat source files have around 3000 rows, but the data flows are showing millions of records being processed.
    I have only one schema in the source and a variable number of schemas in the target xml files.  I am using a query transport and mapping all of the output schema levels in the target xml From tabs.
    I have even tried creating separate database tables for each target schema, and I still get a runaway process.  When there are more than two schemas in the target xml file, the process eventually consumes all of the servers memory and crashes the system.
    I'm not sure if I need to be using a different transport or what but am hoping that someone can shed some insight on what is happening here.
    Thanks, Jerry

    Post Author: jlpete72
    CA Forum: Data Integration
    Thanks for the response.  I didn't have a choice but to enter the From statement, but haven't yet seen any results from entering a Where clause.  In my case, there is only one input file/schema so the where clause would be something like "cust_inv_1.SldFmCustCd = cust_inv_1.SldFmCustCd".
    I would agree that it seems as though I am generating a cartesian product.  In the circumstance of having only one input schema mapping to multiple output schemas, I'm not seeing how to properly restrict the rows.
    I have been going through the manuals looking for clues, but have not found anything that helped yet.
    Any help and/or ideas would be appreciated.
    Jerry

  • Placing a vector graphic in an existing PDF

    I am using Acrobat 9 Pro Extended. I have created PDFs from the music notation software called Sibelius (by "printing" to PDF).
    I now want to add a graphic (a logo created in Illustrator). In the Acrobat Help, it says to use the TouchUp Object Tool and right click. The dialog that appears only lists raster formats (JPG, GIF, TIFF, etc). The Help System says I should also be able to place an EPS file, but that format is not in the dropdown list of file types.
    Sure, I can use one of the raster image formats, but I'd prefer to use a vector format so that it looks good at any zoom level.
    Bottom line: Is there any way for me to add a small vector image at a specific position in an existing PDF?
    Thanks,
    John

    If you do not mind dipping into java, you could use iText. It
    is built into MX7.
    The tutorials should get you started. Though they are now a
    tad dated.
    http://itextdocs.lowagie.com/tutorial/objects/images/

  • How do you insert another PDF document into an existing PDF page

    Here's some background.  I used to use Acrobat 5 (I know it's really old but it worked great for my needs, but it's time to upgrade).  Say I have an existing 1 page PDF document (an Invoice for example).  Sometimes in Excel I create additional supporting details/calculations/etc that I must place onto the Invoice.  In the past I would print my Excel document to PDF using PDF Broadgun (great tool!) - and I'd like to keep doing this.  Then I would go into Acrobat 5, open up my 1 page Invoice PDF document, then I'd use the Form tool, insert Icon, and select my "supporting" PDF document right onto the 1st page.  Then, as needed, I could resize it and place it anywhere on the existing Invoice/PDF 1 page document that I started with, and the resolution was great (i.e. no "grainy" appearances, etc).
    I've now upgraded to Acrobat XI Pro (well, technically I'm trialing to make sure it'll will meet my needs - so far so good, until I ran into this).  I have tried copying the Excel data directly into my PDF Invoice document, but it often times makes the object super large (way off the page left to right) and then I have to resize it (substantially reducing the size) in order to make it fit the page.  This resizing the causes the text to appear "grainy".
    So pretend that my original Invoice/PDF 1 page document took up the top 1/2 of the page.  Then in Excel I create some backup which is say 5-10 lines of calculations.  How can I get the Excel backup as an Image into my original 1 page document (and on 1 page)?  The only work around that I've found so far is to insert it as the last past, then highlight the new stuff from Excel, cut and copy it onto page 1 (these seems like several extra steps in my eyes, but it does work).
    I also want to avoid using screen snip-it, snagit, and various other tools for the following reasons:
    1.  I don't want to remove the grid lines within Excel (i.e. when you print from Excel the grid lines do not print by default)
    2.  I use PDF Broadgun to generate a PDF (i.e. electronic print) and then the data/document looks just like I'd want it to look if I had physically printed it
    Any thoughts?  Many thanks in advance for the help too.
    Other Details:  Windows 7 Pro, company/business use

    I don't see what the problem is with printing to PDF using the Adobe PDF printer as you did with the other tool. Then open your new Excel PDF and do the same process as before (assuming it worked for you). Just go to the Tools>Interactive and add a button field (I assume this is what you did before) and put the file there. At least give it a try as I think that is what you said you used to do.

  • Calling pdf doc into rtf usin xml

    hello all,
    I am trying to call a pdf document using xml into rtf documnt.
    For example in code
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.27.0 -->
    <XDCOTPTEST>
            <NAME_CURRENT>XYZ Company Limited</NAME_CURRENT>
             <TITLE>C:\New Folder\Tulips</TITLE>
    <LOGO>C:\New Folder\Penguins</LOGO>
    </XDCOTPTEST>In rtf object im mentioning :
    url:{concat(.//TITLE,'.gif')}
    url:{concat(.//LOGO,'.jpg')}with this i am able to call 'gif' or 'jpg' files bt i want to call pdf document using the same .
    thanks

    I knw its nt cmpletely related to database,
    the flow is like we create rdf file without layout
    for layout we create rtf file using xml desktop publisher, in which im trying to call a pdf file
    any suggestion could be helpful.

  • How do I embed a pdf document into an existing pdf so that the user double clicks on the pdf object within the pdf and it opens? i've looked everywhere on various forums and tried attachments - but still not working. Thanks

    I've tried various methods but to no avail. I have a pdf document and within the pdf I'd like to embed a couple pdf documents so that all the user has to do is double click on the pdf object inside the pdf and it opens in a new window. I've tried using attachments to do it and linking it...but to no avail. Anyone know how to do? I'm using Acrobat Pro Version 11. Thanks

    The "embed" feature common to MS Office applications is not applicable to PDF (for the why and wherefore of PDF get comfortable and read the ISO Standard for PDF - ISO 32000-1:2008).
    You can insert other PDF files' pages into any given PDF.
    You can attach files of supported formats to a PDF (of course a PDF is supported).
    You cannot "embed". So, nothing is broken.
    Be well...

  • Integration of FormsCentral .pdf documents into Excel Database

    Can anyone help with integration of the data contained in the fields and spreadsheet features of .pdf docs into an existing Excel database that hosts questionnaires?  The Adobe FC website says that can be accomplished by use of an Open DataBase Compatibility Driver (ODBC) to import FC-created documents into an Excel database.
    Has anyone done this or have a source for the ODBC tool or a developer?
    Thanks 

    I am not familiar with the document you are referring to. Can you post a link to the information so I can check its accuracy.
    Thanks
    Andrew Yarborough

  • Dragging PDFs into a existing box

    PDFs dont drag into existing box at the previous size the PDF was in the box before. So for example in CS2 if I had a PDF in a box at 100% i could drag a PDF with the same specs into the existing box and it would not change the placement. Now in CS5.5 I do this and the PDF is brought in at like 103% and not at 100% as it was saved before.
    thanks

    When you replace any graphic (including pdfs) into an existing frame of an Indesign document, the Crop to options must be identical from first import to replacing import for consistent scaling of art. If the Crop options are different, you will see this kind of scaling. Keep in mind that when you drag drop art into a document, the Crop to setting is the last setting that you have made. So if you placed art and changed the Crop to setting to "Bounding Box" any subsequent art placements will retain this setting.

  • When trying to convert a pdf file into a word doc, i only get the graphics but not the text. How do i remedy this?

    When trying to convert a pdf file into a word doc I only get graphics but no text. What to do?

    Hey hamsa142,
    I think you are converting a scanned PDF to word.
    You might need to run OCR first to make the text recognizable and then convert it to word.
    Regards,
    Anubha

  • PDF conversion into xml sometimes scrambles text

    I've been using the "save as" function in Acrobat Pro 9 to convert PDF documents into xml text transcripts, but all too often that text comes out scrambled: instead of working within the column divisions on the page, the Acrobat conversion process will read across the page, braiding together, line by line, text that appears on the same level in two and sometimes three adjacent columns. Has anyone else experienced this, and is there anything I can do to prevent it from happening?

    IAC methods are the COM/.NET methods on Windows.
    a) You can get the document metadata and the size of each page but not tagged status from IAC. Plugins can get all the info.
    b) There is NO WAY to get the password for an encrypted document (using ANY API), since the password is never stored in the PDF itself.
    c-e can only be obtained using plugin APIs
    f can be obtained using any API - IAC or plugin.
    g is only available for plugins.
    I don't understand h - do you just mean the version in the document or an actual REAL usage value?

  • Embed an external PDF file into the XML

    Dear All,
    We have a program which creates the XML file on the Application server when we execute it.
    My requirement is to Embed an external PDF file into the XML file while generating it through
    program from SAP.
    Please let me know how this is possible.
    Thanks & Regards,
    Vinit

    Yes, you can do it. You have to use an absolute path and add it not only to the folder but to the .manifest
    I wrote a blog post explaining how to do it:
    http://www.captivatecrazy.blogspot.com/#!http://captivatecrazy.blogspot.com/2012/03/embed- pdf-in-captivate-for-lms.html

  • Course of action? Parsing 1000+ PDF forms into XML.

    Hello -
    I am looking to automate the parsing of hundreds of PDF Forms into XML and then do some basic validation. The preferred method would be to drop all of the PDF's into a folder, run a script, and then the PDF's would go to their corresponding directory based on a XML validation test (easy to do once I get the PDF form into XML).
    Now, I have googled all around the web looking for plug ins, scripts, or anything that might accomplish this. Everything that might have a chance of working seems very elaborate and expensive.
    Can anyone recommend plausible, cheap, and quick course of action? Also, the machines that these files are on are very locked down with  security, if that impacts your feedback.
    Greatly appreciated,
    David

    Hi Andersson,
    The request command is a form server command? Where do i type the Request.Form("page.form.field"). I dont really understand your statement on "Use request on the receiving page to get data" Could you help me by explaining more?
    Thank a lot for your advice
    Warmest Regards
    Delvin Khong

  • I want to convert a pdf file into xml.Which programme should I use and how do I access it?

    I want to convert a pdf file into xml.Which programme should I use and how do I access it?I am based in India.

    Hello,
    if you create your doc files by the help of WORD, you could use a Microsoft add on (it depends of your WORD Version).
    Hans-Günter

  • Can I bring the 'studio slate' graphics from a trailer into an existing full project?

    I would like to make my almost-finished home movie as authentic-looking as possible so I'd like to add the opening studio graphics you get in an iMovie trailer to the start of my existing project.
    I don't see a way to do this without making a new trailer, converting it to a project, editing the title graphics into something I can use and exporting them as a rendered video which I then import into my movie project. This is acceptable if it's the only option but I'd much rather have editing control over them in the movie project if possible.
    Is it?
    Thanks in advance.

    The way you described is the only way I know.
    For future projects, you could start the trailer, convert to project, and then build your project from there.

  • Existing XML documents into KM

    Hello Everyone
    Is there a way to load existing xml documents into KM and then maintain them using xml forms built using the form builder. Any help is greatly appreciated.
    Thanks
    Swetha

    Hi Renuka
    You can move the XML projects from one server  to another.The Xml forms created is stored in the path 'etc\xmlforms' in KM. You can send it out and Upload to the target server instead of creating the same in the Target server from the scratch.
    Regards
    Geogi

Maybe you are looking for

  • Problem with syncing old purchases from itunes

    i purcheased three videos from i-tunes, not to long ago but they were put on my 5th gen i-pod video, i just got and i-phone and didn't know that they couldn't be synced to two computers because my i-pod is hooked up on my old computer, while my i-pho

  • Runtime error when executing driver program

    when im executing my report after passing smartform to it , by giving invoice number in selectionscreen,it's generating runtime error as the call to the function module     '/1BCDWB/SF00000032'   is incorrect: in the function module interface, u can

  • IPhone Rings When Hooked Up to iHome Speakers

    Hi!!! I have the iHome speakers for my iPhone and I use them at work. I keep my iPhone on vibrate. When someone calls me, you can hear the phone ring through the iHome speakers and it gets pretty loud (I have the "alarm" for my ringtone). Does anyone

  • Counter in PE51 form

    Hi All, Does anyone know how to at a counter to a PE51 form without modifying the program using the form. I'm asking because i have a form showing information for multiple employees. I would like to have a counter in order to know how many employees

  • Can I pass a SAP query to another SAP query???

    Hi Friends In SAP Queries we can edit the existing query and we can save it as a new query. In the same way is there anyway to pass a query to another query? As per my knowledge, I don't think it is possible, I want give confirmation to my manager, b