Neat!

Doable apparently.

Get a list of the links from the pdf and generate QR codes as jpegs

1 Like

Is the goal to update the existing PDF to add a QR code for the link to say the bottom right of each image? That is probably possible to automate with a PDF library. I could attempt it if there is interest. Iā€™ve used this at work and think I have a personal non-commercial license.

3 Likes

I would love to print out this book in nice paper and put in a binder, to leave as a display at the makerspace - so that people can see all the wonders that are out there, ready to be made! Adding a QR code to each image would make it easier to access when viewing on paper. If itā€™s an easy operation for you, you are more than welcome! Not sure if NODE wants us to circulate it freely, perhaps we have to share it over DMā€¦

Edit: This is what he replied: "If youā€™re creating a print book just for yourself and not for
distribution or sale you can do whatever you want. "

So - what I take from it is that if we make a new ā€œversionā€, we can share it amongst ourselves - not openly. - Or what do you think?

4 Likes

That seems reasonable. Iā€™ll give it a shot and DM it to you if I get it working. So far, I was able to extract all the URLs out of the PDF.

3 Likes

Rad!!!

I did get this figured out. Not much code at all. @turbinbjorn is checking with the NODE guy to make sure weā€™re playing nice.

9 Likes

Iā€™m happy to have a crack at formatting the PDF for printing - will be about 12 hours from now though, whatever time that is for you. No need for it to be in finished form - Iā€™ll just set up a template.

2 Likes

Weā€™re welcome to share it! He just doesnā€™t want us to sell it or take any other kind of benefit from it. If you can make a print version out of it, @bitingmidge , maybe you can add a small text somewhere that itā€™s modified by Jason and prepared for printing by you? Jason, do you want to share the Google drive link, or should I put the file on my web server?

3 Likes

Here is the MIY pdf with QR code ebedded for each item!

@bitingmidge suggested making it available at a printing service online, for a simple order, but Iā€™m afraid that it might stretch the goodwill of the NODE guy. The service Peter suggested was blurb.com

All the cred for this PDF goes to @jeyeager , who whipped up this script in syncfusion:


using Syncfusion.Pdf;
using Syncfusion.Pdf.Barcode;
using Syncfusion.Pdf.Interactive;
using Syncfusion.Pdf.Parsing;
using Syncfusion.Licensing;

namespace MakeItYourselfQR
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("LICENSE_KEY");

            int qrSize = 50;
            int marginOverride = 15;
            string inputFile = "MIY.pdf";
            string outputFile = "MIY+QR.pdf";

            using (FileStream inputPdfStream = new FileStream(inputFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
            {
                PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputPdfStream);

                foreach (PdfLoadedPage page in loadedDocument.Pages)
                {
                    foreach (PdfAnnotation annotation in page.Annotations)
                    {
                        if (annotation is PdfLoadedUriAnnotation) 
                        {
                            string url = (annotation as PdfLoadedUriAnnotation).Uri;
                            PdfQRBarcode qr = new PdfQRBarcode();
                            qr.Text = url;
                            qr.Draw
                            (
                                page, 
                                annotation.Location.X + annotation.Size.Width - qrSize + marginOverride, 
                                annotation.Location.Y + annotation.Size.Height - qrSize + marginOverride, 
                                qrSize, 
                                qrSize
                            );
                        }
                    }
                }

                using (MemoryStream stream = new MemoryStream())
                {
                    loadedDocument.Save(stream);
                    stream.Position = 0;
                    loadedDocument.Close(true);
                    
                    using (FileStream outputPdfStream = new FileStream(outputFile, FileMode.OpenOrCreate, FileAccess.ReadWrite))
                    {
                        stream.CopyTo(outputPdfStream);
                    }
                }
            }
        }
    }
}
5 Likes

That is so amazing - thanks @jeyeager Jason!

As @turbinbjorn said - it was a pretty precarious path we (I) was treading, and I have no wish to harm anyone, let alone someone who has put in so much effort without seeking any reward.

4 Likes

Did you send them the Link as well so they can use it if they want to?

Yes, Iā€™ve sent him the qr pdf and the script. All he replied was that he didnā€™t want us to sell it, ā€œor similarā€. What similar means in this context is a little unclear. He spent two years on this project, so I donā€™t want to annoy him too much about it :innocent:

3 Likes

@vicious1 , I know youā€™ve always wanted a hardware sorter. :grin:

1 Like

That probably means donā€™t ask for donations or patreon for it (like he is doing).

Nice work.

I think it could be a little bit ā€œprettierā€. A lot of QR codes in the wild use url shorteners so they donā€™t end up so large (and they can add analytics/tracking to know how much traffic they generate). It might fit a little better if they were smaller and lighter in color.

I am not trying to look a gift horse in the mouth. This is a great solution as-is.

3 Likes

Yea, the inconsistent placement is because the area covered by the links is not consistent. Thereā€™s no way to fix that without a lot of work.

This wouldnā€™t be too hard but I probably wouldnā€™t. Iā€™ve seen codes in the wild that no longer work because shortened URL is no longer active.

I was thinking it might look better if the background color matched the color behind it.

2 Likes

Pretty neat slim idea. Looks pricey tho.
But what a neat idea wire races.

3 Likes
3 Likes

These kind of patent issues have always bothered me. I hope this gets fixed so we can get this functionality sooner than later.

5 Likes

One of the printing youtubers did a test and found it didnā€™t really help that much. Angus maybe? I canā€™t remember now.

All, it was Stefan on cnc kitchen.

2 Likes

Check out this dudeā€™s setup!

2 Likes