New line in Silverlight string resource - silverlight-4.0

how to add new line in my string resource file?
I already tried \r\n, \n, 
,
but it displays exactly what you've indicated, it does not give a new line.
Thanks for your help

When editing resource file in designer press Shift + Enter for new line.

You could, but its a bit indirect. By using 
 you could add a new line, the only trick here is that & gets converted to 
 in the background. To bring it back to 
, all you have to do is open your .resx the file in xml (right-click and open with XML (Text) editor), remove the amp; of the 
Before
<data name="HelloWorld" xml:space="preserve">
<value>Hello &#13; World</value>
</data>
After
<data name="HelloWorld" xml:space="preserve">
<value>Hello 
 World</value>
</data>

Related

Problems with F key in .XFDF file format for merging with PDF remotely

I've been reading that there is a way to create/reference a .FDF file (used for merging data with a PDF form) that has an embedded URL to the original PDF to be filled in it, and a specifically crafted URL can be sent to the browser that will load Acrobat or related programs that will merge the FDF data with the PDF.
Presumably something like:
http://host/path/original.pdf#FDF=http://host/path/data.fdf
But I can't get that to work. Perhaps the path to the original PDF can be embedded within the .FDF file? I've heard there is something called an /F key that can be used. Can anyone give me an example of it's use, and if there is a special MIME format that is needed to have the browser recognize the file/merge, what would it be?
Here's an example of an FDF file - where do I put the original PDF url?
%FDF-1.2
%▒▒▒▒
1 0 obj
<</FDF<</F(Stand Alone EE.pdf)/Fields[
<</T(date)/V(07/11/2018)>>
<</T(uname)/V(Jennifer Smith)>>
<</T(pctbefore)/V(35)>>
<</T(aftfee)/V(40)>>
<</T(newclient)/V(Yes)>>
<</T(current_dateplus90days)/V(10/11/2018)>>
<</T(im_url)/V(http://internal_usl_for_something_else)>>
]/ID[<A3715E58793D9B5B9A48E8B2E0E057FF><BCE39B7672548444B7E6606F1B14E048>]/UF(Stand Alone EE.pdf)>>/Type/Catalog>>
endobj
trailer
<</Root 1 0 R>>
%%EOF
I have kind of given up on the .fdf format since apparently a newer version, .xfdf is available, but if either way can work, it would be great.
I have also tried this with the XFDF format as documented here:
https://forums.adobe.com/thread/425699
The problem I've run into with the XFDF version is, when I click on the .xfdf it wants to save the file locally. I checked to make sure the mime type is set in the web server and it is. But if I save the .fdf and click on it, it opens up Acrobat, which then tries to open a document in Firefox with the same URL, which then prompts me if I want to open the document in Acrobat and it keeps spawning a circle of windows in Mozilla. Any idea what's wrong?
Here's a sample .fdf
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<f href="http://myhost/sample.pdf" />
<fields>
<field name="date"><value>07/11/2018</value></field>
<field name="atty"><value>Jennifer Smith</value></field>
<field name="typeofclaim"><value>Automobile Collision</value></field>
</fields>
</xfdf>
Anybody see anything wrong in the composition? What mime.type issues could I be having? My server is set to recognize .xfdf as "application/vnd.adobe.xfdf"
I set up a shell script to output the mime-type "application/vnd.adobe.xfdf", and then dump the content of the fxdf file above. The browser recognizes it as an Adobe app and I can open it with Acrobat, but then I get this error:
Xml parsing error: xml processing instruction not at start of external entity (error code 17) line 2 of file xxxxx.xfdf
Any idea what the error could be in the xml file? The parser says it's correct. Is it ok to terminate lines with \n?
One problem I found with the field parsing is that it's very picky about the content of the form data if it's not encapsulated in some kind of structure (i.e. CDATA) that says "leave as is", so if you have a data form field, for example, that has unbalanced parenthesis, this can cause bizarre errors.
One of my fixes was to fully-validate the form field data. And make sure things like for every open parenthesis, there were closed parenthesis. This at least fixed one of the errors.
the .XFDF format here works:
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<f href="http://myhost/sample.pdf" />
<fields>
<field name="date"><value>07/11/2018</value></field>
<field name="atty"><value>Jennifer Smith</value></field>
<field name="typeofclaim"><value>Automobile Collision</value></field>
</fields>
</xfdf>

mule datamapper xml to csv conversion

Below is my xml input:
<projects>
<project>
<name >project1</name>
<language>java</language>
</project>
<project>
<name>project2</name>
<language>mainframe</language>
</project>
</projects>
I want to convert this .xml to .csv file using data-mapper, but unfortunately it doesn't work.
Can anyone send me the sample flow xml for that? It is very important for my project now.
This is a very simple requirement.
You should select your sample XML file in the input section of the datamapper and define a user defined output of type CSV. Once you create a mapping, map the fields from XML (input) to CSV (output). The code would like as below.
//MEL
//START -> DO NOT REMOVE
output.__id = str2long(input.__id);
//END -> DO NOT REMOVE
output.name = input.name;
output.language = input.language;
You can now click on Preview button and run the preview with your sample XML file. Wasn't that easy? Try this and let me if any issues.

Google CSE: File uploading is not successful

I'm getting the above error when I try uploading an auto-suggest xml file to Google's custom site search. I tried trimming the file down to the bear minimum to see if I could isolate the problem but even the following won't upload:
<?xml version="1.0" encoding="utf-8"?>
<Autocompletions>
<Autocompletion term="My term" type="1" />
</Autocompletions>
Am I missing something blindingly obvious?
Kind regards,
Karl
It turns out, despite the Google information to the contrary, that the 'language' attribute is required even if it's value is blank. I added that and the file was successfully imported.
<?xml version="1.0" encoding="utf-8"?>
<Autocompletions>
<Autocompletion term="My term" type="1" language="" />
</Autocompletions>
Make sure that your encoding is UTF-8. Also, term="" i.e. an empty term should not be there in the XML file.

PDFtk and XFDF file NOT filling in form

I have a pdf template file with form fields (amount_1, amount_2 etc) I created an XFDF file and am using PDFtk via command line to fill the form and flatten the file.
However, when I run the command below, the new pdf is created but the fields are not filled in.
/usr/bin/pdftk /home/admin/tickets/tickets.pdf fill_form /home/admin/tickets/files/1371711546.xfdf output 1371711546.pdf flatten
the XFDF looks like this
<?xml version="1.0" encoding="UTF-8"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<fields>
<field name="amount_1">
<value>$17.00</value>
</field>
<field name="amount_2">
<value>$17.00</value>
</field>
<field name="amount_3">
<value>$17.00</value>
</field>
<field name="amount_4">
<value>$17.00</value>
</field>
</fields>
<ids original="095b7b1e54742b95f30a987149d65453" modified="1371711546" />
<f href="http://test.selebtom.co.zw/tickets/tickets.pdf" />
</xfdf>
I know it's been a while, but just in case someone is researching this, here's the way I solve this problem:
First, if you don't mind removing the XFA format from the file, thereby creating a new pdf 'template' to do your form fills with, then simply, remove extra XML data with the following command line:
"pdftk xfa-pdf-form.pdf output acro-pdf-form.pdf drop_xfa"
If this still gives you trouble, start over with the original XFA file and in LiveCylce save the the file as an Adobe Static PDF form. Or using Acrobat X Pro I think you can do this too. Then repeat the step above, by calling the command line to drop_xfa.
You should have a regular Acroform at this point.
From here you will be able to save the ouput file's data as an XFDF or FDF. Then it's business as usual.
Thanks to #enriquein, who pointing me in the right direction.

Remove Line Breaks in a Text File

I have created an XML file using streamWriter.. Now, i want to remove the line breaks in my XML file.. Is there a way to accomplish this task..?
here's my sample outout
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2004, v.4002-->
<!DOCTYPE primary.hierarchy SYSTEM "http://phoenix.roc.westgroup.com/dtd/pax.dtd">
Output should look like this
<?xml version="1.0" encoding="utf-8"?><!--Arbortext, Inc., 1988-2004, v.4002--><!DOCTYPE primary.hierarchy SYSTEM "http://phoenix.roc.westgroup.com/dtd/pax.dtd">
Instead of using StreamWriter you can consider using XmlWriter instead. It has various settings to deal with formatting of XML output.
See XmlWriterSettings for details
BTW. I assume that have you used WriteLine with your StreamWriter approach use Write instead. That should get rid of your line breaks.