Mobile app version of vmapp.org
Login or Join
Cugini998

: How to automate the process of filling diplomas? Here is a task: I have excel file with table (for example columns are Name, Number and Address) and dimloma template. How can I automate filling

@Cugini998

Posted in: #Automation #CorelDraw #Fill

Here is a task: I have excel file with table (for example columns are Name, Number and Address) and dimloma template. How can I automate filling my template and save all done diplomas to different files? Which way is the best to do this?

I currently working in Corel Draw. Corel Draw have Print Merge, but it's working with printing on paper, but I need saved files on my desktop. Is it possible in Corel Draw?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Cugini998

3 Comments

Sorted by latest first Latest Oldest Best

 

@Pierce403

As mentioned by Krzysztof, the simplest/quickest solution is to:


use the Print merge function (if you're not clear on how to do that, leave a comment, and I can explain in more detail)
print the resulting file to a PDF file using a PDF printer or CorelDRAW's native Publish to PDF function
use something like PDFill PDF Tools to either split the PDF up into multiple one-page PDF files, or convert all of the pages to images.


I've done this in the past e.g. for generating 200+ namebadges, and it works beautifully.

10% popularity Vote Up Vote Down


 

@Gonzalez368

It can be done by corel macro/vba. Like on these :

and

The variable data is from excel.

Macro will replace/retype the text with data from specific column of excel, refer to record number.

Then export it (both design and data/filling text) as high res bitmap, or publish it as PDF.

10% popularity Vote Up Vote Down


 

@Martha945

The easiest solution would probably be to install a PDF printer (such as PDFCreator: sourceforge.net/projects/pdfcreator/) and use the Print Merge feature to print to a PDF file, then use an application such as jPDFTweak (http://jpdftweak.sourceforge.net/) or pdftk (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) to burst the document into single pages if you need separate files for each diploma.

However, in the past I did this in a different way:

You can save the diploma template as SVG, which is just a text file, and use placeholder strings instead of names. Then, using a script that reads the list of names from a CSV (a text file format which you can save from Excel), you can use text search and replace functions to replace the placeholder strings in the SVG file with actual names. Finally you can use e.g. Inkscape from the command line to convert all the files to a different format.

Note that if you don't know any scripting language, the PDF printer solution will be easier for you; this answer is mainly intended for other people who might be using software without a dedicated Print Merge feature.

Here is an example Python script to generate the SVG files with replaced names. It expects an SVG diploma template called "template.svg" that contains text objects with the text FIRSTNAME and LASTNAME as placeholders, and a CSV file called "recipients.csv" with column names "FirstName" and "LastName" and fields separated by commas.

#!/usr/bin/python
# coding: utf-8

import csv

template_f = open('template.svg', 'r')
template = template_f.read()
template_f.close()

recipients = csv.DictReader(open('recipients.csv', 'rb'), delimiter=',', quotechar='"')
t = template[:]
nfiles = 0

def write_file(content, num):
output = open('diploma_%02d.svg' % num, 'w')
output.write(content)
output.close()

for recipient in recipients:
firstname = recipient['FirstName'].strip()
lastname = recipient['LastName'].strip()
t = t.replace('FIRSTNAME', firstname).replace('LASTNAME', lastname)

write_file(t, nfiles)
t = template[:]
nfiles += 1

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme