how to create pdf/X-3 document using Quartz - quartz-graphics

Some printer require pdf/x-3 format pdf to work. Before snow leopard, there's an option to use the ColorSync Utilities to get around this problem and create nice 300 dpi pdf/x-3 documents. With snow leopard, this is no longer possible because it would only create 72 dpi pdf/x-3 documents.
Is there some library available that could convert a pdf document created from Quartz into 300 dpi pdf/x-3 format?

Related

Visio - Convert ".svg" to ".emf" format

My goal is to convert pictures from .svg format into .emf, remaining the size, resolution, etc!!
The best solution that I found was using Visio, because of the quality after conversion and also if I need to resize the pictures, they don’t lose quality.
Please check the picture that I am sending on the link.
This picture shows the appearance when I open a .svg file in Visio 2010. As you can see, the image is very clear and the limits well defined!
(picture. 1)
I have already fit the drawing to the page using this tip
(picture. 2)
To get the emf format I save this file as .emf format:
(picture. 3)
The quality is good when it is opened with Microsoft Picture Manager, but the problem is detectable when this picture is inserted on the software that I want to use. The .emf file looks well, but when I convert from svg to .emf, Visio inserts an invisible frame around the image, if I open this emf file with paint it looks like it is inserted 1 pixel size for all borders!
(picture. 4)
As you can see here, the size image from Visio should looks like this (Inkscape) but it’s inserted a frame like this:
(picture. 5)
(picture. 6)
Does anybody know how to get a solution to this, using either Visio or other software?
Please do the download of the files.
(Link is no longer valid.)
I appreciate all feedback.
Thank you for preparing so much for this question and providing the ZIP. It was a very thorough job.
I don't have definitive knowledge here but my experience is this is very common EMF which - as I understand it always require a bounding box to be stored in the file.
The only option I can think of is using another format for example EPS - but it depends on what the final program you are using supports. Exporting to a bitmap format works better for some applications - though it may not be desirable for your needs.
One solution would be to use inkscape to convert from svg to emf.
In the Inkscape GUI: Menu File -> Save As -> Select emf as Target
Or in the command line mode: inkscape -z src.svg -M target.emf

A PDF viewer for PDF with large vector images on linux?

I need to view some PDF with large vector images (they can be really large) on linux (I am on Debian Wheesy). I need also to zoom on theses images with more than 400% (infinite zoom would be great, more than 800% would be good). I have tested several PDF viewers but they have the following problems :
Evince : cannot zoom more than four or five increase of zoom ("+"), the image is so big that it doesn't even display the percentage of zoom.
Okular : cannot display the image (all is blank) after a certain degree of zoom (~70%-80%).
muPDF (last version from git and debian repository version) : cannot open a too large image. Error message : "Interger overflow" (last version) or "Out of memory" (debian version).
Xara LX : cannot import PDF in the open source version. Convert PDF to SVG for importing into Xara LX does not fit my needs because my PDF contains several pages.
Inkscape : can open PDF and its zoom is powerful, but it's not a PDF viewer so the navigation is slow.
Xournal : cannot open correctly the image (all is black).
Do you know others open source PDF viewer that could open and zoom on PDF with large vector images ?
Thank you in advance,
Both Ubuntu's Evince reader and Linux Mint's Xreader will increase their max level of zoom if their cache size is increased. You can use gsettings to view or change these settings.
Evince reader's zoom can be increased with:
gsettings set org.gnome.Evince page-cache-size 200
Xreader with:
gsettings set org.x.reader page-cache-size 200
In both cases you'll need to select an appropriate cache size in megabytes. You can first look at what your current setting's value is by instead using the gsettings get command.
xpdf is the open-source viewer that works efficiently on very large vector images.
The only drawback is that it has an old interface and is not well integrated into gnome; I have to start it from the commandline as it doesn't show up in my Nautilus "open with" list.
qpdfview
For example Evince failed in opening the map (size is 197MB) attached to this paper
EVANS, David JA; EWERTOWSKI, Marek; ORTON, Chris. Eiríksjökull plateau icefield landsystem, Iceland. Journal of Maps, 2016, 12.5: 747-756.
on the other hand qpdfview succeded (but no more of 500% zoom).
Try Foxit-Reader: http://foxitsoftware.com/pdf/desklinux
Only drawback is not being open-source but it works just fine.

How can I convert several .ai files to various sized .png files automatically?

I am making a deck of cards in Adobe Illustrator. Each card is saved as it's own .ai file so I can change it later if I want to. When using these images in an iOS app, I must convert everything to .png files. Then I must re-size those .png files to have retina and non retina versions. I'm hoping there is a way that will allow me to automatically take a folder of all my .ai files and give .pngs of 200px x 400px and 100 x 200px. Also I'd like the larger ones to automatically be named #2xNameOfOrginalFile.png and the others to be named nameOfOrginalFile.png. I see stuff about batch automated scripting that does stuff like that. I'm curious how simple that is to implement. Is what I'm suggesting possible? Is this an easy process?
Seems pretty easy to do. Someone has posted a script that will do what you want: http://forums.adobe.com/message/4915819
You'll have to change these lines,
pngExportOpts.horizontalScale = 250.0;
pngExportOpts.verticalScale = 250.0;
to calculated values. The scale is a percentage (see: the docs). You can use sourceDoc.width and sourceDoc.height to get the width and height of the original .ai file (in pixels? docs don't say).
You'll also want to modify the getNewName function.

Extracting Text from a PDF file with embedded font

I have a PDF file containing some tabular data.
http://dl.dropbox.com/u/44235928/sample_rotate-0.pdf
I have to extract the tabular data from it. I have tried following with no success :
Select the text and paste it to notepad/excel-sheet. (I am getting junk characters)
Used save as text from Acrobat Reader. It is also giving junk characters and not the actual text.
Tried ApachePDFBox command line utility to extract text from PDF. It is also giving junk characters instead of real texts.
Finally I am trying a OCR solution. I am converting the pdf file into .tif images using ImageMagick and getting those images processed by tesseract OCR.
The OCR solution is not very accurate though( about 80% words matched ).
I tried changing density and geometry of the image created from PDF to get better results from tesseract OCR.
convert -rotate 90 -geometry 10000 -depth 8 -density 800 sample.pdf img_800_10000.tif;
tesseract img_800_10000.tif img_800_10000.tif nobatch letters;
I am not sure for what kind of image( density, geometry, monochromatic, sharpen boundary etc) would be best suited for the OCR.
Please suggest what could be the best possible parameters(density,geometry,depth etc) for generating images from a PDF file, so that the tesseract accuracy will increase.
I am open to other( non-ocr ) solutions as well.
In this case I recommend to NOT use ImageMagick for the PDF -> TIFF conversion. Instead, use Ghostscript. Two reasons:
Using Ghostscript directly will give you more control over individual parameters of the conversion.
ImageMagick cannot do that particular conversion itself -- it will call Ghostscript as its 'delegate' anyway, but will not allow you to give all the same fine-grained control that your own Ghostscript command will give you.
Most of the text in the table of your sample PDF is extremely small (I guess, only 4 or 5 pt high). This makes it rather difficult to run a successful OCR unless you increase the resolution considerably.
Ghostscript uses -r72 by default for image format output (such as TIFF). Tesseract works best with r=300 or r=400 -- but only for a font size from 10-12 pt or higher. Therefor, to compensate for the small text size you should make Ghostscript using a resolution of at least 1200 DPI when it renders the PDF to the image.
Also, you'll have to rotate the image so the text displays in the normal reading direction (not bottom -> top).
This is the command which I would try first:
gs \
-o sample.tif \
-sDEVICE=tiffg4 \
-r1200 \
-dAutoRotatePages=/PageByPage \
sample_rotate-0.pdf
You may need to play with variations of the -r1200 parameter (higher or lower) for best results.
Since a comment asked "How to define the geometry of an image when using Ghostscript as we do in convert?", here is an answer:
It does not make sense to define geometry (that is image dimensions) and resolution for a raster image created by Ghostscript at the same time.
Once you convert a vector based page of a given dimension (such as PDF) into a raster image (such as the TIFF G4 format) giving a desired resolution (as done in the other answer), you already indirectly and implicitly also did set the dimension:
The original PDF dimension of your sample file sample_rotate-0.pdf is 1008x612 points.
At a resolution of 72 DPI (the default Ghostscript uses if not given directly, or -r72 in the Ghostscript command if given directly) the image dimensions will be 1008x612 pixels.
At a resolution of 720 DPI (-r720 in the Ghostscript command) the image dimensions will be 10080x6120 pixels.
At a resolution of 1440 DPI (-r1440 in the Ghostscript command of my other answer) the image dimensions will be 20160x12240 pixels.
At a resolution of 1200 DPI (-r1200 in the Ghostscript command) the image dimensions will be 16800x10200 pixels.
At resolution of 1000 DPI (-r1000 in the Ghostscript command) the image dimensions will be 14000x8500 pixels.
At a resolution of 120 DPI (-r120 in the Ghostscript command) the image dimensions will be 1680x1020 pixels.
At resolution of 100 DPI (-r100 in the Ghostscript command) the image dimensions will be 1400x850 pixels.
If you absolutely insist to specify the dimension/geometry for the output image on the Ghostscript commandline (rather than the resolution), you can do so by adding -gNNNNxMMMM -dPDFFitPage to the commandline.
There you can find decoded content of your file: https://docs.google.com/open?id=0B1YEM-11PerqSHpnb1RQcnJ4cFk
A absolutely sure the OCR is the best way to read pdf file, but you can try REGEX-ing the native content. It going to be be the hard and long way.

Flash CS5 - How to change anti-aliasing on all text containers in an animation

Is there a quick way to change all text containers so that the anti-alias setting is "Use Device Fonts"?
I am using Flash CS5, and need to convert about 300 animations, each with 20 or more text boxes, so that they use device fonts. This is necessary so that we can more easily display traditional Chinese characters.
I can go through each text box, change the font to _sans and it automatically switches to Use Device Font - then I don't need to embed the font files. So I tried to use the Find and Replace tool to change the font on all text boxes. It worked fine at changing the fonts, but it did not auto-switch the anti-alias. Any help on this would save hours of work.
Thanks.
Hopefully you're not too far into your work on this one, but there's a new development with CS5 that will help you with just this. It's called the .xfl format, and all .fla's are actually this format, but zipped up. Have a read here for more info: http://blog.theflashblog.com/?p=1986
What this means is you can convert your fla to xfl (or just change the suffix to .zip and unzip as the above article suggests), and do a Find&Replace on all text field font values.
Hope that helps!

Resources