Adobe Illustrator CC Can't open the illustration invalid operation argument [closed] - adobe-illustrator

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have encountered a bug where using gradients sometimes randomly corrupts the illustrator file. When I open it I see the bug popup (yeah, I use Polish-localized version of Illustrator CC).
The bug report states something along:
Can't open the illustration. The illustration contains an invalid operation argument.
Offending Operator: Bd
Content:
%AI5_EndGradient
%AI5_BeginGradient:
I am using Windows 8.1. How can I recover my file?

You can follow the steps outlined in on that adobe page even though it states it's only for Illustrator CS2-CS5 it will work for CC as well.
The file location for Windows 8 is:
C:\Users\[ username ]\AppData\Roaming\Adobe\Adobe Illustrator 17 Settings\[localisation code]\[version]\
localisation code for Poland will be pl_PL, but don't worry about that, there will most probably be just one folder in the Adobe Illustrator 17 Settings.
version either x64 or x86, choose the one you are using
The file you are looking for has also localised name for Polish it's: Preferencje programu Adobe Illustrator for other localisations it will be some translation of Adobe Illustrator Preferences
in section:
/aiFileFormat {
/PDFCompatibility 1
enableATEReadRecovery 0
/enableContentRecovery 0
/enableATEWriteRecovery 0
/clipboardPSLevel 3
}
Set the enableContentRecovery flag to 1 /enableContentRecovery 1
Then follow the "Starting Document Recovery" section from the link.
When you have the _[your filename].ai file you need a huge text file editor so that you can remove offending operators. I have used 010 editor which has a 30 days trial.
Open the file and search (ctrl+F) for the offending content, it's a markup language so you have to remove whole sections between %AI5_BeginGradient: [your gradient name] and %AI5_EndGradient.
Remove one gradient.
Save the file in your text editor.
Try to open it in illustrator. (notice that the error message changes, if it doesn't try to look for the exact same name and remove it's section).
Rinse and repeat until it opens.

Related

Possible to replace unusual PDF document's fonts with normal fonts? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I received a PDF file that uses unusual fonts.
The fonts look fine to the human eye,
but if I try to cut-past them, I get a string of '???'
Is it possible to replace the PDF document's defined fonts with normal fonts (e.g., on Foxit Phantom PDF editor)?
This may be possible, e.g. with PitStop Pro from Enfocus. However, as others indicated in the comments, it is possible that the fonts in the pdf and the pdf itself have had all information to make this possible removed.
Some more detail about this maybe:
The encoding in the PDF could tell software which character is to be shown, and then that character would be selected from the font for display, but it is also possible to create a pdf so it only says 'show glyph number 3 in of the embedded font'. That is what the 'Identity-H' encoding you see in the summary does.
Note that the word glyph and not 'character' is specifically used when talking about the individual 'drawings' that make up a font to indicate that these things are only 'random' drawings until some information is added in the font to indicate which letter (or other character, like a number) they represent.
E.g. for the character 'lower-case-a', the font you currently look at has this glyph:
a
but other fonts will have something that may look completely different. Only because we have learned to read these different images as the letter lower-case-a do we think they are/represent 'the same letter'.
If this information is not present in the PDF, as is your case, it is still possible that this information can be gotten from the font included in the pdf: a font on your computer needs some way to allow a program to select the right glyph if it wants to display 'lower-case-a'. However, if the pdf is set up to simply say 'show glyph number 3 in of the embedded font', this information isn't necessary anymore, and can be removed from the font before the font is put inside the pdf. This is done either to make the pdf smaller, or to prevent people from copying the text, e.g. of copyrighted works.
In this case, only OCR can help. I think Adobe Acrobat (the full version, not Adobe Reader) has added exactly that in one of the latest versions; however this means it is trying to guess the letter from the 'image' shown, so this may make mistakes.

Is there any GNU/Linux command line utility that converts .doc(x) files to .pdf? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Surely, I am the 100th user who is asking this but after I have searched through similar topics here and on other websites I still cannot find what I need.
I like to have a simple command line tool for my GNU/Linux which converts .doc(x) files to .pdf BUT the output should look the same as the original.
LibreOffice doesn't seem like a good choice for this because it does not convert well in some cases. I have found a website freepdfconvert.com which does the job very well, but I cannot upload any sensitive files since it is a big risk. I don't say they would do anything bad with them but it is how it is.
If I can't find any good tool maybe I will have to write one myself.
Unfortunately there are no Linux-based guaranteed 1-to-1 convertors for Word (doc/docx) to PDF. This is because Word, a Microsoft product, uses a proprietary format that changes slightly with every release. As it was not traditionally a publicly documented format and Microsoft does not port Word/Office to Linux (nor ever will) then you must rely upon reverse engineered third party tools for older formats (doc) and proper interpretation of the Office Open XML format by third party developers.
We found the best open source solution is LibreOffice (which was forked from OpenOffice.org, which itself was called Star Office before it was open sourced). It is much more actively developed than AbiWord, as another answer suggested.
The usage from the command line is simple and well documented with plenty of examples:
soffice --headless --convert-to pdf filename.doc
Or also you can use libreoffice instead of soffice on newer versions.
There is also Pandoc.
Pandoc, mainly known for its Markdown-capable processing goodness (for outputting HTML, LaTeX, PDF, EPUB and what-not) in recent months has gained a rather well-working capability to process DOCX input files.
(NOTE: Pandoc only works for DOCX, not for DOC files.)
For its PDF output to work, it requires a working LaTeX installation (with either or all of pdflatex, lualatex and xelatex included). In this case the following simple command should work:
pandoc -o output.pdf -f docx input.docx
Note however, that the output layout and font styles now will not look at all similar to what it would look if you exported the DOCX from Word to PDF. It will be using the styles of a default LaTeX document.
You can influence the output style of the LaTeX-generated PDF by using a custom template file like this...
pandoc \
-o output.pdf \
-f docx \
--template=my-latex-template.tmplt \
input.docx
...but this is a feature more for Pandoc/LaTeX experts to use than for beginners.

Revert all files in a folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Is there a way to revert all the documents in a folder to the revision at a certain time? I see how to do it for individual files, but how would I do it for an entire folder?
I had the same problem, so I wrote this script to restore any dropbox folder to its state as of a given date:
https://github.com/clark800/dropbox-restore
You have several options:
If you've recently done something that has modified a large bunch of files in your Dropbox and you want to revert all those changes, you can contact the support staff at Dropbox to have the modifications rolled back. See https://www.dropbox.com/help/400/en for details. Based on discussions in the Dropbox forums, it seems like they are also willing and able to restore any given folder to an arbitrary date, as long as it is within the bounds stored by Dropbox (30 days for a basic account; for accounts with the packrat feature all the way back to when packrat was activated).
You could use the script written by clark800, linked to in a separate answer to this question. I haven't used it so cannot vouch for it, but many seem very happy with it!
If you are on a Mac (OS X 10.7 or later), you can try out a new app called Revisions (available at https://www.revisionsapp.com) that I've been working on. The app allows you to select any folder in your Dropbox and shows you a timeline of all edits for that folder. Then, you can choose to restore or download any version of any single file, or restore or download an entire folder (including any subfolders) to its state at any desired point in time (subject to the Dropbox bounds stated above).
To my knowledge restoring to a particular revision is limited to a per file operation. It would be possible to accomplish what you are looking for using their REST API however it would require custom code.
If you don't want to use a script, Dropbox does allow you to select multiple files at the same time and restore them (if you login to your account online). Right click and select 'Show deleted files' first. Then if it's just a few folders, either select the files individually by holding down 'Ctrl' and selecting them, or using 'Ctrl' and 'A' to select them all. Then right click and select restore.

How to compare two pdf files through command line [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Does anyone know how to compare two pdf files using adobe acrobat through command line.
I want to do this via command line because we want to compare hundreds of file every day through some automated windows tasks.
Any kind of help will be greatly. I do not want to limit myself to acrobat to compare , if there is something else available.
How about i-net PDFC - it does a full content comparison - text, images, lines, header/footer-detection and so on. You can use it either on command line or with a GUI (2.0, currently in public beta-phase).
The command-line tool already has the option to compare folders with PDFs against each other (or the extreme way: use the API ;))
Disclaimer: Yep, I work for the company who made this - so feedback highly appreciated.
Check out comparepdf:
comparepdf is a command line tool for comparing two PDF files. By default it compares their texts but it can also compare them visually (e.g., to detect changes in diagrams, images, fonts, and layout). It should prove useful for automated testing.
It is Open Source (GPL) and there are Windows binaries available.
Also:
If you want a GUI application that shows the detailed differences between PDFs use DiffPDF instead.
What you want simply cannot be done with Adobe Acrobat through the command line. However, you could do it with the help of some commandline utilities which you could unite into a shell or batch script.
1. Quick visual check for page image differences
One ingredient of this would be ImageMagick's convert command, which you can test like this for two 1-page PDF files which have page contents similar to each other's:
convert -label '%f' -density '100' first.pdf second.pdf -scale '100%' miff:- \
| montage - -geometry +0+0 -tile 1x1 -background white miff:- \
| animate -delay '50' -dispose background -loop 0 -
This will open a window which switches with a delay of 50 dezi-seconds between displaying each of the two files, so it is easy to discover visual differences.
2. Script to generate PDF output visualizing differences between PDF files
I'm doing the same thing using a shell script on Linux that wraps
ImageMagick's compare command
the pdftk utility
Ghostscript (optionally)
(It would be rather easy to port this to a .bat Batch file for DOS/Windows.)
You can read details about this approach in this answer.

How can I create PDF documentation with cut-and-paste-able code snippets? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've tried using LaTeX and DocBook for documenting programming tools, to get PDF output. What I've found is that these tools are excellent in some ways - easily versioned, and generating very usable PDF manuals. But there is a serious flaw. Code-snippets cannot simply be cut-and-pasted out of the PDF.
With DocBook, the problem is the loss of whitespace - mostly for indentation, but any repeated spaces seem to get stripped out. So, once you paste the snippet into a text editor, you'll need to clean up the indentation and vertical alignment. Not too much hassle for two or three lines, but it quickly gets annoying.
With LaTeX - well, it's a mess. The following was taken from a PDF generated using the LaTeX in MikTeX 2.8.
node myclas s
f f i e l d f i e l d 0 1 : i n t ;
f i e l d f i e l d 0 2 : ” char ” ;
g;
The intended example is...
node myclass
{
field field01 : int;
field field02 : "char*";
};
Other than the fact LaTeX plays with the quotes, the intended form is what you see in Adobe Reader - but not much like what you get from a cut-and-paste. Don't ask me what's going on with the spaces, or why the braces turned into letters, or what happened to the asterisk - I don't know!
Mostly, I've noticed these things playing with ways of keeping my own personal notes, and just went back to other ways. Some notes are in HTML or plain text, so I can version them. Others are in an old Journal program I've used for years. But I've written a tool that I may want to release soon - and I'll want to include a usable PDF manual, which will need to include examples.
So - is there a way of creating PDF documentation where the code snippets can be easily cut-and-pasted? Preferably a way that allows me to keep "sources" in versioned text files.
EDIT
Any solution must be portable. I will need to use it on Linux and on Windows XP.
EDIT
It looks like this may be impossible.
I've tried printing from Notepad++ to the Adobe Acrobat Pro 7 printer driver. The resulting document looked fine, but cutting and pasting gave the same missing whitespace problems as occur with DocBook.
I tried using the touchup text tool in Acrobat Pro to add leading spaces. These are preserved when you save and reload - but when you select text normally in acrobat, they aren't included. You can only cut-and-paste including those spaces using the touchup text tool, so far as I can tell, which is obviously not included in reader.
In other words, this looks like a fundamental limitation - not of the PDF format itself so much as the tools that work with it. There appears to be a general assumption at work here that whitespace is insignificant - which for my purposes obviously isn't true.
EDIT
One solution may be a "text field". I can add these fairly easily using Acrobat Pro, can set a fixed width font, enter multiple lines of text and make the field read only. In Acrobat Pro 7, the text in the field then isn't selectable - but in Reader 9 it is selectable and everything is preserved when you cut and paste.
The question is - can text fields be generated directly using some kind of markup language that is usable to create complete manuals?
I'd suggest enscript. I use it for producing archives and documentations.
Also, you can merge multiple source codes ps'ed with enscript into another pdf.
If your code is kept in external files, one way would be to attach the original file(s) as PDF attachments. This could be done with Docbook, LaTeX, DITA, and a few others.
For example, if you are using this method to include code in Docbook, you can write some code to your XSL customization layer for adding the external file as an attachment to the PDF. As far as I know, this is portable (although I haven't personally tried to open PDF files with attachments in Evince, Okular, Xpdf, etc to see what happens).
If you are processing the Docbook files using even FOP, you should still be able to write something into your customization layer to attach files. See the section on PDF attachments. You could even output a link to the attachment below the codeblock in the PDF if you want to make it more discoverable to people.
A similar solution should be possible using LaTeX with the attachfile package.