Syncfusion Webkit rendering engine binaries notarization on MAC - macos

I am using html to PDF conversion using syncfusion webkit rendering on MAC os. It works fine until I notarize my app. When I tried to notarize my app, I got errors like QtMacBinaries are not signed.
I signed all QtMacBinaries using my developer id certificates. Now notarization got success but html to PDF conversion is failing.
I am getting below error:
Syncfusion.Pdf.PdfException: dyld: Library not loaded: #rpath/libQt5Core.5.dylib
Referenced from: /Users/sangapankaj/Projects/TestConverter/bin/Release/TestConverter.app/Contents/Resources/QtBinariesMac/Syncfusion.WebKitWrapper
Reason: image not found
,'Html conversion failed
Syncfusion version: Syncfusion.HtmlToPdfConverter.QtWebKit.Net.Core.18.2.0.44,
OS: MAC 10.14,
Compiler: Visual Studio 2019,
Language: dot net
I am not sure what I am missing? Main culprit is Syncfusion.WebkitWrapper binary. It is not able to load QT libraries if I have signed it with my developer id certificates. If I use it without signing, it works fine.
Code
HtmlToPdfConverter htmlToPdfConverter;
WebKitConverterSettings webKitConverterSettings;
PdfDocument pdfDocument = null;
try
{
htmlToPdfConverter = new HtmlToPdfConverter();
webKitConverterSettings = new WebKitConverterSettings();
webKitConverterSettings.WebKitPath = "/Applications/MacUncle OLM Converter.app/Contents/Resources /QtBinariesMac";
htmlToPdfConverter.ConverterSettings = webKitConverterSettings;
string strTempPath = Path.GetTempPath();
pdfDocument = htmlToPdfConverter.Convert(bdy, strTempPath);
}
catch(Exception e)
{
string exp = string.Format("{0} exception caught", e);
Log.WriteErrorLog(exp);
}

We have checked the reported issue in our end, but we did not face this error in Mac with our WebKit converter. We internally make use of the QtWebKit rendering engine for converting HTML to PDF We have to provide the WebKitPath as folder location of QtBinariesMac path in your machine.
We have analyzed about the reported issue, we suspect the issue occurs due to the signed binaries not loaded properly in your application. After the notarization, If the binaries are compressed in any format (.pkg), please extract it and try the conversion. However, please make sure that you are running the latest XCode version where the conversion take place. Please try the below suggestions in your end and let us know the result.
https://developer.apple.com/forums/thread/124810
https://developer.apple.com/forums/thread/128435
https://github.com/Alamofire/Alamofire/issues/3051#issuecomment-580003683
Note : I work for Syncfusion.

Related

event.object.lastVisionImage.getBitmap is not a function

I am doing a small project on Nativescript, using the ML kit for face recognition
My task is to take a photograph after a face has been recognized. On Android, this function works fine and the image is saved, but on iOS, an error occurs.
Tell me, what could be the problem and how to solve it?
const bmp = event.object.lastVisionImage.getBitmap();
const source = new ImageSource();
source.setNativeSource(bmp);
var imageData = source.toBase64String("jpeg");
'NativeScript encountered a fatal error: TypeError:
event.object.lastVisionImage.getBitmap is not a function. (In
'event.object.lastVisionImage.getBitmap()',
'event.object.lastVisionImage.getBitmap' is undefined)
Does this come from this unofficial plug-in?
https://market.nativescript.org/plugins/nativescript-plugin-firebase-mlkit-unofficial
I'm afraid MLKit team doesn't officially support the NativeScript plugin, posting the question in the community of the plugin provider might get an answer more efficiently. Thanks!

Xamarin looking for resources at the wrong place

Environment: Visual Studio 2015, Xamarin 4.7.9.45, Xamarin Android 7.4.5.1
My development environment used to work fine until yesterday and now I am not able to debug properly. While loading string resources, the following code from AppResources.designer.cs throws a "file-not-found" exception:
public static string Button_Username {
get {
return ResourceManager.GetString("Button_Username", resourceCulture);
}
}
The resource culture is "en-US." The string resource Button_Username is indeed defined. Otherwise, the above lines of code wouldn't even be there in the auto-generated AppResources.designer.cs file.
Upon inspecting the exception in the debugger, it appears Xamarin is trying to load the following file:
/storage/emulated/0/Android/data/myapp.mycomp.com/
files/.__override__/en-US/MyProject.resources.dll
We generate MyProject.resources.dll for many other languages but not en-US as it is the default language. Why is Xamarin trying to load this dll? Shouldn't it be looking into resources.arsc file? Regards.
We generate MyProject.resources.dll for many other languages but not en-US as it is the default language. Why is Xamarin trying to load this dll? Shouldn't it be looking into resources.arsc file?
resources.arsc works for Android Native localization. But you are currently developing a Xamarin.Forms App and using its localization, where the related .resw files will be complied into MyProject.resources.dll and as your project sets en-US as the default culture.
If you have created AppResources.en-US.resw file and current culture is en-US. Your app will try to look for this file, which is contained in .../en-US/MyProject.resources.dll.
If you didn't created AppResources.en-US.resw your app will search the string in AppResources.resw file.

Export to PDF file

I am evaluating Teechart 4.1.2012.2287 and I have a problem with the export to PDF function.
My project is written in VS2010, using VB.Net and framework 4.0, and I have Adobe Reader 9.4.7 on my PC.
When I try to open a PDF generated by TChart it says there is an error with the file.
I also get this problem using your Example application.
Is there a version requirment for the Reader?
I'm afraid this is a bug. I get this error message:
An error exists on this page. Acrobat may not display the page
correctly. Please contact the person who created the PDF document to
correct the problem.
Do you get the same? Anyway, I added the issue (TF02016129) to the bug list to be investigated.

ABCPDF6 issue: "HTML render is blank" but web page output is fine

Like the title says, we are using ABCPdf6 to render PDFs from XSLT. Everything was working fine, but now we are getting an error that states "HTML render is blank". Using a browser (tested on IE/Firefox/Chrome) I am able to browse to the generated HTML (formatted XSL) and it displays perfectly fine in the browser. ABCPDF6 is not able to convert the file. I have tried giving control to the page that outputs the XSL, but I am still getting this error.
Does anyone have experience with ABCPdf and have encountered this before? The code was working fine before without a problem, and another page that uses the exact same generating code (even pointing to the same placeholder page that spits out the HTML!) is working fine.
I know what the problem was in my case now.
When i ran Windows update on my 2008 server, Internet Explorer 9 was installed.
IE 9 has a different way of rendering HTML which brakes abcPDF.
Updating to the latest version (8) solved all my problems. In this version you can also try another HTML engine called Gecko.
Even though you have resolved your problem, if anyone else gets this error, I would suggest that you install the trial version and try this out with the latest version.
I had same error on windows 7 machine with AbcPdf4.0. During MS updates IE8 was upgraded to IE10. Issue got fixed by uninstalling IE10.
Note: Abcpdf4.0 does not work with IE9 onwards. Either upgrade Abcpdf or uninstall latest IE.
I had a similar issue this morning with AbcPdf9. I added code to test the engine types and GECKO worked, then I swapped it back to MSHTML, and it still worked. So it was a temporary issue.
This is how you specify the engine type:
using (var document = new Doc())
{
document.HtmlOptions.Engine = EngineType.Gecko;
...
...
}
This code calls the method that converts the html to PDF, but calls it twice if necessary, since it will only fail once:
try
{
return GeneratePdfFromHtml(html, width, EngineType.MSHtml);
}
catch (Exception ex)
{
/* detect this known issue, swapping the rendering engine once seems to fix it */
if (ex.Message.ToUpper().Contains("BLANK"))
{
return GeneratePdfFromHtml(html, width, EngineType.Gecko);
}
throw;
}
Then you can add a parameter to the method that does the conversion:
public byte[] GeneratePdfFromHtml(string html, int width, EngineType engineType)
{
if (string.IsNullOrWhiteSpace(html)) throw new ArgumentNullException("html");
if (width < 100) throw new ArgumentOutOfRangeException("width");
try
{
using (var document = new Doc())
{
document.HtmlOptions.Engine = engineType;
...
...
If you have a suggestion or different solution, please leave a comment.
In regedit use the following steps
1)HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
2)Create a key DWORD 32 Bit
3) Rename it "w3wp.exe"
4) Set Value Date = 1

Watin 2.1 error with Firefox 3.6 ContainsText and jssh

I have had problems using Firefox with Watin 2.0 and the recent 2.1 release.
FireFox: 3.6.17
Watin: 2.1.0.1196
Gallio / mbUnit: 3.2.601
Windows Server 2008 32 bit
.NET 4.0 assemblies
Visual Studio 2010
I went over these instructions repeatedly:
http://watin.org/documentation/setting-up-firefox/
I went to Firefox, File->Open, navigated to the file: jssh-3.6-WINNT.xpi
Installed the XPI in Firefox without any problem.
A few things do work fine in FF with Watin. Finding text fields, TypeText, Click, all that works. But this line of code blows up:
Assert.IsTrue(theBrowser.ContainsText(validationText), "Listing '{0}' was not found in the results.", validationText);
See below for the error. Any idea what I did wrong?
WatiN.Core.Native.Mozilla.FireFoxException: Error sending last message to jssh server: SyntaxError: missing ) after argument list
C:\QEDev\tools\WatiN\source\src\Core\Native\Mozilla\FireFoxClientPort.cs(422,0): at WatiN.Core.Native.Mozilla.FireFoxClientPort.CheckForError(String response)
Another user here on StackOverflow answered this question in a separate thread. Here is one workaround:
Sub-class based off of Watin's Firefox class
Override the ContainsText method
Use the HTML Agility Pack to load the document and call the Contains method.
This seemed to work fine for a while. On other computers I saw the same JSSH error as before.
public override bool ContainsText(string text)
{
WaitForComplete();
var htmldoc = new HtmlDocument();
htmldoc.LoadHtml(Html);
bool result = htmldoc.DocumentNode.InnerText.Contains(text);
return result;
}

Resources