Simple DataMatrix code

New Here ,
Aug 29, 2020

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.

TOPICS
Feature request, How to, InCopy workflow, Scripting

Views

338

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Adobe Community Professional , Aug 31, 2020
Laubender Adobe Community Professional , Aug 31, 2020
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...

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Aug 31, 2020

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 )

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
JValen9362 AUTHOR LATEST
New Here ,
Sep 06, 2020

Copy link to clipboard

Copied

Thank You Uwe.for you reply, I will try..

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more