• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Programmatic generation of pdf for mailing labels

Community Beginner ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

I am investigating whether Adobe offers (or whether someone knows an open source)  tool that would allow printing labels based upon a template that I would first design by hand.  The template would contain a few simple graphical elements like an image, some text in a particular typeface, and some rotated text.  The image and the text would change for each label.  There would be ten labels per page and sometime more than ten labels, so pagination would be needed.

 

All this would have to be driven by JavaScript (preferred) or Python (if JavaScript isn't an option).

 

Is this possible using any paid or free Acrobat tools?

 

 

TOPICS
Create PDFs , JavaScript , PDF forms

Views

494

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

In which operating system are you running Acrobat?

 

And why it has to be run in JavaScript or Python? (just curious).

 

As far as a few simple elements like an image and a typeface, nothing  is that simple when editing PDFs.

 

Keep in mind that Adobe Acrobat is not an image editor, and much less, any sort of word processor. So be prepared for possible downfalls such as copyright restrictions for certain typefaces, lack of Unicode character sets, lack of support for some Unicode characters and language type, glitchy character set mappings, and much much more. The rabbit hole is endless.

 

As far as pagination, and orienting text and images, since you're customizng your own template, I would suggest to spend some serious time reading about PDF Page Boxes to get an idea of how simple or complicated this project can be with JavaScript.

 

See this article by ACP Thom Parker:

 

https://acrobatusers.com/tutorials/print/finding-page-boundaries/

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

Thanks, your caveats are helpful.  I think what I need is a Form created in Acrobat and then I will programmatically create an FDF file using a python library, then that will merge the FDF file into the form.  At least in theory.

 

I was trying to stay in JavaScript land because this is a project for a remote client and I can't expect them to install a python setup on their computer.  Long story short, that's a moot point now.

 

Thanks

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

Yes, this is possible using JavaScript. It's similar to a Mail Merge process, but a bit more complicated since you have multiple labels per page, and I assume your data file is not split into ten columns... So the script would need not only to merge the data but also place it under the right places and spawn new pages as needed. I've developed custom-made tools that do exactly that for my clients in the past and would be happy to create one for you as well, for a fee of course.

You can contact me via [try6767 at gmail.com] to discuss it further.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

Forgot to mention: Importing images is possible, but the input file will need to contain their full file-paths, as it must be a plain-text file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2021 Apr 05, 2021

Copy link to clipboard

Copied

LATEST

I would use the Data Merge tool in InDesign (Window> Utilities> Data Merge), although it sounds like your client wants an Acrobat solution. Here is some basic InDesign Data Merge info:

https://helpx.adobe.com/in/indesign/user-guide.html/in/indesign/using/data-merge.ug.html#add_image_f...

 

Votes

Translate

Translate

Report

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