Binding with exported pdf file

Let’s assume, I manually exported an existing PDF file to an XML format file, it is trivial, indeed.

Now: is it ANY way to bind this file/stream to PDF document?

As I can see, there’re two PDF class members: BindFO and BindXML.

I tried to bind PDF document with this XML file:

FileStream xmlFS = //test.xml is result of export

new FileStream("Test.xml", FileMode.Open, FileAccess.Read);

Pdf pdf = new Pdf();

pdf.BindXML(xmlFS, null);

As I can see with my debugger, there’re no actual binding, probably I will need to use a schema or to define a second parameter.

How I will define this second parameter (XSLT??) in this case?

Or - is this function not applicable to XML files generated by Adobe?

Hi,

Thank you for considering Aspose.

Please check the following link.

http://www.aspose.com/wiki/default.aspx/Aspose.Pdf/HelloWorldXmlAndXslt.html

Hope it helps.

Thanks.

Adeel Ahmad
Support Developer
Aspose Changsha Team
http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html

It is great and I saw this sample before, indeed...

But there’s a question about XLT file from Adobe and practical usability of this function.

As I can see, Aspose doesn’t let us direct import of .pdf files to PDF document.

So, to bind pdf document with existing pdf files we need

a) Export pdf to xml;

b)To obtain somewhere a standard XLT from Adobe or to build it ourselves.

Am I right?

Where we can get this XLT?

We have not supported binding existing Pdf directly. Your idea is interesting. I don’t know if we can find such a XLT you need but can you tell me how do you export pdf to xml? Can you please provide an example of the xml? If your method can export Pdf to xml well, we can consider support such XML in Aspose.Pdf.

Tom,

Right now both namespaces, Aspose.pdf and Aspose.pdf.kit have a very little practical value for most developers – sorry to tell you about this.

For a beginning, the separation of functionality for existing and new PDF files was a mistake, but there’s more important thing, that Aspose.pdf.kit functionality is very limited. Many developers won’t be satisfied by offered ways of extraction of plain text and images. Who cares about this stuff, by the way? Everybody can do it without expensive software, simply with various features of Adobe Acrobat.

But : most modern applications will require a complete or partial information about formats, paragraphs, fonts, images positions etc, etc. This information( theoretically, according your documentation) is placed in various collections of your PDF document, but impossibility to bind with a real PDF file forces developers to find other ways.

It is extremely easy to EXPORT PDF file content to XML.

Open Adobe software, run Adobe Acrobat, toolbar menu File, Export, chose XML – and - voila! Done! You have an XML file, this file will be, probably slightly different for each ADOBE release. Can you, folks, make a small investigation?

You can make this Adobe XLT as a default, by the way.

As result, you will have a real import feature and binding with existing PDF files in Aspose.pdf, and we, developers, will be able to get detailed info and use Aspose to build real-world applications! Thank you!

Thanks very much for your comment! You suggestion is great appreciated. We will investigate this issue and try to support it in the future version.