We know that the x1a standard requires images without transparency, fonts converted to outline, and cmyk colors, but not every pdf with these specifications is recognized as x1a.
Is there any way for us to export/save using the x1a presets that is recognized like this in prepress software?
Related
I’m using pdfkit to create multi-page documents with embedded images, and the files get really large quickly. I can compress them nicely afterwards using Preview on the Mac, and they still look great, so I’m wondering if there is perhaps a setting I’m missing in pdfkit that controls resolution or size, or if there is way to compress them after creating them.
No, there isn't a way of specifying the image compression using PDFKit. It's just putting the image data in a PDF wrapper.
I'd suggest that you probably don't want to reduce the size of the image; but just the compression level. However, if you do, you can use CGPDFDocument and scale the image to fit a particular-sized graphic context.
On macOS, it is possible to create a Quartz Filter programmatically, which can include options for compression, which you can then apply in the options when you write your PDF; but this isn't available in iOS.
(If you're using macOS's 'Reduce File Size' Quartz Filter when exporting from Preview, it's well-known to be not very good; many people have made better ones.)
However, you can set the JPEG compression level in a UIImage object, so you may be able to increase the compression in the image data before you convert it to PDF.
https://developer.apple.com/documentation/uikit/uiimage/1624115-jpegdata/
New to Juypter, trying to use it with Latex. Everything works fine except for the images. I used this tutorial: https://www.youtube.com/watch?v=m3o1KXA1Rjk&t=149s
Png Images are fine in markdown, i.e
But LaTex cannot determine size of png images. If I save the image as pdf I get the same issue. If I save the image as eps then LaTex complains that it cannot convert eps to pdf.
Has anyone had this issue? Anyone know how to solve it?
PNG images always contain the size in pixels.
Optionally, they can include a chunk of data named pHYs. This contains the resolution of the image. If this chuck is present, you should be able to find the actual text pHYs in the file.
If this chunk is missing from the PNG file, the scale of the image can not be found.
If you are on a UNIX-like operating system you could use grep or hexdump to check for the text pHYs in the PNG file. The identify program from the ImageMagick suite also can display the resolution of PNG images.
Note that there is an error in the video. The author first uses latex and then pdflatex three times. That is not a good idea, since they have different capabilities w.r.t. graphics. Stick with pdflatex.
Quick PDF has a feature to convert a PDF into an Image:
iNumPages := PDFLibrary.PageCount();
PDFLibrary.RenderDocumentToFile(300, 0, iNumPages, 0, 'H:\temp\quickpdf_testimage_6_new.bmp');
If this feature is executed the letters move (with some PDF sources) in each other. In the following there is a PDF and the resulting JPG:
PDF: http://www.baunetz.de/aip/2001/tunnel.pdf
Now there is a problem: in the resulting Image the Letters move in eachother.
Update:
I have cause of the Problem:
"
This PDF contains a font (OfficinaSans-Book) that is not embedded in the PDF so Quick PDF substitutes Arial instead which has thicker characters.
This is a common problem with PDF's and many PDF viewers. The best solution is to create the PDF with embedded fonts for any of the non standard fonts that are used in the PDF."
http://www.quickpdf.org/forum/topic2478_post10369.html#10369
Update 2:
The only PDF Engine so far that has no Problems with 'lettes moving in each other' is the foxit DLL.
I have cause of the Problem: " This PDF contains a font (OfficinaSans-Book) that is not embedded in the PDF so Quick PDF substitutes Arial instead which has thicker characters.
This is a common problem with PDF's and many PDF viewers. The best solution is to create the PDF with embedded fonts for any of the non standard fonts that are used in the PDF." http://www.quickpdf.org/forum/topic2478_post10369.html#10369
Edit:
A possible solution would be to use MultiMaster fonts if the font wasn't found on the system. Adobe uses this technique. But i haven't found a way to implement that with quickpdf.
For a dynamic imaging application I'm building, I have to take an image created by a rendering package and place it in an InDesign file. Because it needs to be CMYK with transparency, TIFF is the only possible format to use. The difficulty I'm having is that the renderer is generating an image with an unassociated alpha channel, which InDesign seems to have trouble understanding.
I'm working with the renderer manufacturer to see if they can change their output format, but in the mean time I would like to find some automated workflow to convert a CMYK TIFF with unassociated alpha to have associated (premultiplied) alpha.
I tried using GraphicsMagick's command-line tool (which would be easily scriptable), but the closest I could get simply forced the TIFF flag to get written as premultiplied--it didn't actually perform the premultiplication. The effect is a working alpha but with washed out color:
gm -convert <infile> -define tiff:alpha=associated <outfile>
Does anybody have other suggestions on how to achieve this conversion? My primary requirement is that it needs to be automatable in a Linux server environment, ideally via either scripting or a PHP library (since that's already being used elsewhere in the workflow), but I'm flexible on the PHP bit.
Edit:
For reference here are the two files (42MB each):
Original TIFF with unassociated alpha
Modified TIFF from GM with pseudo-associated alpha and washed out color
Server Config:
Windows Server 2003
IIS 6
ColdFusion 8 Standard Edition
Java Version 6 Update 18
I have a ColdFusion application that allows users to upload images that will be added to an existing PDF. When the images are added to the PDF, they have to fit within a minimum/maximum height and width, so the uploaded image needs to be scaled to fit.
For instance, let's say the minimum height and width for a given image is 100x100, and the maximum height and width is 200x200, and the user uploads an image that is 500x1000. I use the logic below to scale that image down without skewing the image (it keeps its original shape) to 100x200. For an image smaller than the minimum, it is scaled up (in the example above, a 50x50 image would be scaled up to 100x100).
Unfortunately, I'm running into a lot of problems with users uploading "invalid images". I know that ColdFusion has problems working with Progressive JPEGs and CMYK JPEGs, but even some TIFFs are throwing errors. Also, a 3MB TIFF image takes over a minute to scale (not to mention the loss of resolution that occurs, which I have submitted as a separate question here.)
I've added logic to prevent ColdFusion from trying to process an "invalid image" by using the IsImageFile() function, but the users are very frustrated when they have an image that they can open and view on their PC, but we can't accept it. Do online print companies (i.e. Shutterfly, Kodak, etc.) have these issues? I can't remember ever having an issue on these websites (though I know they may not necessarily use ColdFusion).
Any thoughts on what I can do to allow more types of images to be used (Progressive, CMYK, etc.) and improve performance?
You will likely have to use a non-CF solution like we had to do before CF8. Some libraries mentioned here: https://stackoverflow.com/questions/158756/what-is-the-best-image-manipulation-library
Scaling time is heavily dependent on the algorithm you chose to use. Adding images to PDFs in ColdFusion is unpredictable at best. I found them to be often inflated, dramatically increasing the PDF file size.
Here is some information from the docs:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_in-k_16.html
Supported image file formats
The cfimage tag operates on a number of different file formats. To list the formats that are supported on the server where the ColdFusion application is deployed, use the GetReadableImageFormats function and the GetWriteableImageFormats function.
ColdFusion supports the following default image formats on Macintosh, Windows, and Unix operating systems:
JPEG
GIF
TIFF
PNG
BMP
ColdFusion does not support the following image formats:
Animated GIF
Multipage TIFF
PSD
AI
CMYK support
The cfimage tag supports reading and writing CMYK images, but does not support actions that require converting the images. For example, you can use CMYK images with the read, write, writeToBrowser, resize, rotate, and info actions. You cannot use CMYK images with the convert, captcha, and border actions. The same rule applies to image functions. For example, the ImageNew, ImageRead, and ImageWrite functions support CMYK images, but the ImageAddBorder function does not.