On deploying latest Aspose 10.6.2 v getting NULLPOINTEREXCEPTION on save in UNIX env - aspose.pdf

I had migrated the jar to Aspose latest version(10.6.2) and successfully deployed on UNIX env. While saving the form in UNIX env I am getting NullpointerPointer exception.

My name is Tilal Ahmad and I am a developer evangelist at Aspose.
Please note on non-windows OSs subjected exception arises due to font folder path setting. You need to set font folder path according to your machine setting before using any other code, it will resolve the issue. For example on my Ubuntu server, I set font folder path as following.
// Set font folder path
String path = "/usr/share/fonts/truetype/msttcorefonts/";
// Adding a single font directory
// com.aspose.pdf.Document.addLocalFontPath(path);
// seting the user list for standard font directories
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();
list.add(path);
com.aspose.pdf.Document.setLocalFontPaths(list);
.....
.....

Related

node red cannot GET /myfile from directory

I would like to ask.
I have file in C:\users\nxf68958\.Node-red\report.html
And when I would like to open this file by: localhost:1880/report.html
I get:
Cannot GET /report.html
in Log I have: "Nov 09:52:00 - [info] User directory : \Users\nxf68958\.node-red"
I am using:
NR: 3.0.2
Node: 18.12.0
It worked perfectly on older versions of: NR: 2.2 and Node: 16.13.
Then I actualized and it stopped working.
In settings.js is option: "fileWorkingDirectory" I tried to change it, but without change.
What I am doing wrong?
Thank you
Node-RED will not serve static files by default, you have to explicitly enable it by settings the httpStatic option in the settings.js file.
Settings the httpStatic value to point to the userDir (which is what you have basically done by setting it to __dirname) is a bad idea from a security point of view because this means anybody can download your flows.json and flows_creds.json files and the files like settings.js and .config.runtime.json (which holds the default encryption key for the creds file).
fileWorkDirectory is purely to set the default working directory for the code nodes that interact with the filesystem, it will have no effect on what files are served by the HTTP server.

testcafe electron mainWindowUrl | what to do with tmp location

When using testcafe-browser-provider-electron, I get stuck with the mainWindowUrl. I have the original source file in the renderer folder, the version that is in the build folder and apparently a temporary created in some random /tmp/ folder. Testcafe suggests the /tmp/ file.
"Use the mainWindowUrl option to specify one of the following pages as the main window page:
file:///tmp/.mount_PROGRAM-Lbt5yL/resources/app.asar/build/renderer/index.html"
With the 6 chars being random.
How can I instruct testcafe that all files are identical?
I expected no error-message
Error: The main window page at file://....index.html was not loaded.
I reproduced this behavior. Please track the issue in the following thread: https://github.com/DevExpress/testcafe-browser-provider-electron/issues/87. We will research it and update the thread once we have any news.
Found out an alternative path to using the AppImage.
Use electron-builder to build a deb-package. Install that as it will always have the same path /opt/... to the unpacked content. You can then use that path in the specification of the mainWindowUrl.

Failed- Path too long error while downloading file in Chrome using selenium

I want to download file in my current working directory using selenium automation. But I am getting 'Path too long' error. The code I have written so far is:
os.chdir(os.path.dirname(__file__))
current_directory = os.getcwd()
windows_cwd = current_directory.replace('\\','\\\\')+'\\\\'
chrome_options = webdriver.ChromeOptions()
prefs = {'download.default_directory': windows_cwd,
'download.directory_upgrade': True,
'safebrowsing.enabled': False,
'safebrowsing.disable_download_protection': True
}
chrome_options.add_experimental_option('prefs',prefs)
browser = webdriver.Chrome(options=chrome_options)
My current working directory is:
C:\Users\US177\PycharmProjects\Plugin
where the path is too long.
But it successfully downloads to
C:\Users\US177\Desktop
failed-long path
I'm not exactly sure what your question is based on the information provided, but I'm guessing it's along the lines of "Why is this happening?", so I will address that question.
The maximum length of a file name in Windows is 260 characters. The file is able to download to your desktop because the name of the file (when appended to your path) does not exceed this limit. When trying to download to PycharmProjects\Plugin\ folder, the path has become too long.
While setting your download path, try using double backslash (ie. path\\to\\directory).
See this Github issue about programatically downloading from chrome

Playframework 2.5 and Intellij IDEA

I am using IDEA for my Playframework development. However, I don't seem to be able to run/debug my application anymore I was able to do two months ago. I haven't done any active development on this project, and there have been updates to IDEA.
When I now debug my application it doesn't not load the 'dev' configuration file.
This is specified as -Dconfig.resource=application.dev.conf under JVM options on the Run/Debug configurations.
This used to work fine, but it now loads the application.conf which contains the default db parameters to connect to a MySQL server and not the mem server. I don't think I have changed anything. A ny pointers what can be wrong?
I am still on sbt-plugin 2.5.16.
[Edit]
Loading config from properties {jline.esc.timeout=0, config.resource=application.dev.conf, java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib, java.vm.version=25.25-b02, user.country.format=IE, gopherProxySet=false, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=:, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=GB, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Users/xxx/Documents/Java/Y2kBooking, java.runtime.version=1.8.0_25-b17, java.awt.graphicsenv=sun.awt.CGraphicsEnvironment, java.endorsed.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/endorsed, os.arch=x86_64, java.io.tmpdir=/var/folders/6g/mllv8zcn73v3p9mgt8f78jd80000gn/T/, line.separator=
, java.vm.specification.vendor=Oracle Corporation, os.name=Mac OS X, sun.jnu.encoding=UTF-8, java.library.path=/Users/xxx/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:., jboss.modules.system.pkgs=com.intellij.rt, java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=10.13.2, http.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, user.home=/Users/xxx, user.timezone=Europe/Dublin, java.awt.printerjob=sun.lwawt.macosx.CPrinterJob, java.specification.version=1.8, file.encoding=UTF-8, user.name=xxx, java.class.path=/Users/xxx/Library/Application Support/IntelliJIdea2017.3/Scala/launcher/sbt-launch.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Users/xxx/Library/Caches/IntelliJIdea2017.3/captureAgent/debugger-agent.jar, jline.shutdownhook=false, java.vm.specification.version=1.8, sun.arch.data.model=64, java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre, sun.java.command=xsbt.boot.Boot run, java.specification.vendor=Oracle Corporation, user.language=en, awt.toolkit=sun.lwawt.macosx.LWCToolkit, config.trace=loads, java.vm.info=mixed mode, java.version=1.8.0_25, java.ext.dirs=/Users/xxx/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, sun.boot.class.path=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/classes:/Users/xxx/Library/Caches/IntelliJIdea2017.3/captureAgent/debugger-agent-storage.jar, java.vendor=Oracle Corporation, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeBig, socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16, ftp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, sun.cpu.isalist=}
Loading config from class loader sbt.PluginManagement$PluginClassLoader#4cc89246 but there were no resources called application.dev.conf
exception loading application.dev.conf: java.io.IOException: resource not found on classpath: application.dev.conf
Loading config from a String akka {
log-dead-letters = 0
log-dead-letters-during-shutdown = off
}
Loading config from resource 'reference.conf' URL jar:file:/Users/xxx/.ivy2/cache/scala_2.10/sbt_0.13/com.typesafe.sbt/sbt-js-engine/jars/sbt-js-engine-1.1.3.jar!/reference.conf from class loader sbt.PluginManagement$PluginClassLoader#4cc89246
Loading config from a URL: jar:file:/Users/xxx/.ivy2/cache/scala_2.10/sbt_0.13/com.typesafe.sbt/sbt-js-engine/jars/sbt-js-engine-1.1.3.jar!/reference.conf
Try debugging the configuration loading with -Dconfig.trace=loads as described here.
The -Dconfig.resource option loads a file from the classpath so make sure that file is in your IntelliJ classpath. I assume you put the file in the usual conf directory? You may need to check the IntelliJ Project Structure settings to make sure it includes that directory as a Resource Folder.
Finally, you may wish to check that the application works correctly when run using sbt run or sbt start.

FDT5 Haxe Compilation Error "Uncaught exception - module.c(124) : Builtin not found : fasthash"

I am a user of FDT5 and getting this very strange Haxe compiler error when using v2.09 of Haxe and v1.8.2 of NekoVM.
"Uncaught exception - module.c(124) : Builtin not found : fasthash"
Can anyone help me resolve this error as can't compile my FDT5 project, as if I compile it directly in Mac OSX Lion. Terminal it does not report any issues.
Any help would be most appreciated.
You may need to setup the path to your Neko installation
FDT 5.5 ships with Neko, but the path to it is not set by default. Because it's not, you may get errors as you mentioned:
To fix this, go to Preferences>Haxe>Neko VM and point to a Neko installation directory.
Custom Installation Directory
You can point to a custom installation. Perhaps if you used the standalone installer from the Haxe website.
Using FDT's Neko Installation
For windows you can just point to FDT5>haxe>neko-1.8.2-osx
For OSX, because FDT is a self contained package, you can't naviagate to Neko via the OSX GUI. Instead type in this path, or copy and paste the path from where your Haxe location is set and paste it into the Neko location. Then just change the last directory name to the name of the Neko folder: haxe-2.09-osx -> neko-1.8.2-osx.