Change background color of pdf [closed]

青春壹個敷衍的年華 提交于 2019-11-29 16:43:59

You could probably easily change it with a PDF Editor. There are a few open source ones out there, check out this page http://www.cogniview.com/convert-pdf-to-excel/post/pdf-editing-creation-50-open-sourcefree-alternatives-to-adobe-acrobat/

vector background color (different from scanned image background color that is raster) in pdf is determined by this snippet of code inside a pdf, placed between

stream

and

endstream

tags

/GS1 gs    
1.000 1.000 1.000 rg    
0.00 841.00 m    
595.25 841.00 l    
595.25 -0.85 l    
0.00 -0.85 l    
0.00 841.00 l    
h    
f

in context inside a pdf:

stream    
/GS1 gs    
1.000 1.000 1.000 rg    
0.00 841.00 m    
595.25 841.00 l    
595.25 -0.85 l    
0.00 -0.85 l    
0.00 841.00 l    
h    
f    
endstream

1.000 1.000 1.000 means = white

1.000 0.000 0.000 means = red

1.000 0.749 0.792 means pink and so on...

see these three pdf: (red, pink and white)

http://ge.tt/9ZavuZI

you can obtain these values directly from sodipodi color selector or, if you have a graphic software that indicates RGB color values from 0 to 255 you simply apply the proportion

1:255=x:color you selected

for instance: let say you have this RGB triplet: 30,144,255

to know correspondent values in order to insert in code snippet to change pdf background color, you do:

1:255=x:30 = 30/255 = 0.117 (approximated to first three decimals)

1:255=x:144 = 144/255 = 0.564 (approximated to first three decimals)

1:255=x:255 = 255/255 = 1

so you insert, in pdf source code, between stream and endstream tags:

stream    
/GS1 gs    
0.117 0.564 1.000 rg    
0.00 841.00 m    
595.25 841.00 l    
595.25 -0.85 l    
0.00 -0.85 l    
0.00 841.00 l    
h    
f    
endstream

The problem is that on scanned documents, you cannot use the things shown in the previous answers. Try pdftocolor, a PDF color conversion tool 100%free:

http://www.pdftocolor.com

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!