document

Docx support in UIWebview(iOS)?

拟墨画扇 提交于 2019-12-03 03:08:01
I have checked the official links for doc support, and it's clear that docx is not supported in UIWebview, https://developer.apple.com/library/archive/qa/qa1630/_index.html But, I also found out that some guys were able to open docx files in UIWebview, Cannot open docx file through webbrowser in app using OpenIn functionality , Why doc and docx losing style information in iOS? , How to open Microsoft Office documents in iPhone Also, afaik, iOS safari browser is built upon UIWebview and I am able to open docx files from internet in the browser. But when I download a docx from my test server (I

Add margin to PDF file when merging using PDFTK or similar

大憨熊 提交于 2019-12-03 03:00:39
I have a large collection of half-page sized PDF cut-sheets that are held in a folder on my Linux server. A user to the site will want to create a booklet from a subset of these. The booklet will be bound therefore the even pages of the collection will want more margin on the right side and the odd pages will want more margin on the left side. There can be up to 200 pages in a collection out of a universe of 500 pages so I don't want to regenerate each page to set the margin of it. It would take too much of the servers time to run the content through the DOMPDF. Just building the document

Is there a way to generate word documents dynamically without having word on the machine

天涯浪子 提交于 2019-12-03 02:05:05
问题 I am planning on generating a Word document on the webserver dynamically. Is there good way of doing this in c#? I know I could script Word to do this but I would prefer another option. 回答1: I've worked at a company in the past that really wanted generated word documents, in the end they were perfectly satisfied with RTF docs that had a ".doc" extension. Word has no problem recognizing and opening them. The RTF docs were generated with iText.net (free .net library), the API is pretty easy to

iOS Make sure documents are open before accessing

空扰寡人 提交于 2019-12-02 21:14:08
问题 When opening UIDocuments from a closed state, I understand that it is it done on another thread. My question is, if I have code on my main thread that will access the document (like performing a fetch request), how is it guaranteed that the document will be open before I try to access it if the opening of the closed document is done asynchronously? 回答1: Instead of trying to block a thread, block your application's user from accessing the document until it is open. That's what the completion

MFMailComposeViewController doesn't link for simulator

≯℡__Kan透↙ 提交于 2019-12-02 20:17:42
First off, I'm using XCode 4.0.2. Okay, here is my issue. I can build Apple sample program for MFMailComposerViewController and run it in the simulator (I am aware it will not send email, I'm just concerned that it builds). That seems to work fine. HOWEVER, when I try to build in my application I get the following message. ld: warning: ignoring file /Users/lloyd/Projects/iOS/simpleApp/MessageUI.framework/MessageUI, missing required architecture i386 in file Undefined symbols for architecture i386: "_OBJC_CLASS_$_MFMailComposeViewController", referenced from: objc-class-ref in MailData.o ld:

Document Types vs. Exported and Imported UTIs

心不动则不痛 提交于 2019-12-02 14:18:10
Can anyone explain to me the difference between Document Types, Exported UTIs and Imported UTIs in Xcode 5.1? I want to be able to have my app automatically detect file type based on file extension. Which of these three would I need to implement in order to do that? aldoram5 You add a Document Type to register that your app can open that Document Type, this is simple when you select a known file type , but if the file type is not known, you must also define it in Imported UTIs . And if you are the defining your own File Type you must declare it in Exported UTIs and add that Document Type to be

iOS Make sure documents are open before accessing

时光毁灭记忆、已成空白 提交于 2019-12-02 10:26:11
When opening UIDocuments from a closed state, I understand that it is it done on another thread. My question is, if I have code on my main thread that will access the document (like performing a fetch request), how is it guaranteed that the document will be open before I try to access it if the opening of the closed document is done asynchronously? Instead of trying to block a thread, block your application's user from accessing the document until it is open. That's what the completion handler is for. - (void)openWithCompletionHandler:(void (^)(BOOL success))completionHandler When the

Resetting attributes in a Document after inserting a String

不打扰是莪最后的温柔 提交于 2019-12-02 09:07:59
问题 I have a JTextComponent in which a user can enter text in two ways: He can type text directly into it. Using a second control, he can indirectly insert text into it. This is done by programmatically calling insertString(). The font used in the text inserted in the second way will be different than the font that is typed in directly. The font of the text typed in will be the default font of the JTextComponent. Here is the code. The TODO is what I don't know how to do. import java.awt

How can I modify the title of a site using JavaScript?

烈酒焚心 提交于 2019-12-02 08:47:50
When viewing a torrent page, the title of the tab is: Bitsoup.org The Best site for your Torrent appetite :: Details for torrent "ABC" where "ABC" is the name of the torrent file. Unfortunately, when I have 3+ tabs open, I can not see what the name of the torrent file is. I am attempting to create a Greasemonkey script to truncate, or split, the title, so that it only displays the torrent-name, and not the beginning part. I am aware that you can modify the title associated with a page by using document.title = ... but I am unsure of what to assign it to. You could use a regular expression,

Resetting attributes in a Document after inserting a String

霸气de小男生 提交于 2019-12-02 07:26:48
I have a JTextComponent in which a user can enter text in two ways: He can type text directly into it. Using a second control, he can indirectly insert text into it. This is done by programmatically calling insertString(). The font used in the text inserted in the second way will be different than the font that is typed in directly. The font of the text typed in will be the default font of the JTextComponent. Here is the code. The TODO is what I don't know how to do. import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing