Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How to convert a PDF document to an older version
What software exists can do this conversion?
I work with some software that can't handle newer PDFs made with Adobe Acrobat 9 Pro and other newer office programs.
Price and platform doesn't matter as long as it's not too expensive.
- Adobe Acrobat itself has a feature to change the version. Word has a similar option between Office 2010 and Office 2013 for its .docx format. Only providing a comment because of the spam that was published. – Ramhound Jan 14, 2015 at 13:57
4 Answers 4
Acrobat 9 Pro can be used to re-distill PDF 1.7 into any "lower" version of PDF. Look at the Distiller settings... Up to you to decide if it's "not too expensive".
Depending on the exact feature subset of PDF-1.7 used in your files, even (Free) Ghostscript may be able to do a good quality transformation to PDF-1.2, PDF-1.3 or PDF-1.4 file format version.
This is the Ghostscript command line to create a PDF-1.4:
Note: The more recent versions of Ghostscript can abbreviate the parameter -sOutputFile=... to -o ... . It also implicitly also sets -dBATCH -dNOPAUSE . So it is much shorter to type and much easier to avoid typing errors.
- I almost lost all hope when reading @Rook's answer. This gives me hope. I will definitely try out both programs. I think I long time ago tried Ghostscript for a PDF merge task. Thank you. – neoneye Sep 8, 2010 at 9:17
- IT WORKS. I have just converted a bunch of PDFs from version 1.6 to version 1.4. Very impressive. – neoneye Sep 9, 2010 at 8:21
- Maybe you could leak which of the two suggested methods you used? – Kurt Pfeifle Sep 9, 2010 at 18:54
- 18 gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dCompatibilityLevel=1.4 -sOutputFile=output.pdf input.pdf – neoneye Oct 12, 2010 at 18:56
- This adds PDF producer as GPL GhostScript 10.00.0 is there a way to do that. – anand_v.singh Nov 10, 2022 at 16:44
If you're using Ubuntu 11.04 (or probably any Gnome distro) and can view the PDF in the built-in Document Viewer, you can then Print to file to save it as a PDF-1.5. (Save A Copy, in contrast, just creates a byte-identical copy of the file.) I did this today to convert a PDF from 1.6 to 1.5, so now I can use it with the FPDF lib.
- Do you know what the "built-in Document Viewer" is called? – jeteon Feb 18, 2016 at 4:12
- @jeteon: That's probably evince ... – Kurt Pfeifle Feb 18, 2016 at 11:10
In addition to the Ghostscript solution suggested above, you can use the "Reduce File Size" option in the "Document" menu of Adobe Acrobat 8 or 9, and choose the compatibility level you desire.
Additionally, Acrobat 8 or Acrobat 9 Pro can run the PDF Optimizer in Batch Processing to convert multiple files at once; simply create a new sequence with no commands. In the sequence's Output Settings dialog, check the "PDF Optimizer" box and click the Settings button - enable or disable any optimization settings you'd like, and set the "Make compatible with" dropdown near the top to the appropriate Acrobat/PDF version you desire. Run the batch sequence on the files/folders you wish to convert, and PRESTO , hundreds of documents converted in minutes!
I used the PDF Optimizer/Batch Processing method to convert 297 PDF files in about 3-4 minutes (most were 1-page flyer type documents). It's also worth noting that the PDF Optimizer can't convert secured documents ;)
Adobe Acrobat DC is $15/mo and its "Optimizing PDFs" dialog can do what you need
Look under the "Make compatible with" dropdown
You must log in to answer this question.
Not the answer you're looking for browse other questions tagged pdf conversion ..
- The Overflow Blog
- AI is only as good as the data: Q&A with Satish Jayanthi of Coalesce
- Tomasz Tunguz: From Java engineer to investor in eight unicorns
- Featured on Meta
- Practical effects of the October 2023 layoff
- Update: New Colors Launched
Hot Network Questions
- How many p-value observations do you think are required before doing FDR correction
- If money were no object, is there an element or alloy that would make for better train tracks than common steel?
- Zero distance between a closed set and a bounded closed set which are disjoint in a metric space
- How many miles of subterranean caverns could exist unknown to science?
- Is there a tailwind limit while in cruise?
- A German equivalent for "If it ain't broke, don't fix it."
- In DS9, is the 25th hour ever explicitly mentioned?
- Shuffled binary numbers
- Can a 25 amp breaker be used on #12 wire to feed a fridge receptacle?
- How to crop a T-shirt without it fraying
- How to use Compile to optimize the performance of a function calculating the distance between two points?
- If a Goliath is hit by an attack, they have resistance to its damage type, and they also use Stone's Endurance, in what order is the damage reduced?
- Does a diode flyback protection decrease the life of the relay?
- I need help identifying this screw
- Should the Lego Batcave step 264 use 1x1 Technic bricks?
- Can the president of the United States be impeached on the basis of felonies committed prior to their presidency?
- How to think about yield for a annuity of fixed number of years which pays a predefined cashflow each year
- Same column width
- What would it take for a space craft to travel to the sun's nadir and stop?
- Why are sickbays so ridiculously ill-equipped for large-scale medical situations?
- My Interrail global pass shows 3 inbound/outbound days in total in the app. How is it permitted to use the third day?
- Why is vowel length not considered phonemic in Turkish?
- What evolutionary pressure would lead to parrots or crows developing human-tier intelligence?
- Is being too good as a Christian a sin?
Ghostscript PDF Converter
PDF files need to be in PDF-Format 1.4 or below in order to be able to process those files using fpdf/tcpdf php libraries. As most customers are unaware of this and aren’t able to convert their files to this format, i had to do this on my own:
This converts a given file “inputfile.pdf” from whatever PDF-version to version 1.4 as output.pdf.
- Integrate Spamassassin as antispam solution between postfix and dovecot on Debian 8 Jessie
- apticron - let you server alert you for pending apt-updates
- OpenVPN on Ubuntu Linux
- sbuild: a source build environment for debian based systems
- Howto: Setup Debian Web and Mailserver with Apache, PHP-fpm, MySQL, Postfix, Dovecot, virtual users in flatfiles and SSL/TLS
- sbuild: create powertop deb package from source
- technical details on zotac zbox ci321 nano
- Apache + mod_deflate: serve pre-compressed content instead of deflating on each and every request, also serve webp if available
- Bash: get random element from a list/array
- Crontab: log stdout and stderr to logfile by current date and time
- PHP 5.6.x: activate APCu, installing is not enough
- PHP 5.6.x: activate xdebug for use with Netbeans 8.1
- C# & MySQL Connector: Guid should contain 32 digits with 4 dashes
- Blackberry OS 10 and Owncloud syncing woes
- manually updating a blackberry z10 with a new blackberry OS 10 release under linux
The NEW Ghostscript PDF Interpreter
Update to the original post – march 4, 2022.
The new PDF Interpreter is now the default!
We are happy to announce the new PDF Interpreter code is feature complete and is now enabled by default in Ghostscript 9.56.1. The old PDF interpreter can still be accessed as a fallback by specifying -dNEWPDF=false . We’ve provided this so users who encounter issues with the new interpreter can keep working while we iron out those issues, the option will not be available in the long term.
This also allows us to offer a new executable (gpdf, or gpdfwin??.exe on Windows) which is purely for PDF input. For this release, those new binaries are not included in the “install” make targets, nor in the Windows installers.
Rewritten entirely in C, the new implementation delivers a standalone PDF interpreter that is faster and more secure than its predecessor, written in PostScript.
Read on for answers to frequently asked questions, and highlights of the changes.
Why the Change?
The original PDF interpreter, as previously supplied with Ghostscript, is written in PostScript. When the original implementation was done this made good sense; the graphics model of PostScript and PDF was compatible and the PDF syntax is (or at least was) broadly similar to PostScript. Indeed that original PDF interpreter has served us well for decades.
However, there are problems, mainly invisible to our users but nevertheless still present. PostScript has been described, with some justification, as a ‘write-only’ language and, being now an elderly language is a rare skill for developers making it quite hard to recruit new engineers with PostScript programming skills. Not all of the Artifex development team are experienced PostScript programmers and even for those of us skilled in the language, the PDF interpreter code is now so large and arcane that it is difficult to fully understand some aspects of the PostScript program which performs the PDF interpretation.
In addition, the PDF specification has continued to evolve, whereas the PostScript language has remained static. PDF has added features like transparency, which have no equivalent in PostScript, and the only way for us to support these has been to add special, often undocumented, PostScript extensions. These extensions have proven to be a security problem in the past and we would like to remove our PDF interpreter’s dependence on them.
It has also become increasingly evident that many PDF producers do not create PDF files that conform to the specification. Since there is no means to ‘verify’ that a PDF file conforms, creators fall back on using Adobe Acrobat, the de facto standard. If Acrobat will open the file then it must be OK! Sadly it turns out that Acrobat is really very tolerant of badly formed PDF files and will always attempt to open them. Often it silently repairs the file in the background; the first time an alert user would be aware of this is when Acrobat offers to ‘save changes’ to a file the user has not modified, frequently Acrobat doesn’t even do that.
Because Acrobat will open these files, there is considerable pressure for Ghostscript to do so as well, though we do try to at least flag warnings to the user when something is found to be incorrect, giving the user a chance to intervene.
But Ghostscript’s PDF interpreter was, as noted, written in PostScript, and PostScript is not a great language for handling error conditions and recovering. In general, when something goes wrong in a PostScript program the expectation is that the PostScript interpreter will generate an error message and stop. It is possible to do better, but it is not trivial. As time has gone on, and we have encountered more and more PDF files with ever more unexpected deviations from the specification, it has become harder and harder to come up with new strategies to work around these faults without re-introducing previously fixed problems or failing to process compliant files. It is also true that many of these workarounds have led to decreased performance when processing all PDF files, not just the malformed ones.
Finally, because the PDF interpreter was written in PostScript, there was no way to divorce it from Ghostscript and its PostScript interpreter. This had performance implications (starting up a PostScript interpreter is quite a complex process) and imposed a resource overhead in that we needed both the PostScript interpreter and a complex PostScript program before we even started to interpret the PDF file. Using the PostScript interpreter also exposed us to potential security issues due to the use of non-standard PostScript extensions. There was also the possibility of being forced to run PostScript XObjects (long since deprecated) in a PDF file, which potentially opened up some security problems as this program was run in the PDF environment which is less protected than regular PostScript.
The new PDF interpreter is written entirely in C, but interfaces to the same underlying graphics library as the existing PostScript interpreter. So operations in PDF should render exactly the same as they always have (this is affected slightly by differing numerical accuracy), all the same devices that are currently supported by the Ghostscript family, and any new ones in the future should work seamlessly.
Because the interpreter no longer relies on PostScript, however, it can be divorced from it. It is now possible to create a stand-alone PDF interpreter, GhostPDF, and it is integrated as a separate module in the language-switching product GhostPDL.
This offers us some advantages in that the memory footprint is smaller, and the startup time of the stand-alone PDF interpreter is less than starting up the PostScript interpreter.
That said, we do recognise that people are used to being able to process PDF files through Ghostscript, and indeed over the years we have offered customers and free users a wide range of solutions which were based on the fact that the PDF interpreter was written in PostScript, and its behaviour could be controlled or influenced from the PostScript environment.
So one of the goals of this project was to enable the C PDF interpreter to be integrated into the PostScript environment in such a way that PostScript can be used to influence the graphics state of the PDF interpreter, and PostScript functionality like BeginPage and EndPage continue to function with it. And of course not forgetting that initial point, Ghostscript today can process PDF files and our users will expect that ability to continue. We’ll set out some of the means for that below.
Using the New Code
If you are using Ghostscript, the new PDF interpreter is enabled by default. As a fallback, use -dNEWPDF=false to return to the old interpreter. Explicitly setting NEWPDF to true or false makes it clearer what is required.
Command line switches should work in both cases the same as they do in Ghostscript right now. Please note that the gpdf executable does not permit you to use the pdfmark operator (or otherwise send arbitrary PostScript to the interpreter using the -c switch). The pdfmark operator is a PostScript operator and therefore requires you to use the PostScript interpreter.
Obviously, the gpdf interpreter will not execute PostScript XObjects embedded in PDF files, for the same reason.
Using the PDF Interpreter From PostScript
The new code has been integrated following the old PDF interpreter; if all you want to do is process a PDF file then simply putting the file on the Ghostscript command line is sufficient. Also, the definition of the PostScript ‘run’ operator works with the new PDF interpreter, so you can still use code such as ‘(/home/myfile.pdf) run’.
This is covered in https://ghostscript.com/doc/9.56.1/Language.htm#PDF_scripting
Last revised: 04 March 2022
Ghostscript is a powerful PostScript and PDF processing engine. With Ghostscript, it is possible to further edit and convert your PDF specifications to your desires.
We have integrated a Ghostscript command pipeline, that can convert your PDF file based on your provided arguments, before being downloaded or sent to Webhook integrations. You can provide your custom Ghostscript commands in our settings page
For example, let's say you would like the PDF to be converted from it's default PDF version 1.7 to PDF/X-3 version 1.3, you would provide the following argument: -dPDFX
Another example, if you would like to convert the PDF version to 1.4 and convert all colors including images in the PDF to CYMK, you would provide the following arguments:
- - dCompatibilityLevel=1.4
Please note that each argument is separated by a single space
For more available arguments you can study Ghostscript Use . Also note that we provide other default arguments such as (so you should not): -sDEVICE=pdfwrite -sOutputFile=out-x3.pdf PDFX_def.ps input.ps
Still need help? Contact Us Contact Us
PDF to PDF/A using Ghostscript
Main Page > Documentation > Media type preservation plans > Portable Document Format > PDF to PDF/A using Ghostscript
File 1 (primarily text) [ edit ]
- File used was A checklist for documenting PREMIS-METS decisions in a PREMIS profile, May 2010, Sally Vermaaten, OCLC, http://www.loc.gov/standards/premis/premis_mets_checklist.pdf .
- Used Ghostscript 8.71 using the following command: gs -dPDFA -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=premis_mets_checklist_PDFA.pdf premis_mets_checklist.pdf
File 2 (text, graphics, colours, images) [ edit ]
- File used was IFPI Digital Music Report 2010, http://www.ifpi.org/content/library/DMR2010.pdf
- Used Ghostscript 8.71 using the following command: gs -dPDFA -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=DMR2010_PDFA.pdf DMR2010.pdf
File 3 (fillable form) [ edit ]
- File used was Understanding Canada: Canadian Studies Application, Faculty Research Program, http://www.iccs-ciec.ca/pages/z_pdfs/FEP_FRP/FRPEnForm.pdf
- Used Ghostscript 8.71 using the following command: gs -dPDFA -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=FRPEnForm_PDFA.pdf FRPEnForm.pdf
- Note that the version normalized to PDF/A is no longer usable as a fillable form
PDF Compression Using Ghostscript
Have you ever felt like your PDF files take up too much space on your server? As you collect more and more of these files, you might run into storage issues that can be costly to solve. But what if there was a way to shrink the size of these PDFs by 50% to 70% without compromising the document's visual clarity.
Today, we're going to explore a solution for this problem that I really like: GhostScript.
What is GhostScript?
Ghostscript is a free and open-source software suite that provides a powerful set of tools for compressing documents, including PDFs. Ghostscript offers several advantages as a compression strategy, including:
High compression rates: Ghostscript offers powerful compression algorithms that can reduce the size of documents by up to 90% or more. Platform compatibility: Ghostscript is available for Windows, Linux, and Mac OS, making it a versatile solution that can be easily integrated into your existing system. Free license: Ghostscript is available under the GNU General Public License, which means that it can be used, modified, and distributed freely without any licensing fees or restrictions.
Lets explore the pro's and con's
Advantages of using ghostscript for pdf compression:.
- Compression: Ghostscript offers a plethora of compression options tailored to the specific needs of PDF files. By intelligently compressing various elements within a PDF, such as images and fonts, Ghostscript can substantially reduce file size while maintaining readability.
- Quality Retention: A standout feature of Ghostscript is its ability to compress PDF files without compromising content quality. Its compression algorithms are designed to strike a balance between file size reduction and content fidelity.
- Customization: Ghostscript empowers users to fine-tune compression settings according to the nature of their PDF files. This level of customization ensures that vital elements within the PDF remain intact while optimizing less crucial components.
- Open-Source Nature: Being an open-source solution, Ghostscript offers a cost-effective strategy for PDF compression. Its accessibility enables users to harness its capabilities without the burden of licensing fees.
- Cross-Platform Compatibility: Ghostscript's versatility shines through its compatibility with various operating systems like Windows, Linux, and macOS. This universality ensures consistent compression results across different platforms.
Disadvantages of Using Ghostscript for PDF Compression:
- Learning Curve: Ghostscript’s technical nature could be a stumbling block for users unfamiliar with its intricacies. Acquiring the necessary expertise might require time and effort.
- Compatibility Concerns: Some PDF files, particularly those with intricate structures or unique features, might not interact seamlessly with Ghostscript's compression algorithms. This can potentially lead to errors or quality degradation.
- Performance Impact: While Ghostscript excels with moderate-sized PDFs, larger and complex files might suffer from slower compression speeds. This could potentially impact system performance during compression operations.
- External Software Dependency: Integrating Ghostscript for PDF compression necessitates the installation and configuration of external software. This introduces an additional layer of complexity and potential maintenance obligations.
Using Ghostscript in Windows.
We can use the follwing windows command to compress a PDF file.
Here’s what each option does:
- gswin64c.exe : This is the Ghostscript executable file for 64-bit Windows. If you have a different version or installation location, adjust the command accordingly.
- -sDEVICE=pdfwrite : This option sets the output device to PDF. Ghostscript has several output devices, but we want to write a new PDF file.
- -dCompatibilityLevel=1.4 : This sets the compatibility level for the output PDF file to 1.4. This is a relatively low level, but it should be sufficient for most purposes.
- -dPDFSETTINGS=/ebook : This sets the compression level for the output PDF file. /ebook is a medium compression level suitable for ebooks.
- /screen : This is the lowest compression level and is suitable for on-screen viewing. It produces the lowest-quality output.
- /ebook : This compression level is suitable for ebooks and produces a medium-quality output.
- /printer : This compression level is suitable for printing and produces a high-quality output.
- /prepress : This compression level is suitable for prepress use and produces a very high-quality output.
- /default : This compression level is the default and produces a balance between file size and output quality.
- -dNOPAUSE : This option tells Ghostscript not to pause after processing each page. This is useful for batch processing.
- -dQUIET : This option tells Ghostscript to run silently without displaying any output.
- -dBATCH : This option tells Ghostscript to exit after processing the input file.
- -sOutputFile=output.pdf : This sets the name and location of the output file. Change output.pdf to the name and location you want to use.
- input.pdf : This is the name and location of the input file. Change input.pdf to the name and location of the PDF file you want to compress.
Using ghostscript in ObjectScript
In conclusion, Ghostscript serves as a potent tool to streamline PDF file sizes. Its ability to compress files while preserving content quality is undoubtedly advantageous. However, the decision to adopt Ghostscript should be made after considering its associated downsides. The learning curve, compatibility issues, performance considerations, and reliance on external software must all be weighed against the benefits.
Before implementing Ghostscript for PDF compression, it's recommended to conduct thorough testing on a variety of PDF files to gauge its effectiveness within the HealthShare ecosystem. Additionally, providing training or seeking assistance from individuals with expertise in Ghostscript can help alleviate the learning curve and ensure optimal utilization of the software.
- Download InterSystems IRIS
- Try InterSystems IRIS online
- Become a partner
- InterSystems IRIS on AWS
- InterSystems IRIS on Azure
- InterSystems IRIS on GCP
- IRIS Community Edition on Docker
Log in or sign up
Log in or create a new account to continue