Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about QM3 Some suggestions
#1
1. 
Member list items cannot be scrolled up or down using the mouse wheel[Pink arrows],  
There is  a border under the win7 system, set to no border, the effect is better[Red arrows]

[Image: A.png]

2.
Cookbook article list, Unable to scroll up and down using the mouse wheel [pink arrow]
Also, it would be more convenient if I could drag and drop the articles I'd collected directly into the list, It's better to be able to change the name, to be able to edit
After the article content is copied into Word, no syntax coloring is preserved [red box] , I need this feature so much that I want to print it

[Image: B.png]

3.
In the menu where Ctrl+shift+Q is pressed, there is no option to capture images
This option is available in the QM2 shortcut menu[red box]
Many controls cannot be captured, images are used frequently, and it is recommended to add this option as well
After clicking on this menu item, I can directly take a screenshot of the picture, and after confirming, the settings dialog[Find image or color in window] will pop up

[Image: DD.png]
[Image: CC.png]
#2
Windows 10+ scrolls the mouse control. Windows 7 scrolls the focused control.
Next QM3 will scroll the mouse control always.
See also: https://superuser.com/questions/368688/o...-the-mouse

2. Probably in the future entire cookbook will be duplicated in the website as HTML. Then can print, create bookmarks, use google etc to search...

3. Probably it will be a hotkey, like now for the wnd and elm tools.
#3
Thank you for the explanation

1.I don't understand what it means, meaning that under Win7, there is no way to achieve mouse scrolling?  A bit inconvenient  Wink

2.The content of the cookbook is very good, if there is a script built into QM3, I can use it generate PDF files with syntax coloring, which is great
#4
" the mouse control " means scrolls correctly.

> if there is a script built into QM3
Currently no.
#5
3.
I found a piece of code: url2pdf

Download:
https://wkhtmltopdf.org/downloads.html

C# code:
public void wkhtmltopdf(string filePath, string fileName, string url)
        {
            Process p = new Process();
            //wkhtmltopdf The path where the plug-in is installed
            string dllstr = AppDomain.CurrentDomain.BaseDirectory + "wkhtmltopdf\\wkhtmltopdf.exe";
            //string dllstr = "C:\\Windows\\System32\\wkhtmltopdf.exe";
            if (System.IO.File.Exists(dllstr))
            {
                string savepath = Path.Combine(filePath, fileName);
                p.StartInfo.FileName = dllstr;

                StringBuilder paramsBuilder = new StringBuilder();
                paramsBuilder.Append("--page-width " + txt_width.Text + "mm ");
                paramsBuilder.Append("--zoom 1.2 ");
                paramsBuilder.Append("--disable-smart-shrinking ");
                paramsBuilder.Append("--page-height " + txt_height.Text + "mm ");
                paramsBuilder.Append("--margin-bottom 0mm ");
                paramsBuilder.Append("--margin-left 0mm ");
                paramsBuilder.Append("--margin-right 0mm ");
                paramsBuilder.Append("--margin-top 0mm ");
                paramsBuilder.AppendFormat("\"{0}\" \"{1}\"", url, savepath);
                p.StartInfo.Arguments = paramsBuilder.ToString();
                //p.StartInfo.Arguments = " \"" + url + "\"  \"" + savepath + "\"";

                p.StartInfo.UseShellExecute = false;
                p.StartInfo.RedirectStandardInput = true;
                p.StartInfo.RedirectStandardOutput = true;
                p.StartInfo.RedirectStandardError = true;
                p.StartInfo.CreateNoWindow = true;

                p.Start();
                p.WaitForExit();
            }
        }

Another way

nuget: TuesPechkin
reference TuesPechkin.dll

C# code:
/// <summary>
        /// Convert a web page to a pdf file
        /// </summary>
        /// <param name="filePath">File path/directory</param>
        /// <param name="fileName">filename</param>
        /// <param name="url">Web page URL</param>
        public bool ConvertWebpageToPDF(string filePath, string fileName, string url)
        {
            if (Directory.Exists(filePath) == false)
                Directory.CreateDirectory(filePath);
            try
            {
                HtmlToPdfDocument htmlToPdfDocument = new HtmlToPdfDocument();
                GlobalSettings globalSettings = new GlobalSettings();
                globalSettings.ProduceOutline = new bool?(true);

                //html The width and height of the web page content
                double width = 100; double.TryParse(txt_width.Text, out width);
                double height = 120; double.TryParse(txt_height.Text, out height);

                //Set the pdf width and height
                double proportion = 1.26;
                width /= proportion;
                height = Math.Floor(height / proportion);
                string Width = width.ToString(); string Height = height.ToString();
                globalSettings.PaperSize = new PechkinPaperSize(Width, Height);

                //Sets the margins around the pdf document
                globalSettings.Margins.Top = 0;
                globalSettings.Margins.Right = 0;
                globalSettings.Margins.Bottom = 0;
                globalSettings.Margins.Left = 0;
                globalSettings.Margins.Unit = Unit.Centimeters;
                string pageUrl = url;
                ObjectSettings objectSettings = new ObjectSettings();

                double value = 1;
                objectSettings.HtmlText = string.Empty;
                objectSettings.PageUrl = pageUrl;
                objectSettings.LoadSettings.BlockLocalFileAccess = true;
                objectSettings.LoadSettings.ZoomFactor = new double?(value);
                objectSettings.WebSettings.PrintMediaType = new bool?(true);
                objectSettings.WebSettings.PrintBackground = new bool?(false);
                htmlToPdfDocument.GlobalSettings = globalSettings;
                htmlToPdfDocument.Objects.Add(objectSettings);
                IPechkin pechkin = Factory.Create();
                byte[] array = pechkin.Convert(htmlToPdfDocument);
                string path = string.Empty;
                if (array == null)
                {
                    return false;
                }

                path = Path.Combine(filePath, fileName);
                using (FileStream fileStream = new FileStream(path, FileMode.Create))
                {
                    fileStream.Write(array, 0, array.Length);
                    fileStream.Flush();
                    fileStream.Close();

                    FileStream fs = new FileStream(path, FileMode.Open);
                    byte[] file = new byte[fs.Length];
                    fs.Read(file, 0, file.Length);
                    fs.Close();
                    return true;
                }
            }
            catch (Exception ex)
            {
                return false;
            }
        }
#6
But recipes are not in HTML. It is text with QM3 output tags. The source code is here. I'll create a converter to HTML some day.
#7
About 2
I just found out that copying code from the QM3 editor into Word, there is no syntax coloring information,
In QM2, the copy option preserves syntax coloring
#8
QM2 can copy code as HTML. QM3 probably will have this feature in the future, but not soon.
#9
https://www.libreautomate.com/cookbook/
#10
Great! 

How to prevent code regions from being translated by Google? 
It is highly recommended to add this feature


https://www.libreautomate.com/cookbook/C...ction.html

The web page in the link below, after using Google Chrome translation, the code part is not translated, the effect is great
Many programming forum pages support this effect


https://learn.microsoft.com/en-us/powers...rshell-7.2
#11
Updated. Now does not translate code.

But non-code text contains many class/function/parameter/etc names, and they are translated. To prevent it would need several days of tedious work.
#12
Works great, thank you very much

Can you generate a PDF of Cookbook like the post below?  The article inside is too classic, It would be convenient to read PDF on phone

https://www.libreautomate.com/forum/show...p?tid=4380


Forum Jump:


Users browsing this thread: 1 Guest(s)