.pdf file is being recognized as a .ai file?
Hi there, I have a file that was created in adobe illustrator by our marketing team and is saved as a PDF.
We've noticed that this file appears to be converted into an .ai file without us explicitly wanting to do this. For example, we have looked at the metadata and confirmed this is indeed a pdf file.
I know this is a vague post but we can provide more information if requested. We are wondering if Cloudinary has any suggestions or thoughts.
This is something we see from time to time, and it's related to some of the metadata in the file that's added by Illustrator causing it to be detected as an illustrator file
There are three options to work around this:
- Allow the extension to be set as .ai when uploading, but use a .pdf extension when delivering the file
- Use an Incoming Transformation to set the format to PDF explicitly as part of the upload call (you can do also this in an Upload Preset if you're not using the API / SDK for your uploads)
- We can change an account-level configuration to force the .PDF extension for these files
If you'd like us to change your account configuration for this please send a support request via this support center and include your account details. If you'd like some more information about the other options, please let me know (or send a support request and we'll follow up directly)
I had the same issue. I've solved editing the asset directly in Cloudinary backend, changing the format manually :
Edit > Format and shape > Format: PDF
The URL produced is a PDF which maintain the exact contents and the accessibility features of the original file.
This is an example
I hope my advice can help.
We encountered this issue today.
Will using such an incoming transformation consume an API call? It seems a little odd that some metadata from Adobe gets presedence over file extension and actual content type fo the file. When inspecting the metadata of the resulting AI file even the content type is set to application/pdf.
Can you please elaborate on precisely which metadata it is that is overriding the file extension and forcing it to be set to AI by Cloudinary? That would be quite handy to know.
We use image libraries to detect the file types and the root of this issue is that some Illustrator-created PDFs include both AI and PDF fields in the metadata and are detected as AI files when we perform that analysis.
I'm not sure that this explains all possible cases, but there's a general description the way AI/PDF metadata overlaps when using Illustrator here: https://community.adobe.com/t5/illustrator-discussions/pdf-vs-ai/m-p/9710802#M87037
An incoming transformation as mentioned above would indeed use '1' transformation from your quota, but if you're encountering many such files we can also change the account-level setting I mentioned if you contact us directly, which avoids that case completely.
Accessing a file that's affected by this and which contains the .ai extension in the secure_url and url fields of the response (and/or copied from Media Library) will return the exact same file that you uploaded to us, so this shouldn't cause any issues with actually using the file and the file contents are not modified by us.
Also, if clients need the URL extension to end with .pdf to open it correctly, you can set that extension when generating the delivery URL that you add to your site or application
Alternatively, if you're delivering the original PDFs with no transformations applied, you can upload the file as a 'raw' file which won't be usable with transformations (meaning that we don't do any format detection and will trust the original file name and preserve its extension)
Thanks for the quick reply and the Adobe forum post, that is very useful.
Based on what Dov Isaacs is writing in his comments I think the "PDF" file I'm having trouble with has been generated with more features than it needs and is not a pure PDF file. With this information in hand I think the best thing to do is to do what Dov says, treat PDF and AI as entirely different file formats and save the AI as AI and PDF as PDF with no additional features.
I'll fix my file :) And I'll keep that "raw" trick in mind in case I need it.
You're very welcome - glad I could help.
Just to reiterate something I said above in case it saves you some work, there is also an account-level settings we can apply related to this. If that setting is enabled, regardless of whether our format detection thinks the file is AI or PDF, we'll keep the extension (.pdf or .ai) that was sent with the file when it was uploaded.
That also resolves this type of issue in most cases - if you submit a request to us directly with your account details and ask for this to be changed, it doesn't take long
There isn't currently a user-facing setting that changes this behaviour, and it needs to be changed from our side. In theory we could make it user-facing option, but we try to limit the user-visible settings in the UI to those most likely to be changed to avoid complexity in the UI or confusion about the purpose or need for infrequently used settings.
Regarding this specific setting, approximately 1 in every 15,000 accounts has the non-default behaviour. It's very rarely changed and also doesn't result in many requests to our support team, so I think it's not likely we'll be able to add a user-facing setting for it in the short term. If you'd like it changed for your account, just let us know via a direct request to the team and we'll change it for you
Post is closed for comments.