Insert Png Into Pdfl

1 view
Skip to first unread message

Janet Denzel

unread,
May 23, 2024, 2:31:19 PM5/23/24
to tolertilo

As a separate page or in an existing page? If it's as a separate page open the pdf and image in Preview. Drag the thumbnila of the image from it's open window into the open window of the PDF. Have the Preview option activated in both windows.

Insert Png Into Pdfl


Download Zip ››››› https://t.co/2gjpVvxxMf



I have been using the 1 of the 2 copies of Adobe Acrobat Pro in our office for over a year because of the inability to "insert an image into a pdf in preview" ... I was at wit's end yesterday when I searched the Internet again and found your post at the bottom of a thread ... I did what you said, google FormulatePro and installation and figuring it out took under 5 minutes. No more need to be tied to a legal expensive Adobe Acrobat Professional or be forced to do what everyone else says about converting your PDF into an image. Everyone, listen to Skeptical Nerd.

I found this post because I had to get the same kind of task done. I found that Gimp was a nice solution: just open the two pdf files (or the pdf file and the image file) with it and you'll be able to copy/paste/move/scale (and so on...) any part of one of them into the other!

I just did it using a Thanksgiving turkey image as my signature for a Thanksgiving song I wrote - go to Fill and Sign - Place signature - Use Image - Browse - then bring up image you want to use -- should be a PDF also and after placing it you can size it and move it around before saving the doc. Hope this helps...

I have a scanned PDF file which is an application form, and a picture which is the scanned version of my signature (for example, this one) and can be in any image format such as EPS or PNG. I would like to put the signature picture on the blank space right to "APPLICANT:" on the second page of the application form. I wonder how to do that?

Also when I save the modification, the closest format to PDF I can save to is PS, and the resolution has been downgraded and the storage size of the saved file is 10 times bigger than the original application form and the signature picture.

Xournal's insert image is a great addition but not polished. As soon as you add the image make sure to resize it and move it to where you want. Resizing the image retains the proportions if you grab the image by the corner where a little arrow appears diagonal to the image rectangle. Once you are done, it is in its own layer, which you cannot change. If you don't like how it ends up delete that layer and start again.

Note: A downside to Xournal is the finished document looks like the fonts are converted to an image. Fonts are no longer as crisp. Still it looks better than if you printed and rescanned and is much faster. [Note: in my most recent experience it seems this problem has been solved. Maybe I just got lucky with the particular fonts used. Please leave a comment abt your experience and I'll update accordingly.] This issue seems to be fixed in Xournal++ version 1.0.20.Another caveat is that if your original PDF contains forms, these will be lost when saving it in Xournal. Keep a backup copy of the original. If you have forms in the PDF, fill them in first using a different app (Xournal++ doesn't support it), save it and then insert the image with Xournal++.

I have found a way to do this, but it involves converting your signature image to pdf and then merging that with the target application form and then outputting a new document; the signature is added at the end of the document. It is quite simple to do and may be the easiest way to do it. Imagemagick is the program to install (if necessary) and use its convert function in this manner: convert original.pdf signature.pdf final.pdf.

I think you were on the right track with GIMP. Why not capitalize on what you have done in GIMP and re-merge the PDF using something like PDF shuffler (has the capability to import postscript PS files).

Of all the methods for adding an image to a pdf document that I tried (and I tired a lot of them, including most of the rest of those mentioned on this page), the only one that consistently produced high-quality output is a method using LaTeX, which I describe below. You don't need to know anything about LaTeX beyond what I will say here. You don't even have to have a working LaTeX installation on your computer: you can use the completely free online LaTeX editor Overleaf.

This is a viable solution provided you are willing to get rid of all interactive features in your pdf document: fillable form fields, highlights, comments, links, bookmarks, etc. If your original pdf document already has some interactive content, you will first need to produce a 'plain' version of it, i.e. a version that doesn't have any interactive features.

You can produce a 'plain' pdf by e.g. printing your original pdf document to a new pdf file (see here). This way, whatever e.g. interactive forms you filled out will be present as regular text in the printed, 'plain' pdf. Now you will be able to use LaTeX to add a picture to this 'plain' pdf. The resulting pdf file (produced by LaTex) will also be 'plain'. (It might be possible to restore the interactive features using something called pax, see e.g. here, but I haven't tried it myself.)

Apart from the limitation of not being able to include interactive features in the output, this solution is potentially very powerful, allowing e.g. rescaling and rotating of images, and programmatic insertion of multiple images on multiple pages. (Though I will not provide details for the last one, I will give an indication of how it can be done).

The goal is to take a 'plain' ten-page pdf file, in our case one called 'sample_pdf_letter_format.pdf', and add a certain png image in the middle of page 5. That image will be this png of a 'blue globe', which has a transparent background:

I have enabled sharing for a 'project' on Overleaf. This project contains sample files on which I will explain what to do. You will be able to view and download all the files, and also to 'compile' any files whose names end with`.tex'.

In order to add your own images to your own pdf files, all you need to do is sign up for a free Overleaf account and upload all the relevant files to your project (including the relevant .tex file from my project). Alternatively, use a LaTeX installation on your own computer.

On the left you can see a bunch of files. One of them should be highlighted. Make sure that it is 'main_letter_format.tex' (click on it if it is not). Once that file is highlighted, its contents should appear in the middle part of the screen. On the right part of the screen, you should see a nicely formatted document with the title 'A sample pdf document'; if you do not, press the button 'Recompile' that's above this part of the screen. In the end, the page should look like the above screencap.

Our original pdf, to which the image is to be added, is 'sample_pdf_letter_format.pdf'. The image to be added is called 'blue_globe.png'. That's the 'blue globe' I showed above, with a transparent background.

Now let's look at the file 'main_letter_format.tex', which contains the actual LaTeX code that accomplishes the addition of the image to the pdf document. (For completeness, I have also reproduced the content of that file here; see below.)

If you remove the initial '%' and recompile, you will see grid lines on page 5. (To be able to actually remove the initial '%', you need to be logged into your own Overleaf account and do it in your own copy of this file.) Such grid lines may be helpful to position the image on the page. This is what they look like:

At present, the spacing of the grid lines is in units of 'bp', which are PostScript points (1/72 of an inch). I have also produced (see below for an explanation of how) grid line files with spacing in inches ('gridlines_letter_in.png') and millimeters ('gridlines_letter_mm.png'). For A4 format, I produced grid line files with spacings in bp and in millimeters. If you prefer some of these other grid lines, just substitute their respective file names in line 20. But make sure to again comment out line 20 (and recompile) before you download the final document, so that the grid lines do not appear in it.

If you look at the screenshot with grid lines (above), you will see that the png containing the 'blue globe' is 72 bp ( = 1 in) wide, extending from 300 bp to 372 bp. The width is specified in width=1in in line 23, and the height is scaled so that the aspect ratio is the same as in the original image. Alternatively, you could provide the height (height=1in), and then the width will be scaled. You can also provide both width and height (generally, this will distort the image, but sometimes that is useful). Another way to resize the image is by using the command 'scale='; for example, 'scale=0.1' makes the image size 10% of its original size. Finally, one can rotate the image by specifying angle in degrees (the rotation is about the center of the image). For even more details, see here.

The default reference point is the upper-left corner. The two numbers in brackets specify by how much, in units of width and height of the image, you want to displace the reference point. So [0.2,0.7] would mean that the reference point is 20% of the image width to the right, and 70% of the image height below, the upper-left corner.

Therefore, -15pt+300bp,11in-500bp means that the reference point of the image (which we have set to be its lower-left corner) is 300 bp to the right from the left edge of the page, and 500 bp above the lower edge of the page (as you can verify on the screenshot with grid lines).

If you want to include more than one image on page 5, for each extra image you would need to add, starting in line 25, another block like that in lines 22-24 (one block for each extra image). Of course, instead of \imagename you'd use the names of the other images, instead of 300bp and 500bp you'd use the appropriate coordinates for the new images, and instead of 'width=1in' and 'angle=0' you'd use the widths and angles appropriate for those images.

7025e2c3df
Reply all
Reply to author
Forward
0 new messages