Doable apparently.
Get a list of the links from the pdf and generate QR codes as jpegs
Doable apparently.
Get a list of the links from the pdf and generate QR codes as jpegs
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.
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?
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.
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.
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.
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?
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);
}
}
}
}
}
}
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.
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
@vicious1 , I know youāve always wanted a hardware sorter.
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.
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.
Pretty neat slim idea. Looks pricey tho.
But what a neat idea wire races.
These kind of patent issues have always bothered me. I hope this gets fixed so we can get this functionality sooner than later.
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.