Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to attach XML code to PDF

Guest
Oct 10, 2016 Oct 10, 2016

Hi,

I want to highlight some text in pdf through XML code.  I am new to this concept.  Can any one help me with steps how to write XML code and how to attach this to PDF.

Ariv

TOPICS
Acrobat SDK and JavaScript
10.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 13, 2016 Oct 13, 2016

Let's take a step back: What exactly are you trying to do? Do you want to apply a highlight annotation, or do you want to provide a temporary highlight the way it's done when you search for information in your document?

My next question is why do you want to use XML? Do you already have an existing XML based workflow?

Where does information about the data you want to highlight come from? And, how do you want to import that into Acrobat?

To see what you can do, please perform the following steps:

Ope

...
Translate
Adobe Employee ,
Oct 13, 2016 Oct 13, 2016

Hi ariva38817767

You might refer to the following links which discusses the issue similar to yours:

Attach a xml file to pd

Combining XML and PDF Files

Thank You,

Shivam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2016 Oct 13, 2016

Let's take a step back: What exactly are you trying to do? Do you want to apply a highlight annotation, or do you want to provide a temporary highlight the way it's done when you search for information in your document?

My next question is why do you want to use XML? Do you already have an existing XML based workflow?

Where does information about the data you want to highlight come from? And, how do you want to import that into Acrobat?

To see what you can do, please perform the following steps:

Open a PDF file with text in it, and add some text highlight annotations. Then select the "..." menu on the comments pane on the right side, and pick "Export All to Data File..." and select the "XFDF" output format. This now contains information about your highlight annotations in an XML file. You can delete your annotations in your document, and then select to "Import Data File..." from the same menu, select your just exported file and see how your highlight annotations are getting restored.

2016-10-13_10-04-29.png

All you need to do is to mimic the format in the XFDF file. When it comes to analyzing what data needs to go where, you are unfortunately on your own.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 20, 2016 Oct 20, 2016

hi,

thank you.  Your answer is usefull.

What I wanted is I wanted to use XML code with JavaScript to highlight text in pdf.  is there any way?

I am having the below XML code.  how to use this to highlight in PDF

<XML> <Body units=characters> <Highlight> <loc pg=0 pos=0 len=10> <loc pg=1 pos=4 len=2> </Highlight> </Body> </XML

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 20, 2016 Oct 20, 2016
LATEST

Who has documented this scheme for use with PDF? Where is it documented or where did you find it?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2016 Oct 13, 2016
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines