Print a view with images and text - macos

I have spent some hours reading Google and Stack Overflow on this, the result is an increase in bafflement!
I would have thought what I am trying to do would be easy.
I have a view that includes a background image and overlayed text (its a certificate) that needs to be printed. I have the view displayed, now need to print.
I have tried following macOS Printing in Swift
and to get the window How to access own window within SwiftUI view?
The app is OSX desktop Swift and Xcode etc all latest versions.
I would post sample code but I am at a loss as at what wat to do it. Do I need the host window? Do I need to create a view just for the print? Do I need NSPrintOperation?
Many thanks.

Related

Flutter Windows app crashes without error while loading multiple images from local disk

I created a multi image selector form field widget to use within a form with validation and so on, and it works fine; however, when I select 8 or more images from a file picker at once and add them to the selected images list, which would be displayed in an image widget within a GridView, the app crashes without any errors.
I even tried the app on Android to see if it happened there, but everything was OK even when I added 10+ images at a time.
I'm wondering if there's any way to debug this because I'm at a loss for what to do right now with no errors.
i've tried these:
Using a 50x50 pixel size cache for the selected image list to avoid loading a large amount of data at once
It turned out to be file_picker v4.0.0 causing the issue
Apparently, when you select files using this package, it will interact with the file, either loading it or whatnot. I'm not sure, but I discovered it by removing image widgets and only displaying the selected image paths using a text widget and it still crashed, so I was certain it was the file picker's fault and chose to use file picker cross even though it depends on file picker it was working differently and it didn't crash the app even with 20 images selected.

Scrolling text object for macOS

I have almost completed my first app for Mac. This app is a client that when you click on a button write inside a txt file on a Dropbox folder, the server side check the file and based and what write, do something, and then rewrite the file with a report that my client app display.
I have done everything but when I ask for a "status" command the server answer with a very long report and my label and initial window size cannot display all and I must enlarge the window. I would like to make the label scrollable so I can make my app more easy to use. It should be something really similar to UITextView in iOS development.
I am coding in Swift3.
Thank you,
Matteo Collina

Xamarin - how to center a launch screen image (iOS)?

I'm using Xamarin for Visual Studio, and am getting frustrated trying to do what I would think should be a very simple thing: creating a launch (splash) screen for iOS, that has a single image that is centered on the screen (vertically and horizontally centered).
I'm creating it the recommended way, using a storyboard (other methods, like using an assets catalog, are considered deprecated as of iOS 9). In the storyboard, I have a View Controller, which contains a View, which contains an Image View. In the Properties pane, I've tried messing with the Mode (in Widget tab), and I've tried playing around with contstraints - which I think might be the key, but it is difficult to understand how it all works together.
You need to add the Splash screen in the applications properties (Launch Images). You need to create the image and upload it via that section. I couldn't find anything saying that the use of Asset catalogues are depreciated.

NSScrollView printing inverted on OSX Mavericks

I have a Mac app that has been on the app store for a few years. It's a time tracking and invoicing app that creates a PDF for the invoice. The PDF is generated from the content of a window in the app that contains the invoice information. Before OSX Mavericks the PDF printed just as it looked like on screen. Unfortunately in Mavericks, the NSScrollView that I am using for the table is printing horizontally inverted.
PDF as it should look, and how it looked on OSX Lion and Mountain Lion:
PDF as it prints out on Mavericks:
When I searched the Google for this problem I did find another person experiencing what seems to be the same problem.
The NSScrollView is nothing fancy, just an NSScrollView with an NSClipView as its contentView, and an NSTableView inside of that.
I'm really hoping that this is a problem that can be fixed, and not just a bug introduced by Mavericks when printing NSScrollViews. Thanks for any help!
Well, I wouldn't say I found a fix for this, but I was able to make this work normally again. I accidentally found that if I put another identical table in the same view hierarchy as the existing one and hid the new table, the first one would print correctly. Don't ask me why it works, because it feels like some serious cargo-culting, but it made the table inversion go away. I hate these kinds of "fixes".

My app file size is already 32Mb

I'll start off by saying I am an absolute beginner. I've been following a very good tutorial on YouTube and reading a few books. So far, I have a working app which consists of a splash screen, load up music and then a menu with 6 buttons. I have got these six buttons opening up a new view. I have created a new Java class and a new layout.xml for each new view. Is this right? Basically, all I want to know is how to make an efficient app which allows me to use my 6 buttons to take me to another set of buttons as a sub-menu and then inside those buttons I want to display the information using text and videos and audio. It's a tutorial app. Once I know how to do this then I should be able to continue developing within the app. Any help or ideas please? Since my app is already so large, I'm guessing I've done something wrong, but as I say, the app is working at least.
I had a similar problem. My app was 40MB. I found out my music files were too big. I was using wav files. When I converted them to ogg files, my app went down to 14MB.
This website was useful: http://media.io
The buttons and extra activities probably don't take up that much space. I'm guessing it's the music and maybe any images that you have.

Resources