Maybe I’m missing something, is there a way to directly convert a text file to PDF just in a workflow? I don’t need to modify anything or pull metadata. Just straight convert so another piece of software is able to process it. The other software doesn’t accept text files as input.
Thanks hamelj. Can you give me another hint how to do this? I’ve tried doing an extraction with repeat and extraction to try to grab all the lines, but then to put it onto the page I need to use a dynamic table (not a big deal) but I can’t format it correctly as a table. I need to be able to adjust the font to keep the console width for special characters and and spaces. My text file is formatted to look like a report. I just need to put it onto a page in the exact same layout and save as a PDF. Initially I thought I could just use a PDF converter but all the ones I’ve tried mess up formatting as well.
Replace the Source of the Print Context Section “Section 1” with for example the following HTML code:
<div id="example"></div>
Add a Standard Script to the Standard folder in the Scripts panel.
Add the following JavaScript code to the just created Standard Script:
var result = "";
if("Lines" in record.tables) {
for(var i = 0; i < record.tables.Lines.length; i++) {
result += record.tables.Lines[i].fields.Line;
if(i + 1 < record.tables.Lines.length) {
result += "<br />";
}
}
}
results.html(result);
After executing the above steps you will only have to create a Job Creation Preset (optional) and Output Creation Preset (“Generic PDF” Printer Model) via: Connect Designer > File > Print Presets.
After creating all these files you will have to send them to Workflow and after that you will be able to create PDF output by executing the following OL Connect Workflow plugins:
Actually, I would think the easiest way would be to simply select all text on a page and extract it into a single field. Using a JavaScript statement for the field definition allows the DataMapper to adjust the height of the data selection according to the number of lines in each record:
Thanks for all the input. Unfortuntately no matter how I go about this the console type font gets changed and the layout gets all screwy. I’ve been able to get it close to the original using an automated print to PDF application which isn’t 100%, but its close. Thanks again for all the input.