I am using the JODConverter web service to convert an ODT-document to a PDF-file. I have some working Ruby code, that will load up the ODT-file and convert it using the web service. The resulting PDF-file is then returned to me and I can easily save it.
When I try to do the same thing in ActionScript, I seem to be facing some issues with FlateDecode blocks in the PDF source. They are somehow altered (possibly because ActionScript strings are UTF-8). The result is that the resulting PDF-file is incomplete. Meta-information is correct, but the file appears to be blank.
I would appreciate any kind of feedback relating to this issue.
Related
I've got a bit of a problem with an xml tree in r. I have a treebank, containing the corpus - stuff I really need. What I want is to take the XML files, parse them with the help of the DTD on my computer, and then just create a corpus afterwards.
So far I've tried
xmlTreeParse(doc, options=XML::DTDLOAD)
and
xmlParse(doc)
and also
parseDTD(dtd)
but all of them throw back an error. First two still say "entity not defined", and the parsing function gives back "failed to load external entity "yaddayadda.dtd"". In this question the treeparse function was given as an answer, but it does not work for me. The xml files have a SYSTEM "../yaddayadda.dtd" designation.
What I plan to do with this, is to somehow create a VCorpus object in the tm package from the parsed text, to use it in later textmining research.
Could you help me please? Will provide further details if needed.
The parser, which you are telling to load the DTD, is seeing a reference to "../yaddayadda.dtd" and not finding it.
The most likely cause is that you have no file named "yaddayadda.dtd" on the appropriate file system, or that you have it in the wrong place; the parser should be looking for it in the directory one level up from the XML document which refers to it.
If you have it in what you think is the right location, then apparently you and the parser do not agree on what the right location is. Good luck.
I'm currently working on a project where I have to transfer an existing VB program into a Server Application using ASP.NET.
While I had success doing that there's one thing that I'm struggeling with:
The VB Program was using Microsoft Word Interop to generate Excel files and fill Word Templates with data. While i managed to be able to generate the files locally with Interop I can't get it to work for somebody that is accessing the Application from a client.
I also tried using OpenXML to solve my problem but somehow it always said that the file is corrupt after I tried to fill the bookmarks.
In the end the user shoud be able to download the Word document filled with the necessary data.
What would be the best solution for this problem?
If you have mostly the same document structure, you can prepare the whole document in Word. Set placeholders in the document like {Placeholder1} {Placeholder2}, parse the XML and Replace the Placeholders with your text, so you must not generate the whole document structure. Only Replace the Placeholders with your text.
A Question in my mind Is it possible to convert Postscript(PS) File Into Word(doc) file using Asp.Net? If Yes then how can we resolve it via C# Code.
I don't know of any tool which will convert PostScript to word. Not only that, but you certainly can't reliably do anything except render the whole thing to an image, and isert that as a graphic.
Up to a point you can extract text, what is it you actually want to do ?
Can you use PurePDF to view files or is the api only for writing them?
Based on the PurePDF Project Page, reading and extracting information from PDFs is supported:
read existing pdf documents (extract strings, streams, images and all the informations from them). See HelloWorldReader.as for an example
However, if you're looking to view / rasterize a PDF, that's a much more complicated task and doesn't look like it's supported as part of PurePDF.
I suggest converting the PDF into a swf file. There are a number of projects out there (including free / open source) that convert pages into SWF files, including being able to still extract the text. :D
It looks like you can either navigate to the url of the PDF (maybe in an HTML component?) , OR a richer solution might be to use the open source flex paper : http://flexpaper.devaldi.com/
I'm trying to use Adobe's OggVorbis library. But I can't seem to get the Sound object to loop.
I even tried looping the _sound object inside the AudioDecoder.as in the "com.automatastudios.audio.audiodecoder" package.
Do you really have to reload the file and stream it over and over?
If you're streaming, then yes you'll have to jump back the beginning of the stream. A stream, by definition, is a constant link to the server and does minimal loading of files locally.
But, if you're not really streaming, you should have no problem loading up a file and caching it locally then playing it over and over.
Since you mention Alchemy, there may be other unknown issues if you're trying to use a converted C library, as opposed to native ActionScript.
[Note; I didn't know the OggVorbis library for Flex before now].