I have a download control bound to a rich text field. My users are finding that some documents cause errors. Right now, I have an XPage that has little more than the rich text field on it. For example, when I attach a certain .docx file to a document using the Notes client, then try to download the attachment via the Web using the download control on an xpage, I get a runtime error stating that there is an invalid date. I actually get the error just by trying to open the XPage, before I even get a chance to click on the link within the download control. But neither the xpage nor the attachment have any date field on them. Other attachments don't cause the error, even other .docx documents. And if I convert the .docx to .doc, the problem goes away. But I can't tell my users to never attach .docx documents. Does anyone have any idea why some .docx (not all, though) documents attached to a Notes document would cause such a runtime error in XPages?
Related
Appreciate your help.
I have old lotus notes database. Even having manager access it cannot open in designer.
So, took archive of the database was able to open in designer. Now when I am trying to open code of agents, scripts, formula, etc in current lotus notes version 8.5.3.
It throws error "the design element is hidden and cannot be edited".
Please could you guide on how to view code.
You have a database with hidden design here. Unless you find the template, that it was created from, there is no way to "unhide" the design as it is only stored "Compiled" in this case.
It it possible to get back "some" of the information using a HEX- Editor on the nsf file, but this will not bring you further than you already are with your backup: You can open in designer but not see any formula (in forms or views)...
When updating a database from a template you can choose to "Hide formulas and LotusScript" and this will result in what you see.
Some vendors already hide the design of their templates to protect their intellectual property. In that case you will not find an "open" template and cannot get the code back.
I'm currently building a new ticketing system for my workplace. When an email is received it generates a ticket number and few files in a SharePoint document library. One of those folders is "Attachments" where the flow I am building is supposed to put any attached documents. As far as I can tell I've followed other guides to the tee, however it renders the attachments un-openable. After downloading the files it did make and opening them in Notepad++, the content of the files is completely different and I can't seem to figure out why... I've been testing mostly with *.docx files, but it does the same for other file types as well. Please see attached screenshot of the attachments getter part of the flow. Any support is greatly appreciated!
Attachment Getter Screenshot
Note: This is how the guides told me to do it, however I did try changing the "File Content" box to "Attachments Content" instead of "Current Item" from the dynamic content menu to no avail.
Try use attachments content directly:
How to save Email Attachments to your SharePoint Document Library
Can you try to get the file content.
File content should help getting attachment. You will have to recreate a file though.
For this problem, please check if you have set the value of Include Attachments in the trigger to Yes.
The Problem
I recieved a pdf file at work which I then printed. In the pdf file there were several optional fields where one could enter information such as "place of birth" etc. If I open the pdf file on my computer, I can see a set of input information A (a travel request with dates from this year 2017).
If I print the pdf on the local printer, the printed document contains a set of information B which for example contained travel request dates from 2015.
This information was not visible when opening the file on my computer.
I have been able to reproduce the error multiple times.
Why is this a problem?
It seems that previous entries into the pdf were yet somehow stored in the pdf contrary to what was visible when opening the pdf. When printing, the printer seems to access only the oldest entries and prints those.
This is a potential breach regarding data privacy and security since the pdf file seems to save all previous entries without anyone knowing.
Especially at work, some of these pdfs contains bank account information and other identity related information.
The Question
Did anyone experience a simliar issue or knows how to delete the invisible old information yet stored in the pdf?
UPDATE1: I could not reproduce the error on other printers. It seems this error is caused by the specific printer. Yet the information must be present in the PDF file, which is the specific cause of my question.
UPDATE2: Using the information from the accepted answer, I used the program "PDF CHAIN" and selected the option "drop XFA from document". I then saved the manipulated document again and printed it on the same printer.
Finally, the correct information was printed.
At a guess (and that's all it is without being able to see the original file) the PDF contains optional content or annotations which contain different field data for Print and Screen.
If you open the file using a PDF consumer (eg Acrobat) then what you see is the 'screen' result. Depending on the consumer you are using it may then either send the screen data to the printer, or substitute with the 'Print' data.
The printer you note as being a problem is capable of direct PDF printing, you haven't stated if that's how you are printing the PDF file, or whether you are using an application, nor whether the other printers are PDF capable or not.
My guess is that there is a different decision being made somewhere in the 2 print paths as to which is the 'correct' information to print.
Note that this does not mean that the PDF 'seems to save all previous entries without anyone knowing'; that's not really possible with a PDF file.
A malicious PDF processing application could do so, by adding comments to the PDF file, but only that application would be able to retrieve it.
But it is possible to have multiple entries of different types for different purposes, and if they aren't the same (because of the tool used to edit the file) then you can get strange results like this.
Note that if this is a problem for you then you probably shouldn't be using PDF, but you can mitigate the issue by digitally signing your documents. Signed PDF files include means (secure cryptographic hash) for verifying that the document has not been tampered with . Of course, you can't then edit the PDF file without re-signing it.
Oh, one other possibility would be that the PDF was actually an XFA form; its possible to have part of the document be a valid PDF which prints 'something' when a PDF consumer can't handle an XFA form, but that need bear no relation to what you see when you use an XFA processor.
My money's on optional content, AcroForm fields, or annotations where the Print data is different from the Screen data though.
I have a submit only XPage based form that has an inputRichText field for storing screenshots and a multi file upload (using the XPages Multiple File Uploader from OpenNTF) for uploading one or more attachments. When submitted I need both the screenshots and the attachments to appear in a single rich text field which will be accessed via the Notes Client only (non XPages).
Currently the form stores the attachments and screenshots in separate fields. I have tried appending one field to the other on save (using SSJS in the submit button, however because the Screenshots are stored as MIME and the attachments as NotesRichText, it is not letting me do it.
Is there some way (preferably in SSJS) that I can convert either the MIME to RichText or vice versa so that I can append one field to the other? I have tried searching for various solutions to no avail, as well as trying different file upload controls from OpenNTF.
Ideally I need something like this to work:
var rtItemAttachments:NotesRichTextItem = docTo_Backend.getFirstItem("attachments"); //This is the field I want everything in
var rtItemFiles:NotesRichTextItem = docTo_Backend.getFirstItem("uploadedFiles");
rtItemAttachments.appendRTItem(rtItemFiles); //Fails on this line
docTo_Backend.removeItem("uploadedFiles");
Speak after me: there is no RichText in the web, all there is is MIME.
You can set the RT field to store its content in MIME (a property). This makes things much easier.
To stitch things together you need to stick with MIME. These are roughly the steps
Get the text and images as MIME
Get your attachments as stream (the embeddedObjects has a method for that)
Convert the stream to BASE64 and create a new mime-part with it. (Looking at an attachment eMail source someone sent through the internet should give you a pretty good idea how it looks like)
You end up with:
MimeHeader
MimePart for Text (HTML)
MimePart for Screenshots (if they are not inline images in html)
MimeParts for attachments
The special effect: if you add to the HTML with links to the attachments, it looks nicer.
Of course the BIG question: WHY?
You could simply design a Notes form that has two fields, no need to fold it into one. Hope that helps.
A good piece of code to look at to understand the MIME stuff is the OpenNTF eMail bean
I know that a Document Library in SharePoint 2007 has a multi-file uploader (an ActiveX control that -- and only if you have Office 2003+ installed) but how would I use this same feature with a normal (non-document-library) List item?
Uploading files to a normal List item involves clicking the "upload" link and browsing/uploading files one by one. Is there a better way than this? Surely there must be.
Jake
There is an approach I use, but there is no UI support for it. You may find it a bit tedious for onsey-twosey uploads, but it saved me hours once for serious bulk uploads.
The same WebDAV functionality that we get when using "Open with Windows Explorer" on a document library is available for a list.
Say I have a list at http://myorg.com/sites/Widgets/Lists/MyList.
I can open the list in Windows Explorer by going to the address \\myorg.com\sites\Widgets\Lists\MyList.
Attachments are stored in the sub-folder Attachments, which contains folders with numeric names (1, 2, 3, ... and so on). The numbers correspond to the item ID of the list item. Pick (or create) a folder with the ID corresponding to the item you want to upload to, and it's drag-and-drop from there.
Short of writing your own mulit-file upload web part I think you are going to be stuck with either one at a time (i.e. an attachment to the list item) or switch to a document library. Don't forget that you can customise your library to behave much like a list.
Why is it a problem to use a document library?
I seem to be making a habit of answering my own questions. Not sure if that's a good thing or not.
What I ended up doing was adding an "Upload Multiple Files" button to the toolbar which pointed to a custom ASPX page in the _layouts folder. This page displayed the ActiveX component used by a Document Library and the "post to" URL for it was the ASPX page itself. When posted to it looked for files uploaded and attached them all to the List Item referenced via URL parameters passed to it from the toolbar button.
It's discussed here:
http://weblogs.asp.net/nathanyorke/archive/2007/12/05/uploading-multiple-files-via-the-web.aspx
If I get round to blogging and fuller explanation on my own site I'll try and remember to post a link back here.
Jake