Change the color of the text and background of a PDF file. How to change PDF file without special program Insert background image into pdf file

Edit PDFs online
free anywhere

How to edit a PDF file

Drag the file to the box above to upload. You can also upload a document from your computer or from the cloud.

This is how the versatile PDF editor works. On the left, you see page thumbnails. Select the one you want to edit. Above the page in preview mode, you need to select the desired action. Additional actions are also available there (cancel, revert change, increase). To change the color or font, open the Options menu.

Edit PDF documents online

You don't need to download or install anything to edit an Adobe PDF file. Just use the online studio PDF2Go - it's free!

Forget about malware and viruses, don't clog your hard drive. Edit your PDF document online and download the finished file!

Why do you need a PDF editor?

Want to annotate your PDF? Highlight the most important part or main paragraphs? Probably have to print the file ...

But no! Thanks to PDF2Go, you can draw on a PDF file, add images and watermarks, and crop and copy parts of the document.

Edit with us - it's safe

Don't worry about security! All files uploaded to PDF2Go are processed automatically. Only you have access to the contents of the file.

All ownership of the PDF file remains with you.

If you have any questions, please read the Privacy Policy.

Can a PDF file be edited?

Of course! PDF2Go allows you to edit any PDF files - with tables, images, text.

The documents:

Edit PDFs wherever you want

You don't need a computer to edit PDF documents. The name PDF2Go speaks for itself. All you need is a reliable network connection.

PDF2Go works on smartphones, tablets, computers and laptops with browsers like Chrome, Opera, Safari, Firefox and more!

2

There is no way to do this directly without using free software or a free tool that I know of. (Because in general, you will have to change all colors in PDF pages, not just the background alone, so you may have some contrast and color differences.)

What you described for Adobe Reader does not change the PDF file itself, it changes the way the pages are displayed (by inverting colors or similar). The PDF remains unchanged during and after viewing.

but maybe be able to achieve the same by applying a suitable ICC color profile for PDF input and producing with (very late version) Ghostscript, a new PDF output from this,

the question remains: what IS "Suitable" ICC color Profile for your purpose ??

I briefly covered applying a gray-ish background to a PDF using the pdftk ... background ... command line. But this will probably make some or many of the PDFs unreadable. (A black the background will definitely make it unreadable because most of the text is black and will stay that way.)

To create a PDF page (A4 format) that can serve as a gray background, you can use Ghostscript: gs -o gray.pdf -sDEVICE = pdfwrite -g5950x8420 -c ".8 setgray 0 0 595 842 rectfill showpage".

Then apply it to the original PDF (A4): pdftk original.pdf background gray.pdf output orig-with-backgr.pdf.

Note that this will only change the background of these pages (or those portions of the pages) where the original background is transparent, like most text based PDFs are. This will not work for pages or areas where the background is opaque white or colored.)

You can also achieve permanent color change (inverse colors) quite easily with ImageMagick, but this will chew and mince your nice vector PDFs at the same time, converting them to full bitmap pages: convert nice.pdf -alpha off -invert inverted-colors-ugly-raster.pdf.

Finally, here's a rather unreliable way to perform color inversion with Ghostscript. He sets colortransfer function for output PDF file:

Gs -o output.pdf \ -sDEVICE = pdfwrite \ -c "(1 exch sub) (1 exch sub) (1 exch sub) (1 exch sub) setcolortransfer" \ -f input.pdf

This is unreliable because not every PDF viewer will honor that installing... I have checked this several times in the past ...

These viewers DO NOT SHOW inverted colors:

  1. Adobe reader
  2. Adobe acrobat
  3. Ghostscript / gs
  4. Chrome's built-in PDF renderer ( "pdfium")

These those DO NOT SHOW inverted colors:

  1. Chrome with pdf.js
  2. Firefox with pdf.js
  3. Zathura
  4. MuPDF

0

In addition to your answer, maybe there are tools like PitStop or pdfToolbox (warning - affiliation) that can apply such a wrapping curve as soon as it is (in other words, calculate new colors taking into account the wrapping curve). This would make it permanent and therefore accessible to all viewers :) - David van Driessche Apr 29. 15 2015-04-29 22:20:55

0

@DavidvanDriessche: Thanks David, of course I * meant I didn't know about any "Free" (as in freedom) or "free" (as in free form), I know ... I completely forgot to mention commercial utilities though intended when I wrote my answer. - Kurt pfeifle Apr 29. 15 2015-04-29 22:29:25

3

Just in case the OP doesn't really the need to change the color of the PDF document constantly but only wants a PDF viewer other than Acrobat, which can do the same to change the displayed colors ...

MuPDF: MuPDF is a lightweight PDF viewer (among others). It can invert the displayed colors with a simple i move for any document while it is open. MuPDF is also available for Windows (both iOS and Android and OSX and Linux). (This is done by the same company that brought us Ghostscript.)

MuPDF screenshots here: "normal" view (left) and "inverted" view (right)

SumatraPDF: It is a very popular PDF viewing alternative for Windows. Its PDF rendering engine is based on MuPDF. Hit. in presentation mode, it changes the background to black. Pressing w in presentation mode, it changes the background to white. (I don't think he can also invert all colors, but I don't have the latest version available right now to check.) To run by adding -invert-colors to the command line, it inverts the colors for the rendered document.

Zathura: A lightweight PDF viewer for Linux and OSX that can be controlled with Vim keyboard shortcuts. ctrl + r will recolor the rendering of any open document. The background will change to dark, the texts will change to bright gray (however, it will not invert a, for example blue text to yellow like MuPDF does). I'm not sure if it's available on Windows as well.

Evince: Gnome PDF viewer is available for Linux, OSX and Windows. It can also invert the colors of an open document; key combination: ctrl + i.

XPDF: XPDF is a fairly ancient PDF viewer for Unix + Linux (not sure if there is a Windows version, probably in Cygwin). It has a run option on the command line: xpdf -rv -papercolor "# 333333" file.pdf inverts colors (-rv for reverse video, -papercolor allows you to change the background to something other than pure black [as any inverted white will become]).

2

As you asked for the API, I'll add another feature to the mix. It is actually possible to write a plugin for Adobe Acrobat (maybe for Adobe Reader too, but Reader plugins are more complex) that interferes with display.

A long time ago I wrote code for Enfocus PitStop to implement wireframe rendering mode for PDFs inside Adobe Acrobat. Press the button and the display changes to a wireframe, press again and you have a normal view. This works because you can (as a plugin) modify the display list (list of objects) drawn with Acrobat.

This means that for drawing your special display mode, you can create a new display list (or modify the existing one) so that it has a rectangle at the very back of the color you want, then change the color of all objects in the display list according to your needs. ...

This is relatively difficult as it makes it more complex: if you don't want your changes to affect the PDF file on disk, you have to intercept many Acrobat notifications and discard your changes. For example, if a user tries to save a PDF while viewing it in your display mode, you should make sure that you are warned about this and discard the changes during save. Adobe Acrobat makes this possible because it sends you notifications before and after the save process, but it's still serious work to make sure nothing gets screwed.

But this is an absolutely healthy and very flexible way to implement what came after. Just make sure you have more than a couple of weeks to implement it :)

A wonderful and fast way modify PDF file- this is with the help of detailed instructions to use a free and accessible online service. The big plus is that you don't have to buy or install paid editor software for Windows or Mac OsX and convert to other formats.

The process is very simple: upload your PDF and make the necessary edits in the browser, then simply download the modified document back to your computer.

The tool will help you remove extra text from document, overlay a watermark, add inscriptions and pictures. Despite the fact that the service is in English, you will understand it easily, and our instructions will help you edit the pdf file without difficulty.

  1. Go to the software service. And upload your document to it using the big button on the main page "Edit Your PDF Now" and choosing "Add PDF" from the menu: your file will be successfully uploaded if it does not weigh more than 10 MB and contains less than 100 pages. If the size does not meet these conditions, use PDF and edit parts, then join.
  2. To change the PDF document, namely, delete part of the text in it, select "Whiteout" and stretch the rectangular area that you want to paint over in the document, and if it didn't work, press the DEL button above the sheet:
  3. To change the PDF document, namely, add new text to it, select the "Text" button and drag the area with the mouse to the place where you want to type the necessary words or sentences. To change the size and color of the font, use the menu at the top:
  4. Now I'll tell you how. You will need a translucent image or an inscription in the form of a picture on a transparent background with the PNG extension (how easy it is to make one). So, the "Image" button will help you add an image to the document. Load the image, and then left-click on the document:
  5. Having dealt with the tools described in the previous paragraphs, you can also add a link to the site or to any page in the PDF of this document. Do it as follows - first select the "Link" button in the menu, select an area on the page to attach a link and in the window that appears, select either the URL (for linking to the site) or Page for linking to another page of the PDF document (choose the page number accordingly) :
  6. To save and download the finished file, find the vertically arranged icons on the right, you need a green one with arrows. Have you downloaded it? Congratulations!

How do I get rid of the gray background?

The master's answer:

Often, when you scan a particular document, the background of the image is grayed out. Recognizing and working with documents in general becomes more difficult. There are several techniques for cleaning such documents in pdf and djvu formats.

Required: ScanCromsator program.

ScanCrosser is used to remove the gray background from the received scans. You can download this program on the official website of the program developers at djvu-soft.narod.ru/soft/#scan. Select the appropriate version of the app. Click on the Download link.

Install the application on your computer. To remove gray background from pdf and djvu file, open it in ScanCromsator. Go to the application settings, check the box for the Enhance image option, click on the "Gray enhance" button, instead of which you can also use the B hotkey.

In the Background cleaner tab, set the background cleaning settings. To do this, set the Cleaner passes parameter to one. This will remove the background of the scan. If there is very little contrast between the color of the text and the photo in the document, then the checkbox should be set next to the Correct low contrast parameter, which will adjust the sensitivity of recognition of text information on a gray background.

Start with a value of 20-25, gradually decreasing it by 5. After removing the background of the scanned image by the ScanCorder, it will also check the file for the presence of text, the contrast of which relative to the background color is equal to the specified sensitivity threshold or more. And if the specified value is found, then the color of such a point will either not be changed at all, or will be replaced with pure black.

Then go to the Quality tab. Click on the "Enhance" button and set the Cleaner passes parameter to one. Uncheck the Protect black pixels option. Place the gray-filled illustrations in the scan in the Exclude zone to protect them from damage.

Use the preview of the results of cleaning the gray background using the "Preview with resample" button in the Quality tab. Select the desired Sensitivity value (from 5 to 30) to remove the gray background. The stronger the contrast between the background and the text, the higher the value of this parameter, set. Now go to the Protect black window, disable it.