Need to add a set of information to a pre existing PDF file on Visual Studio
Basically Where to begin ?
Situation Description: I have a form from a company, I need to print data from a database to the PDF file programmatically. That's to say, my current system (a webservice) must generate a full formed PDF from pre-existing file with the data it recives from the client.
Why edit the PDF file ?
The PDF is part of a set of documents from a survey, and must retain is original layout with no variations.
Related
I created a set of logic apps to have a very specialized integration between D365 CE (CRM) and SharePoint. I am using the Notes entity in CRM to allow the user to upload a docx file using the native CRM UI. The Logic app finds the file (using CRM List Items action) and returns the file as a base64 encoded string. I was able to view the Logic App execution logs to see the base64 string and I was able to successfully decode it and open it in Word so I know that much is working perfectly.
The problem is when I try to create or update a SharePoint document using LA Create File or Update File actions. The file that results in SharePoint has the correct name, but I get an error when I try to open the file using Word (any version). I inspected the docx file before uploading to CRM and downloading from SharePoint and there is some differences in the bytes between the files - my guess is that something is not handling a Unicode conversion somewhere. In this picture, you see the PK signature (thanks Phil Katz) of the docx appears in the first two bytes and several other strings appear, but (what I think is high-order characters) is not converted correctly (the original file on top, and after downloading from SP on the bottom):
A few more technical details...
I tried to use a base64toBinary() in the logic app to upload the file to SharePoint:
and since the UI is hiding the actual expression, the code for this action looks like this (see line 5):
The problem is that either the base64toBinary() is not returning a faithful representation of the file, or the Create File is not happy about getting a docx file as binary as a parameter. I have tried passing the original base64 string directly to SP, but it just stores it as base64 and requires me to download/convert it before I can open it, and yes, I have tried using base64toString(). I have also tested the process with a plain text file, and that works just fine.
I am using D365 v8.2.2 and O365 SharePoint.
Naturally, after posting a question to the world and then getting a good nights sleep, I found the answer. The problem is in the JSON notation that the Designer generates. In my code above, you see where I used the base64toBody() function. I realized that it had curly braces around the entire function which turned the binary file into an object. By removing the braces, the file is now passed to SP as a binary correctly:
"body": "#base64toBinary(items('For_each_file_attached')?['documentbody'])",
So if you want this to work, I had to use the Code View in the editor to make it correct. I would be interested in knowing if there is a way to do the transformation from base64 to binary between retrieving it from CRM and before using the Create File action so that it could be more OOTB Designer.
I'm making app with using Xamarin.forms PCL.
I'm using localization of Xamarin, which is using resx files.
I have documents for localization on google sheet.
What I want to try to do is converting csv file to each resx file.
I'm using mac. (I also have a window machine)
Is there some converting tool or shell script for that?
Thanks.
Currently you have ResX Resource Manager as a extension for Visual Studio, running Windows. I have a mac but I manage my resx files on Windows (Parallels) with this tool.
Its a very powerful tool.
This tool provides central access to all ResX-based string resources
in your solution. You can quickly navigate through all resource files
and view the content in a well-arranged data grid. It makes it easy to
find untranslated strings or clean up orphaned entries. All strings
can be quickly edited in place, untranslated entries will be created
on the fly while typing. Excel export and import lets you easily
exchange translations outside of Visual Studio. Automated translations
can speed up you localization process.
When using the Multilingual App Toolkit extension (version 4) in Visual Studio (2015) is there any way to prevent one of the resource files in the project from being translated?
In the Multilingual App Toolkit I have two languages added using Add translation languages...
I've now added a new resource file resourceImages.resx to my WinForms project to contain images that should not be localized.
The toolkit has automatically created resourceImages.fr.resx and resourceImages.de.resx. Is there any way I can prevent this - I do not want the images to have translated versions and I don't want them to appear in the xlf translation files that our translators will receive.
The author of the Multilingual App Toolkit has now answered this question in the Q&A tab here
There is no option to ignore resource files with MAT. However, by default the entry in the XLF file is a reference to a image location and not the image itself. Marking the image resource(s) as Translate = 'No' in the XLF file will prevent the images references from being added to the target language image resource files. This is because resources with a Translate = 'No' are not added to the target resource file. This should allow you to use a single image for all languages without any project bloat.
Given pptx file, how to know which engine created the file? (Ex, MSOffice, docx4j/pptx4j, etc.) Perhaps, there is some place in Office Open XML structure where it's acceptable to put the signature.
It would normally go in the extended properties part:
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
<Application>Microsoft Office PowerPoint</Application>
which Powerpoint stores at /docProps/app.xml
That part can also contain <AppVersion>
No guarantee that an application will write or update that though. docx4j, for example, will do so only if configured to.
I'm generating my POCO's from edmx model, and would like to know if its possible to make use of the neat codegen features of Entity Framework to create my an xml document along with the POCO (which is needed for my project).
You can generate an XML document in Visual Studio using T4 templates.
In Visual Studio, a T4 text template is a mixture of text blocks and control logic that can generate a text file. The control logic is written as fragments of program code in Visual C# or Visual Basic. The generated file can be text of any kind, such as a Web page, or a resource file, or program source code in any language.
But you should note that the EDMX file itself is an XML document.
Right click on your Model.edmx file
'Open With...'
Choose 'XML (Text) Editor'
There are three main sections to the file
StorageModels - describes that database
ConceptualModels - describes your code and objects
Mappings - describes how the two models relate
Look at whether the standard EDMX file contains the type of information you want. If not, parse and shred it using T4 to extract the information you're looking for.
No need to parse the EDMX file, use TiraggoEdmx, you can install it via NuGet. See http://brewdawg.github.io/Tiraggo.Edmx/ it serves up all of the metadata from your EDMX files that Microsoft hides from you, very simple, works great. I wrote it but it's 100% free, even comes with a sample POCO template.