Is there a free alphanumeric barcode font or class that is compatible with Delphi "PowerPDF" component ?
code must be code128.
There is no such thing, as PowerPdf has never supported any fonts other than the 14 Standard Type 1 Fonts (see the source code). There is no support for TrueType fonts, font embedding or such.
What you can do is switch to the successor of PowerPdf, the Haru Free PDF Library. This supports encrypted TrueType fonts, font embedding and a few encodings other than the PDF WinAnsiEncoding. There are Delphi bindings. Together with a TTF that supports your barcode you should be able to make it work.
Not a barcode class, but a GPL'ed TTF which can be embedded into your PDF file:
http://grandzebu.net/index.php?page=/informatique/codbar-en/codbar.htm
You also need an encoder, because you can't just type your characters with this font. But the VB6 and Excel encoding examples on that page can easily be transfered into Delphi code.
As a tiny addition:
I used this page to generate EPS barcodes (which can be embedded in PDF).
Actually: I wrote a small article on how to use this to generate a lot of EPS files using one small example.
Related
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.
I am currently developing an iOS app that works a lot with musical symbols. the symbols I would like to use are found on this page:
http://unicode-table.com/en/blocks/musical-symbols/
I am trying out a few examples like assigning the text directly to the label. So this is what I see in Xcode's interface builder:
And this is what I see in the simulator:
I also tried assigning it programatically (Swift code):
label.text = "\u{1D15D}"
But no luck that way either. However, if I send this to the console with println() the note character is correctly printed in the console.
Just in case I tried with a few system fonts and the result was the same (Default, Arial, Verdana and Times New Roman)
So my question/questions would be: Am I doing something wrong? Are these characters not supported by iOS' interface elements like UILabels? Or maybe the problem is in the font?
I would appreciate some help here :) let me know if you need more information than what I provided here.
This is a problem with the font. Very few fonts contain the musical symbols of Unicode. The “UFO” symbols that you see are probably generic symbols for “strange” characters not present in the font. You may need to find a suitable free font and try to bundle it with your application.
A few fonts contain at least some of the musical symbols. The most commonly known of them, FreeSerif, Quivira, and Symbola are listed (with samples) at the Fileformat.info site on page MUSICAL SYMBOL WHOLE NOTE (U+1D15D) Font Support. There is also the Musica font downloadable from the page Unicode Fonts for Ancient Scripts. (The common musical symbols aren’t that ancient, but the font contains also Byzantine musical symbols.)
I want to copy the text of an embedded PDF file in my project to an NSString.
I tried Zachron's pdfiphone but it doesn't seem to be working on armv7. I need it to work on armv7.
I've read some the Quartz framework guide, but I still don't know how to get the text of a PDF using Quartz. If you know the solution, with Quartz or not, please write it down.
If your target PDF is not written in CJK(Chinese,Japanese and Korean), your way is simpler one.
Download PDFKitten. It has a sample PDF parser.
Integrate PDFCore part of PDFKitten into your project. Please note that PDFKitten is pre ARC code. So you have to set -fno-objc-arc to all PDFKitten files.
In PDF, printing text operators are TJ and Tj.
So you have to modify call back functions for TJ and Tj.
If you have to handle CJK PDF file, your way is more complicated. Because many CJK PDF file has CID encoding. CID means character identification for glyph. PDFKitten does not cover such handling. You have to add CID to UCS2 conversion function.
I'm (trying) to write a "PDF to plain text parser" and I'm using pdfKitten as an example.
My PDF includes a type1 font included into the "standard 14 fonts". Subsequently the PDF font dictionary does not include keys for "Widths" "FirstChar" "LastChar".
I assume, since it is one of the "standard 14 fonts" (actually 2, Courier and Courier-bold), that the iOS framework contains these metrics somewhere.
How can I access these metrics?
The metrics for the standard PDF fonts are usually built in each PDF viewer application. These metrics were made public through the corresponding .afm files, one for each font. They were available for download from Adobe website but now I cannot find the link.
You can get these files from any iText / iTextSharp distribution and I'm sure there are other products that include these files.
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.