strido Posted June 12, 2014 Share Posted June 12, 2014 I have a memo field that is going to have to recognize paragraphs, but I'm unsure of the rule to use. Most likely they're going to copy and paste from a word document onto the on-screen field. When they do that, or even when they type it in, the break isn't recognized. It just comes out as an extra space. I know <cr> is carriage return but they're not going to want to type that into the field, so I'll need some sort of rule that can recognize the return and populate that instead of having one long paragraph.... Assuming the field is called "memo" - what would a rule look like that would accomodate that? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 12, 2014 Share Posted June 12, 2014 I have a memo field that is going to have to recognize paragraphs, but I'm unsure of the rule to use. Most likely they're going to copy and paste from a word document onto the on-screen field. What on-screen field exactly? In what application? Is this in MarcomCentral, or some other web-to-print app? I ask because the answer depends on exactly what that app writes to the data file it's generating for FusionPro. When they do that, or even when they type it in, the break isn't recognized. It just comes out as an extra space. I know <cr> is carriage return but they're not going to want to type that into the field, so I'll need some sort of rule that can recognize the return and populate that instead of having one long paragraph.... Assuming the field is called "memo" - what would a rule look like that would accomodate that? In FusionPro, you can use a <p> tag to start a new paragraph, or a <br> tag to do a "soft break." But without knowing what the data is that's coming into the FusionPro job, I can't tell you what kind of rule to write to insert these tags. Although the insertion of the tags might need to be done in the web application (or whatever is hosting the "on-screen field") before the data gets to FusionPro. Quote Link to comment Share on other sites More sharing options...
strido Posted June 12, 2014 Author Share Posted June 12, 2014 Its not marcom central. I guess the best way to describe it is that it is a user interface. They go onto our web portal and fill out their information. (name, address, etc.) They then submit that form ("hit enter") which populates the data file used by FusionPro to process the PDF. I'm sorry i can't be more technical! Not my strong suit it would seem. In essence, the memo field will be added to a comma-delimited file. It's due to that that I can't just put a <br> in there. The whole memo field is variable. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 12, 2014 Share Posted June 12, 2014 (edited) Its not marcom central. I guess the best way to describe it is that it is a user interface. They go onto our web portal and fill out their information. (name, address, etc.) They then submit that form ("hit enter") which populates the data file used by FusionPro to process the PDF. I'm sorry i can't be more technical! Not my strong suit it would seem. Okay, thanks for the clarification. I don't need you to be more technical; I just need know exactly what's in the data file that your web form generates now. Specifically, what does it put into the data when the user tries to add a line break? If you can post a sample of the generated data file, or at least a small excerpt, that would be helpful. Also, how is the data file being used? Is the composition being performed via FusionPro VDP Producer API (FP Server)? In essence, the memo field will be added to a comma-delimited file. It's due to that that I can't just put a <br> in there. The whole memo field is variable. I'm not sure why you can't put a <br> in there. You can use markup tagging in a flat file (such as comma- or tab-delimited). There's a "Treat field values as tagged text" option in the Define Data Source Wizard in FusionPro to handle exactly this. However, the caveat is that, if your app is creating a data file with tagged markup, whether it's a full-on tagged markup data file or simply a flat file with markup tags, then you also need to escape certain "reserved" XML markup characters such as less-than (<) and double-quote (") with entities, in order for them to be processed properly by FusionPro's tagged markup parser. (If your web app is written in .NET or some other similar high-level language, there's probably a call you can make to do this for you. Or, you could use our FusionPro VDP Producer API Web Service, which handles this kind of thing automatically.) The other option is to put some other kind of special marker, such as ###, into the data file, and then you can write a simple rule to replace that in all your data fields. Either way, though, I don't think the problem can be completely solved with a rule in FusionPro, so I think you're going to need to change something about the way that your web app writes out the data file. But again, I would need to at the very least see a sample of the data file you're generating now to be able to offer a more specific suggestion. Edited June 12, 2014 by Dan Korn Quote Link to comment Share on other sites More sharing options...
strido Posted June 12, 2014 Author Share Posted June 12, 2014 The <br> works, its just that we can't count on the individual clients ordering the material to be savvy enough to know to do that. They'll just copy-and-paste from word, thinking WYSIWYG. A paragraph on-screen should populate the PDF accordingly. That sort of thing. This does get submitted to FP Server. After I type in some text and hit return, then look at the resulting data it just puts spaces where the paragraph break should have been. Same if i copy and paste from word. The data file is a .csv. Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted June 12, 2014 Share Posted June 12, 2014 The <br> works, its just that we can't count on the individual clients ordering the material to be savvy enough to know to do that. They'll just copy-and-paste from word, thinking WYSIWYG. A paragraph on-screen should populate the PDF accordingly. That sort of thing. This does get submitted to FP Server. After I type in some text and hit return, then look at the resulting data it just puts spaces where the paragraph break should have been. Same if i copy and paste from word. The data file is a .csv. Well, if the data file being sent to FusionPro just has spaces, then I don't think anything can be done in FusionPro to somehow detect which spaces in the file used to be line breaks and put them back. You'll need to figure out why the web form isn't properly preserving those line breaks, and decide what you want it to output in that case, and figure out in your web application code how to make it do that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.