BB Download a XML from String url - c++

I figured how to use RapidXML a C++ Lib to parse pretty much everything from my XML provided by my API what I need to do now is actually get the XML on to my BlackBerry Dev Alpha B running a BB 10.2.0
What would be the proper way to download a XML file via String/url. Also any fellow developers here who made the transition from Android/Java to BB/C++ any recommendations on how to make the transition smoother.

Related

How can I convert an AIML file to CSV file?

I am trying to make a chatbot android application. Please tell me how can I convert my .aiml file to .aiml.csv
If you want to know the process, you may go through Google's Program-AB and understand how it processes all tags. Also, it is build in Java so you can copy these classes to your application.
https://code.google.com/archive/p/program-ab/source

Epub library for C++

Is there any library in C++ for creating Epub files, I need to use it with Qt.
My program can export html & css, but I don't know how to convert that to an Epub.
from my googling efforts it appears that most of it is hand written and their isnt a globally accepted SDK. i found a nice tutorial for you which walks you through making epub files. and i did see some other links about using it with QT. maybe someone knows of a good open source project thats somewhere?
epub tutorial
Once you've got the HTML and CSS, you're most of the way there; what remains is the content.opf file, which basically lists all the files in the epub document and the overall metadata (author, publisher, ISBN, etc); and the table of contents. epub 2.0.1 uses the toc.ncx file as a table of contents--it's basically an xml document. epub 3.0 uses the toc.xhtml, which is much more intuitive--it's essentially an ordered list in a nav element. You can do either epub 2.0.1 or epub 3.0; there's enough backwards compatibility built in that older devices will be able to read an epub 3.0 file--as long as you include both a toc.ncx and a toc.xhtml.
You may have to tinker with your CSS; epub doesn't support everything, and the device manufacturers all seem to interpret things differently; it's very "browser wars"-ish.
I find the IDPF's epub spec is the best place to go for formatting info. Here's the relevant bits:
content.opf
toc.xhtml
toc.ncx

Converting HTML file to PDF using Win32/MFC

As part of my application, my client has requested that I include an automated e-mailing system. As part of this system, I generate HTML code and use automation to send it via. Outlook.
However, they also require a PDF copy of the HTML document to be sent as an attachment. My initial attempts involved using libHaru, which proved difficult to use efficiently, as I was required to create the PDF document from scratch, which required computation of the position of each of the lines in a table, and positioning of all the text, etc.
I was wondering if there would be a way to programmatically convert HTML code (or an HTML file if need be) into a PDF document either by using Win32/MFC itself or an external library.
Thanks in advance!
EDIT: Just to clarify, I am looking for solutions which minimize external dependencies.
You should evaluate this utility wkhtmltopdf:
http://code.google.com/p/wkhtmltopdf/
You can call it from the command line without the need to run a setup.
I use it generating my output documents as html then cal a ShellExecute(...) to convert it to PDF. It's great!
Inside uses webkit + qt. So compability with modern HTML is OK.
Hope it helps.
I'd take a look at PDF Creator, which can be used as a COM object (that acts pretty much like a printer). I haven't used it to print HTML, so I'm not sure, but my guess is that you'll probably end up having to instantiate a web browser control to render the HTML, and then feed it from there to the PDF control.
Some possible answers are in this thread:
C++ Library to Convert HTML to PDF?
Not sure if they will satisfy your particular requirements, but these might at least get you started.
Edit:
Some other possible options here.
Not MFC but you can try QtWebKit. It can render and export HTML to PDF, PNG, JPEG

Storing UTF-8 XML using Word's CustomXMLPart or any other supported way

I am writing a Word add-in which is supposed to store some own XML data per document using Word object model and its CustomXMLPart. The problem I am now facing is the lack of IStream-like functionality for reading/writing XML to/from a CustomXMLPart. It only provides BSTR interface and I am puzzled how to handle UTF-8 XMLs with BSTRs. To my understanding an UTF-8 XML file should really never have to undergo this sort of Unicode conversion. I am not sure what to expect as a result here.
Is there another way of using Word automation interfaces to store arbitrary custom information inside a DOCX file?
The "package" is an OPC document (Open Packaging Convention), which is basically a structured zip folder with a different extension (e.g. .pptx, .docx, .xps, etc.). You can get that file in stream and manipulate it any which way you like - but not artibitrarily. It will not be recognized as valid docx if you put things in the wrong places (not just xml elements, but also files in the folders inside the zip file). But if you're just talking "artibitrary" meaning CustomXMLPart, then that's okay.
This is a good kicker page to learn more about the Open XML SDK and if you're up to it, which allows for somewhat easier access to the file formats than using (.NET) System.IO.Packaging or a third-party zip library. To go deeper, grab the eBook (free) Open XML Explained.
With the Open XML SDK (again, this can all be done without the SDK) in .NET, this is what you'll want to do: How to: Insert Custom XML to an Office Open XML Package by Using the Open XML API.

Help programmatically add text to an existing PDF

I need to write a program that displays a PDF which a third-party supplies. I need to insert text data in to the form before displaying it to the user. I do have the option to convert the PDF in to another format, but it has to look exactly like the original PDF. C++ is the preferred language of choice, but other languages can be investigated (e.g. C#). It need to work on a Windows desktop machine.
What libraries, tools, strategies, or other programming languages do you suggest investigate to accomplish this task? Are there any online examples you could direct me to.
Thank-you in advance.
What about PoDoFo:
The PoDoFo library is a free, portable
C++ library which includes classes to
parse PDF files and modify their
contents into memory. The changes can
be written back to disk easily. The
parser can also be used to extract
information from a PDF file (for
example the parser could be used in a
PDF viewer). Besides parsing PoDoFo
includes also very simple classes to
create your own PDF files. All classes
are documented so it is easy to start
writing your own application using
PoDoFo.
iTextSharp is a free library that you can use in .Net applications. Take a look at the iText page - that is for the iText project, which is a Java library. iTextSharp is part of that project, and is a port to C# and .Net.
Consider Python It have a lot PDF librarys (both creating and extracting) eg:
http://pypi.python.org/pypi/pdfsplit/0.4.2
http://pypi.python.org/pypi/JagPDF/1.4.0
http://pypi.python.org/pypi/pdfminer/20091129
http://pypi.python.org/pypi/podofo/0.0.1
http://pypi.python.org/pypi/pyFPDF/1.52
There are also good tools for using C/C++ code in Python and to create .exe form Python scripts. If you decide to use different language consider Python as prototyping language!