As the title states does iOS support PDF/A?
I tried to open it, but mostly I get a white page with errors like
illegal character `/' encountered in hex string.
illegal character `/' encountered in hex string.
invalid stream length 557; should be 563.
FlateDecode: decoding error: invalid distance too far back.
FlateDecode: decoding error: invalid distance too far back.
invalid stream length 51645; should be 52016.
FlateDecode: decoding error: invalid bit length repeat.
FlateDecode: decoding error: invalid distance too far back.
FlateDecode: decoding error: invalid distance too far back.
Perhaps I'm doing something wrong, but I didn't found any information which types of PDF the UIWebView or QLPreviewController support.
Edit:
Now I created a Word 2007 document with a single text line and saved it as normal PDF (with Adobe Plugin). Then I openend the PDF and converted it to the different available standards with the Preflight tool:
PDF/A-1a
PDF/A-1b
PDF/A-2a
PDF/A-2b
PDF/A-2u
I also checked if it is really supporting this standard with the Preflight tool. Then I displayed the PDF/A on my UIWebView and the text got displayed and I didn't get an error in the console.
Then I got it managed to get access to the problematic PDF and I also checked it with the Preflight tool. The summary for PDF/A-1a and PDF/A-1b was:
File header is not compatible with PDF/A
Syntax problem: PDF file contains data after end of file
It doesn't meet any of the standards available in the Preflight tool. So yes iOS does support PDF/A, but you have to check if your PDF is valid.
The short answer to your question is: yes.
The longer one is, well... a bit longer :)
PDF/A, or PDF for Archival is an ISO standard that is based on the ISO standard for PDF itself (ISO 32.000). As a consequence, any software that supports "PDF" must also necessarily support PDF/A. Or otherwise stated, all PDF/A files are PDF files, but not all PDF files are PDF/A files.
To complicate matters though... there are many different versions of PDF out there, and there are at least 8 different forms (parts and flavours together) of PDF/A. Not all software supports all versions of PDF, more advanced features (such as JPEG-2000 compression to name but one example) might not be supported by your particular platform or software of choice.
So you have two steps to go through:
1) Make sure your PDF/A is valid - there is commercial software to do this such as Adobe Acrobat or callas pdfToolbox or pdfaPilot (caution: I'm affiliated with these applications) and there is free software to do this (have a look here: http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx for example).
2) If your PDF/A is valid, make sure that your software / platform supports the features in that particular PDF/A file you are looking at. PDF/A-1 for example is an older standard than PDF/A-3 and supports less features. Hence you'll have a greater chance that a PDF/A-1 file is supported than a PDF/A-3 file.
Related
I would like to get the type of a file without using the extension, is there a way to use the metadata of a file to distinguish if it is a video file or if it isnt?
I have tried using extensions but I find searching each file extension and comparing it with a list of extensions is quite time consuming.
Yes it is possible to determine file type without using the file extension. You can do this by reading the file header also sometimes referred as file signature which occupies first few bytes of the file.
How many bytes do file header/signature occupy? This depends from file type to file type. So you should check the internet for more detailed information about the file header/signature for specific file type you want to identify.
You can find list of some more popular signatures List of file signatures - Wikipedia
PS: Most program stopped relying only on file signatures for determining file way back when first Windows came out. The main reason for this was the fact that since in the beginning file extensions were limited to three character length (limit of the old file systems like old FAT8 or FAT16) world quickly ran out of possible file extensions so multiple programs began to use same file extensions but used completely different file types. So by storing file header/signature at the beginning of the file you would no longer be limited by this file system limitation.
When using the Twitter API you get emojis as unicode characters. You can then easily parse out and display emojis as pictures. One example of such a parsing tool is Twemoji, which is the official emoji parsing tool from Twitter. In the twemoji.js file there is a long regular expression they use to parse out the emojis.
However, this file has not been updated in two years, and there are many emojis missing from Twemoji that are displayed just fine on twitter.com.
Does anybody know of any other well maintained list of current emojis supported by twitter.com? A bonus would be that they use/provide a regular expression I can import into my own code.
Twemoji has a somewhat weird structure on Github due to a CDN mirroring, which means that when Twemoji releases a new version, or updates the regular expression in newer versions, the original versions will still be there.
The twemoji.js file on the front page is indeed an old version. However, they have released newer versions, so on the root of the project there is currently a folder named 2. This file contains a twemoji.js that is much newer than the one at the root level. The regex in this file catches all emojis currently displayed on twitter.com.
So when getting a new regex for your app, remember to not check the root folder, but look for a numerical folder which contain newer versions.
Is there a way to figure out what version of Xilinx was used to generate a bitfile just by looking in the bitfile? I've opened the bitfile in a hex editor, and only see the project name, date, and fpga model. See below.
Thanks!
Impossible, though this is not official: http://home.earthlink.net/~davesullins/software/bitinfo.html its README contains the following chunk.
Bitinfo is a simple utility that parses the header of a Xilinx bit file
and outputs all the information that can be obtained from that header.
This information includes the Xilinx FPGA the bit file was created for,
the NCD file the bit file was created from, the creation date and time,
and the bitstream length.
I guess you have to fallback on wildguess based on date/time. Good luck.
Hello stackoverflow community..
Currently I'm developing a Crossplatform-App (android/iOS) which generates beside its other features pdf-files from user-content.
This works well with the help of jsPDF.
The output of this awesome library is an base64 encoded string of the binary PDF-File.
(see this issue of the creator about the 'binaryness' of pdf files under different circumstances on github).
Now my actual problem:
I need to save this base64 as a proper decoded binary file for further usage on different aspects of the system (mailing it, printing it, a.s.o.).
For Android there is a Plugin that does a similar thing with images. My current plan is to modify and publish it as a more generic plugin for saving base64 encoded to a file.
Problem is now, I cannot find a similar code for iOS, and since I have literally no experience in Objective-C (plenty of Java, ruby, javascript and c though), I'm not able to produce such a plugin in short time.
Do you guys know a plugin of this kind, which can be modified with little Objective-C knowledge.
Perhaps there is someone interested in developing this kind of plugin and we cut could a deal (the project I'm working on is commercial)
Hope to hear some interesting responses, because I'm running out of ideas here :D
Greetings
Jakob
i have tried to open some JPEG files in Delphi with TImage component. i also added the Jpeg unit. i can open most of jpg files and there is no problem.
but when i try to open some JPGs, the program just throw an exception.
i also tried to load that images in design mode, but there is some problem. in design mode the exception is:
Access violation at address 402672A1 in module 'vcljpeg70.bpl'. Write of address 08E84000
Why i cannot open that JPGs? they are not corrupted. i checked them in some tools like savantools EXIF viewer.
here is the URL of one of that images:
http://xs842.xs.to/xs842/09340/backpic435.jpg
Thanks so much
PS:
My Delphi version is 7. Borland Delphi 7
The reason you may be encountering this problem is due to the file type. Delphi has issues displaying JPEG images that have been encoded using CMYK, rather than the default RGB encoding. CMYK is a format that is generally used for Print design, try and always encode your images to RGB format to avoid this issue with Delphi.
Patch for Delphi jpeg.dcu
Bye.
Interesting. Neither Internet Explorer nor Google Chrome will display that JPEG image you linked to. I do not get 404 Not Found errors, I simply get an image placeholder, indicating that the image could not be opened/displayed correctly.
FireFox does display the image.
Are you certain that there is not something fishy, or at least slightly unusual, about the JPG files involved?
UPDATE: The file linked to in the question opens in PaintShop Pro (an old version 6.0 installation) - if I then simply re-save as a Standard Encoding JPEG, IE and Chrome both display the newly saved image as I'd expect. There would definitely appear to be something a bit "odd-ball" about the encoding of the original JPEG that some JPEG apps can handle but not all, including some "major players", not just Delphi. :)
Check out the Free Image library for alternative JPEG support in Delphi if the native one has problems. Free Image is an open source lib that lets you work with JPEG/PNG/... from Delphi/BCB/and others. Very nice library IMHO.
http://freeimage.sourceforge.net/
I've looked at the file with a hex editor, and found 3 JFIF headers. After extracting each part, I found 2 thumbnails and an image. Nothing special, because embedded thumbnails seem to be part of the EXIF2 standard.
The thumbnails themselves load fine in Delphi, and converting the file to something readable can be done with almost every piece of software that I've tried.
Anyway, this page will give you very detailed information about the picture, and what headers are inside (just paste the url of your image in the textbox):
http://www.monster-submit.com/resources/jpeganalyzer/
I get the same error. This appears to be a bug in Delphi's JPEG lib. You should report it to QC.
SimDesign's NativeJpg can open that file. It's a JPEG library written entirely in Delphi, and the author has been good about adding support for new extensions and color spaces when we've run into them. In addition to a TGraphic descendant for TImage support it exposes lots of lower-level interfaces for manipulating JPEGs, though I haven't used them.