Is OpenLaszlo supported in custom browsers that are created through adobe air? - air

Recently i am seeing a number of issues that are happening in our custom based browser but its not happening in the browsers like mozilla or chrome.
One example is mouse cursor i have given a custom cursor to it onmouseover of a window. This is working fine in Mozilla, chrome and in IE but not in the Adobe Air browser we created. I can see the custom cursor but there is lot of flickering between the custom cursor and the normal mouse pointer.
Is this an issue or there is an work around for this to support the adobe air browser? I am using Adobe AIR 3.4.

I haven't heard anything about Laszlo testing Adobe AIR apps, especially with the AIR releases in the past two years. The AIR browser has never been supported officially.
I'm assuming that you are still embedding an SWF into a HTML page for your AIR app. When using AIR with OpenLaszlo, I'd always generate an ActionScript 3 based AIR app (not embedding an app SOLO compiled to an SWF into an HTML container). That way, I can use Flash Builder to debug any problems, which makes things a lot easier than debugging embedded SWFs. If you plan to deploy a DHTML runtime app, there's of course no way around embedding the OpenLaszlo app into an HTML container.
Update: Flash 10.2 and higher support native cursor integration (native here means operating system), which provides MUCH better performance. Here's a general description of the API in an Adobe blog post: http://www.adobe.com/devnet/flashplayer/articles/native-mouse-cursors.html
It's technically possible to use the native cursor with OpenLaszlo, I've created a proof-of-concept - but it only works with a heavily modified version of the LzMouseKernel.as class (from the SWF9 kernel files in the LFC), since the kernel will always reset the cursor for various mouse events. And since native cursors require at least Flash 10.2, this is only possible with the SWF11 branch of OpenLaszlo.
I suspect that the problems you are seeing are connected to the way OpenLaszlo enables custom cursors (which is done by hiding the native mouse cursor and moving an sprite around following the invisible mouse cursor position).

Related

How do I fix garbled text in my react-pdf viewer?

I have created a pdf viewer using react-pdf. When I display certain pdfs, the text is choppy and unreadable. I have tried zooming in and out of the document and it is choppy in different ways at different scales. Sometimes the text even looks okay at a certain scale after zooming out and then zooming back in.
(Sample at 1.5 scale)
(Sample at 1.6 scale)
At first, I thought it might be an issue with react-pdf, but I saw that react-pdf is basically a wrapper around PDF.js. I found that I can replicate the issue in the PDF.js demo page.
Unfortunately, I'm working with a pdf that contains identifying information, so I can't share the full pdf or full screenshot. I'll include as much as I can figure out to share.
What I have tried
My initial thought was that maybe the component was rendering small initially and then had issues scaling up. So I made the initial size really large, but that didn't fix it.
I made sure that standard fonts were included following the instructions on the react-pdf home page
I tried using pdf repair tools online to maybe fix the pdf itself. That didn't help.
I tried changing the renderMode to 'svg' as detailed in the Document api documentation. This was the most helpful fix, as it does render the text correctly, but it then makes it so the images on the pdf don't load.
Thanks for your help/suggestions.
If I can find a way to edit the pdf to not have sensitive information, I'll try to find a place to make it available for testing. I apologize that I cannot provide that at this time. I know it's difficult to give advice when you can't replicate it yourself. I'll work on that.
From a programming point of view there is only "Providing a standardFontDataUrl and disabling the font face" (see later), however it affects many pdf.js based code developers outputs, thus I consider as still "OnTopic"
This issue is still open in react-pdf, though I have seen it mentioned by other pdf.js users since mid year (MS or Chrome update ?) , so unsure if it is not a wider fail affecting Mozilla PDF.js code users.
https://github.com/wojtekmaj/react-pdf/issues/1010
https://github.com/wojtekmaj/react-pdf/issues/1025
There semes to be earlier reports back in Early March and then later suggestions to change win 10 drivers. However also reported by win 11 Pro users. PDF.js versions from 2.8.335 to 2.14.305, and it doesn't affect version 2.7.570. so partially down to updated versions ! But seen only in Chromium.
It is entirely possible that we started doing something that trips Chrome,
The symptoms seem to be hardware or settings orientated since it is reportedly seen on some identical groups of users but not affecting others.
toggling back and forth between single page and multi-page views the issue resolves. It also seems dependent on the resolution or appears on some machines and not others so it is a little tricky to repro.
I am not getting it personally, but a guy in my team get it.
Unclear which browsers are affected but looks like its a chromium / web kit rendering bug ?
Several browsers have been tested and only chrome faces this.
My colleague gets the same in Edge Version 101.0.1210.47 (Official build) (64-bit) and Brave (1.38.118 Chromium 101.0.4951.67) Will edit the issue
The suggested workaround is :-
Providing a standardFontDataUrl and disabling the font face fixes the issue.
if we disable Accelerated 2D canvas in chrome://flags then the preview appears nice and okay. But since this flag is on by default so user see the pixelated preview. Unless we ask them to turn off this flag.
Figured out that this only happens when hardware acceleration is enabled in your Chrome settings.
When its turned off the issue does not happen.
In address bar paste chrome://gpu or edge://gpu etc (its a long report of current onboard fixes) in my case (currently unconfirmed via reboot for my Edge) is showing Accelerated 2D canvas is unavailable: either disabled via blocklist or the command line. Disabled Features: 2d_canvas, thus I cannot see problems.
To change setting you can use
chrome://flags/#disable-accelerated-2d-canvas
but its a manual choice between options.
so on reboot I see
Graphics Feature Status
Canvas: Hardware accelerated
Canvas out-of-process rasterization: Disabled
but have little problem with the domo (except normal fuzzy text as pixels) so either Edge update or my hardware is not visibly affected or my default settings are reasonable.
This issue has been finally fixed in the latest version of react-pdf library. Check here: https://github.com/wojtekmaj/react-pdf/releases/tag/v6.2.2
I also faced the same error and I fixed it by setting render mode to canvas (earlier it was SVG) and scale value to more than 1. Try scale = 1.5

Is that possible to play pdf files in flash player VB? [duplicate]

I try to open PDFs or folders (in finder/explorer) triggered by a mouse click in a swf application running in flash player.
Opening a PDF via urlRequest and navigateToUrl() always opens the browser.
I read about this solution with fscommand and it seems that we have to write shell scripts for mac and PC. Doesn't sound perfect.
The swf is executed on cd ROM. So I think we can't use an air application and the classes of the air framework (File... etc.).
Is there a better way?
As far as I know, you unfortunately cannot open a PDF into flash natively. It sounds like these *PDF*s are static assets on your CD ROM so I would take a look at a PDF -> SWF conversion tool. Maybe something like swftools. All of this in efforts to replace your current *PDF*s with *SWF*s which you can then load via the flash.display.Loader class.
we go now with zinc. it seems to be very powerful. you can create a exe from any swf. zinc let´s you implement many functions in actionscript, that give you access to the system. open pdf or something it the smallest task then :) cheers, florian

In search of a lightweight pdf viewer

I am looking for a lightweight pdf viewer ( commercial / free) for my windows application.
I presently display the pdf documents on a webbrowser with Adobe Reader Plug-ins.
Background :
The problem i am having with Adobe Reader is the Loading time. To display a pdf document for the very first time, Adobe Reader nearly takes 15 seconds !! .The application when deployed on customer locations (usually run on Windows Embedded OS) the pdf viewing time is still worse, sometimes takes more than a minute.
Hence i need to find an alternative for Adobe Reader.
My simple requirements are :
Lightweight - viewer should initialise itself and load the pdf as
fast as possible.
SVG support.
If anyone has any idea regarding such a tool. Kindly let me know
Regards
Srivatsa
Try : Foxit PDF SDK
Try SumatraPDF (Download full kit for MOZ plugin npPDFViewer.dll sorry there is NO IE.OCX)
For a minimal install use with the portable executable in same directory and you can call via DDE or command line
I think best light weight option for Windows is MuPDF for those who would rather not use any plugin in the Chrome.
http://mupdf.com/

DirectShow interpolation (pixelization) problem with VMR9 windowless

For a .net project, I use DirectShow (through DirectShow.net) with the VMR9 in windowless mode for video display.
On Windows 7, I noticed a pixelization problem when the video is resized (magnified).
I can’t find how to tell the VMR9 to use a specific interpolation algorithm (i.e. bicubic).
It looks like, by default, it uses none.
I would like to avoid using my own allocator-presenter for this task.
Thank you for your help.
You should use the EVR rendered on window7 to avoid pixelated video.
See this question:
WMV media streams appear more pixelated on Windows 7 than on XP
Evr comes with it's own set of problems, I've found that resizing an EVR rendered stream is slow / jerky. And EVR is only available on vista and later operating systems. Stick with vmr9 for xp.

Open a PDF file in an external app on iPad

I'd like to make my app to open a specified PDF by an external app of the user's choice on the iPad. How can I do that? Or, is there any open-source PDF reader framework available so that I can put it into my app?
My situation in more detail:
I'm thinking of porting to the iPad from OS X / rewriting from scratch for the iPad an app which manages lots of PDFs (journal articles, etc.), but I don't want to write the PDF reader part, because there are many good ones already out there; I don't want to reinvent the wheels.
(You might say you shouldn't reinvent pdf management apps, but I'd like to make one as a front end to SPIRES, and there isn't one so far.)
As the app would be a front end to a serious reading activity, UIWebView's pdf capability is not enough.
Also, users of my app would have various preferences which app to use.
That's the background behind my question. Thanks in advance!
Here's my self-answer:
Use UIDocumentInteractionController. See this Apple doc.
The problem now is to find a way to choose programmatically exactly with which app you open a document, when multiple apps are available to a same file type.
Its not that hard to view PDFs without a UIWebView. You use some Quarts 2D drawing but a large majority of the work is done for you. You mainly have to choose how you will flip pages, and do pinch to zoom.
Quarts 2D PDF reference
You aren't able to search inside of PDF files. You can't access the text. You could do annotation, but it would be a hack at best.