Bad Argument when importing a webpage in Microsoft's QNA Maker - qnamaker

In QNA Maker:
I try to import a webpage: https://www.xtopia.io/_testing/huisheng/faqtest.html
Received error:
Bad Argument
Failed to extract QnAs from the source https://www.xtopia.io/_testing/huisheng/faqtest.html - Unsupported / Invalid url(s). Failed to extract Q&A from the source
How do I know what is the problem?
Thanks
Searched for [QNA Maker] Bad Argument but no solution

The above error means that QnAMaker does not support the file format/URL uploaded. QnAMaker supports a certain set of files and URL data types. As per the documentation, QnAMaker allows the following file formats for creating a knowledge base: PDF,word, xls, tsv and txt. What you can do is convert the .html to pdf/tsv/txt file and then upload it to populate your KB on the QnAMAker portal.
The linked documentation will give you a better idea of what formats the QnAMaker accepts.
Hope this helps!!

Related

Can't send a binary attachment to Slack using LogicApp

I'm trying to use a logicapp to get the content of an email and post it to slack. By content I mean:
the body of the email and other elements like From:, Subject:
any attachment in the email (which usually are binary like PDF, Excel, image)
the email itself saved in a blob as .eml file
Slack chat.postMessage API works without any problem to send any text element. This API has some attachment argument but doesn't seemto be designed or binary files (or not for files at all, only strings)
I've tried slack files.upload one but couldn't figure out the syntax, especially the syntax using a regular HTTP POST. Could find examples online using curl, Python, JS and C# SDK but I don't know how to translate them to HTTP POST just like I do with chat.PostMessage
I've tried the API on SOAP UI, using file as argument as per the documentation, and I've used it in different sections: in the header, in the body, and using the Attachment Tab, none of the work and always the same error message : no_file_data
Unfortuatelly slack documentation lacks of details. Here's what it says about files.upload:
You must provide either a file or content parameter.
The content of the file can either be posted using an enctype of multipart/form-data (with the file parameter named file), in the usual way that files are uploaded via the browser, or the content of the file can be sent as a POST var called content. The latter should be used for creating a "file" from a long message/paste and forces "editable" mode.
In both cases, the type of data in the file will be intuited from the
filename and the magic bytes in the file, for supported formats.
I could use alternatives like just saving the attachments in blobs and use Azure functions to send the file, but I want to understand what's the limitations before changing the method.
Any clue?

How do I use Google's Vision API to convert a PDF (non-searchable) to a searchable PDF?

From what I've seen, Google's Vision API lets you perform OCR on a PDF, but it returns only the detected text in a JSON format. What I need is a searchable (OCR'd) PDF file in return. Is this possible?
Notice that the OutputConfig type doesn't have any metadata field to configure the resulting file's format. As you are already aware, the API returns a JSON response. You could either first get the JSON data with the API and explore the use of any of the following repositories for JSON to PDF conversion or directly use any specialized module such as OCRmyPDF that specifically serves this purpose on your source PDF and avoid the use of the API altogether.

In wso2 Dropbox connectors, getfile will get only xml files not get any other formats like .html, .doc

****In wso2 Dropbox connectors, getfile will get only xml files not get any other formats like .html, .doc can u please tell me the answer i need all types of formats .**
Please enable/add the relevant message builders and formatters in axis2 configuration (\repository\conf\axis2\axis2.xml).
eg : For HTML files you need to add the following message builder and formatter.
<messageFormatter contentType="text/html" class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
<messageBuilder contentType="text/html" class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
Please find more details in documentation and this article.
In addition to that we are doing a new connector to support latest drop box api version. Use the following link to followup.
https://wso2.org/jira/browse/ESBCONNECT-105

Adobe API to convert Office documents to PDF

Is there any API available by Adobe that would enable me to convert Office Documents (docx, xlsx, pptx, etc.) files to a PDF file format?
I would prefer to use .NET to do so, but if I have to I can resort to C/C++.
I've already tried using Adobe SDK, but it seems to me it works to automate the Acrobat application instead of giving me access to underlying functionality. If it's possible and anyone would care to give me an example, I'd be very thankful - after many hours googling it I was unable to find a good answer (a lot of samples doing the contrary, though - converting from PDF to Word).
One last thing, I need it to be an library from Adobe. So, PDFCreator, BCL EasyPDF, Aspose.Words/Cells/Slides etc., unfortunately, won't help me.
UPDATE 1:
I decided to ask this question in the forum because, first, I can't believe that Adobe wouldn't have a library to do this; Of course, it may be the case, but it's very strange.
UPDATE 2:
I also looked already into AdobePDFMakerX.Word interface. I tried calling the CreatePDF(string in, string out) interface, but to no avail. It always returns false, and there is no error description that I can use.
want to convert doc file to pdf file using Adobe pdf service api
In short it has two parts:
make a post request ( providing require parameters ) and from header take x-request-id
make a get request ( providing require parameters ) and as responce you will get your pdf documet
it is working fine
Are you sure Aspose.Words didn't work for you? I tested the below code sample and works fine.
string filePdf = #"D:\\Projects\\original.pdf";
string fileDocX = #"D:\\Projects\\New.docx";
Aspose.Words.Document doc = new Aspose.Words.Document(fileDocX);
doc.Save(filePdf, Aspose.Words.SaveFormat.Pdf);

Loading dynamically generated KML into google maps api

I have a bit of an issue with loading a dynamically generated KML into google maps api.
The KML file is generated by oracle and is of the format
http://server/oracleservioce.method?parm1=100&parm2=100
If I try and load that uRL (endcoded or decoded) I always get a KMLLayerStatus as INVALID_DOCUMENT.
If I save the resultant file to a local file with a KML extension it works foine, otherwise I get errors.
I even tried renaming the file to .xml and .dat (arbitrary names) and they all fail. It seems that google api need the file to have a .KML extension. This will not work in the dynamic environment. Can anybody suggest a way forward?
Thanks,
PS: I Need to use google maps API, I can not use openlayers or any other solution. The file needs to be loaded into a google.maps.kmllayer object.
I did this, no matter on the extension, but you have to set the mimetype on the http response: https://developers.google.com/kml/documentation/kml_tut#kml_server