Copy link to clipboard
Copied
Hi,
is posible to use this script from this post with Indesign?
https://community.adobe.com/t5/illustrator/simple-datamatrix-code/td-p/10396528?page=1
I want to llenerate 2D Datamatrix Barcode from Mail Merge Data.
I know Indesign has a nice QR Code tool but I need to generate Datamatrix.
I also know there are some 3rd party plugins, most dont genertate the barcode in the fly with export to PDF.
most plugins first need to create Indesign Documnet for each record then print to PDF. witch is redicules long and painful process.
Thanks.
Copy link to clipboard
Copied
Should be possible, I think.
/*
... the datamatrix.js code pasted in above ...
*/
var doc = app.documents.add();
var str = "ABCDEFG!";
var dm = new Datamatrix();
var ascii = dm.getDigit(str, false);
var newTextFrame = doc.textFrames.add
(
{
geometricBounds : doc.pages[0].bounds,
contents : ascii
}
);
Note: Read the comments in that thread about the code that must be positioned at top of the one given here.
Also what you need to strip off. The screenshots showing the ESTK should be helpful.
FWIW: I did not test that at all, just ported the bit that Adobe Illustrator has to do to specific ExtendScript code for InDesign. It will create a new document with a new text frame and puts the retrieved data as contents in that frame.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Thank You Uwe.for you reply, I will try..