I have project where I have to generate secure thousands of PDF. I am using itextsharp to generate pdfs. But vendors have to print these PDFs by merging in to one file. Merging of pdf will not available if I secure the PDFs. What should I do? How I secure My PDFs?
When encrypting the documents, you can set a value ALLOW_ASSEMBLY. This means that you allow other parties to assemble/disassemble your documents. Of course, you shouldn't use a user password, only an owner password.
Related
I'm asking here because when I tried googling for this information I just got ever more endless irrelavent pages of confusing junk (but contain my search terms hidden somewhere on the page taken out of context). This utility must exist because I even got a fake discussion forum site with fake users each 'agreeing' their willingness to enter their creditcard numbers in a 'software download link' which one of these faked users 'posted' in response to a 'question'. Clearly nothing more than a creditcard number harvesting site to intercept people like me googling for it.
So I've already designed the PDF layout with MS Word, I exported as PDF easy enough. Next step run this PDF through some script app or program (whatever is called) to generate the $pdf(..) items, so that FPDF can recreate that PDF. My PHP to alter odd text embedded in the $pdf(..) strings. Other than that I'm no more interested in what these $pdf(..) are and how they're written than I would be with any other raw printer control codes.
All I want to know is simple: What converts a .PDF into the $pdf(..) list, for FPDF to recreate that PDF again.
I need to ask you about the possibility of saving LotusNotes documents (with the attachments) as separated files in EML format on a hard disc.
Of course it's not important to keep the original document's look but it's very important to input into the file the content of the notes document including all the attached files.
The reason is to be able to open the exported file in an email client.
Is it possible?
Do you have any experience with resolving a problem like this?
The easiest way to do this for a small number of documents is to use #MailSend to forward the documents to a Notes user account or to mail-in database, and then go into that mailbox, select the message, and drag it to your desktop. Recent versions of the Notes client will save the document as .eml file that can be opened in Outlook or other standard mail clients. Or instead of sending to something in Notes, you could send to a non-Domino email system, connect with Outlook and do the same drag-to-desktop there, which I believe results in a .msg file instead of a .eml file, but they're essentially the same.
To automate it for a large number of documents that I need to do in one batch, I might still use the #Mailsend approach, but I'd do this on a dedicated Domino server. I'd address the email to an external address, and I'd set up SMTPSaveOutboundToFile=1 in the notes.ini file of that dedicated Domino server.
I think the Notes-client drag to desktop operation results in somewhat higher fidelity in the .eml file than either of the other approaches, but it's been about ten years and three major Notes/Domino versions since I played around with any of these.
Yes this can definitely be done programmatically. To do this, convert the doc to MIME via convertToMIME() using the DxlExporter to do the rest of the work. It creates XML output that contains a <mime> tag in which the output of the fully converted MIME format document resides. See this for a full description: How to Programmatically Convert Lotus Notes email Document to MIME Format
I have a requirement to read a pdf file having tabular format data only like in excel file. I need to extract the cell value of given pdf file.
Is it be anyhow possible using itext API. If you have something to share then please share it or any other solutions?
The PDF format is just a canvas where text and graphics are placed without any structure information. As such there aren't any iText-objects in a PDF file. In each page there will probably be a number of Strings, but you can't reconstruct a phrase or a paragraph using these strings. There are probably a number of lines drawn, but you can't retrieve a Table-object based on these lines.
In short: parsing the content of a PDF-file is NOT POSSIBLE with iText.
You can try this! This lets you read PDF pages.
I recently ran into this problem. I wasn't able to make it work with itext.
An alternate solution I found was to open a PDF document in Adobe and export it to xml. At least with my PDF's it preserved the table information and then I was able to programmatically work with the XML to generate tabular files like excel etc.
The other issue I ran into was that Adobe only lets you export one file at a time and I had lots of files. Luckily Adobe also has a merge function. I ended up merging all the files together and then exporting them as one big XML file and working with that file to generate what I needed.
I have an iOS application, which stores all downloaded *.pdf files in its cache. Is there a way to prevent this data from extracting? Encryption or something else? Thanks in advance.
There are quite a few ways to encrypt files, and I'm sure everyone will have an opinion on the best way to do so.
In a project I've recently been working on, we've been using CommonCrypto (https://github.com/AlanQuatermain/aqtoolkit). Just take any NSData, encrypt it, and save it to a file, and vice versa. You can even write an easy Transformer by subclassing NSValueTransformer, which abstracts all of the encryption to one spot and you will never have to worry about it again.
You can protect PDF files with a password. I assume you create the PDF files not within the application but externally. For example you can use Preview.app in Mac OS X to secure existing PDF files with a password (Hit Cmd-P, then select PDF in the print menu and there you can set security options. Or even more simple: in the menu choose Export...).
In iOS you can then open the PDF files like this:
CGPDFDocumentRef documentRef = CGPDFDocumentCreateWithURL((__bridge CFURLRef)[NSURL fileURLWithPath:filePath]);
if (!CGPDFDocumentIsUnlocked(documentRef))
CGPDFDocumentUnlockWithPassword(documentRef, password);
...
There are actually 2 Documents folders in which your app can store content. One can be extracted, and one is private. Check the accepted answer in this ticket.
Access files in "private Documents" folder transferred with iTunes
Assuming you want the PDF files from getting extracted on jailbroken devices, the most straight forward approach would be along the following lines:
generate a random string during the first launch of the app
save the random string either in NSUserDefaults in state file inside your own app's sandbox
using this random string create a secret key using a deterministic but hard to figure out algorithm
use this secret key, which you don't store anywhere but always generate on demand, symmetrically encrypt your buffer with AES or something similar
You would probably find the source code here very helpful.
I have application which exports data in csv file which is stored in Document's Directory.
Also I have enabled File Sharing in my app with iTunes so that whenever i will connect my iPhone with iTunes it will allow me to save csv file. But my data needs security, so i want generate Password for my CSV file, So that whenever we open file in computer, it will ask for Password. How to achieve generating Password protected file in iPhone??
Well, you would have to create a disk image (.dmg file) in order to have the file password protected once it was on your computer. I don't think this is possible in iOS. I think your only solution would be to use an encryption/decryption algorithm. Store encrypted data into the file, and use your algorithm to decrypt the file once it is on your desktop. Here is a solution for encrypting/decrypting NSData.
How about it doing it this way :
Use some generic encrypting algorithm
Either generate a key or ask from user (as per your needs ) while generating csv
Then when its copied to dekstop ask user to download a utility to decrypt..
Or create simple online decrptor in php .. should be simple enough..
Or use existing : http://www.tools4noobs.com/online_tools/decrypt/