Low resolution when import pdf to writer

Hello
I tried to copy and paste a pdf file to writer, but the resolution got very bad.
I found another topic discussing this but there wasn’t clearer steps.
It is likely the environmental variable : PDFIMPORT_RESOLUTION_DPI
But I have not idea how to set this properly.
I am using LibreOffice 7.3.7.2 30 on Ubuntu 22.04. Please help!
Thanks

As PDF-Files are everything but unique: Please post a sample file and tell how you copy. Open pdf in draw or a pdf-viewer? wich pdf-viewer? copy part via clipboard ??
.
Is this the same for all pdf-files, or only one? Does the pdf-viewer show a better resolution than writer ?

Hello
I just dragged the pdf to writer. I also tried import image on writer.
It is blurry.

Whereas the original file looks crisp via Evince.
D_NaNO3.pdf (14.8 KB)

I tried other pdf files and they all have the same issue.
Hope that helps
Thanks
Dima

What specifically do you mean by that? Do you see rasterization artifacts on screen?
When inserted into a Writer document, the PDF is displayed using a rasterized substitution image; but the original PDF is used internally; so e.g. when you print, or export to PDFs, you would get the original quality.

Or maybe you use some non-native file format, like DOC(X)? There we could have issues, because those formats do not support PDF embeddings (or we can still not support them in export filters), and thus, rasterized substitution could replace the original. Then - use ODT format as the preferable solution (if possible, of course).

2 Likes

This is the experience I have. And it is the same in Scribus. I usually replace high-resolution pictures with 300 dpi versions taylored to the printed size, before giving them to professional print services. The usual effect is a blurry image on screen, but fine resolution in pdf. So this did not bother me, as the blurry effect was only at the placeholder…

Interesting. I didn’t know the rasterization artifact and just I tried exporting the image to a pdf. It looked vectorized!
It does look blurry on .docx files and export also blurry. From my own experiences, .docx support PDF embedding, but maybe I’ll use .svg instead for better compatibility.
Thanks for the note!

I tried with Word 2016. Trying to drag a PDF onto a Word document gives an object icon. Trying to use picture insertion gives a “unsupported format” box. This advise suggests to use OLE object; and that indeed works; but that’s completely different to the native format support, like Word has for e.g. PNG images (and like Writer has for PDFs).

Of course, it could change in newer Word versions.

I just found a solution. Not very pretty yet, but it worked.
It is indeed the environmental variable : PDFIMPORT_RESOLUTION_DPI
According to the official documents:
https://wiki.documentfoundation.org/Development/Environment_variables
It can be set to appropriate resolution.
Step:
Open terminal → type this command.

PDFIMPORT_RESOLUTION_DPI=900 /usr/bin/soffice

It will open the main libreoffice, and you can drag pdf file to writer with the chosen DPI, in this case 900.

There is more elegant way to change environmental variables persistently. If you are interested you can look it up!

Wow! 900dpi = 27 megapixels compared to 3 megapixels for 300dpi (which still exceeds the capabilities of the average printer).

In this particular instance, as the pdf is a vector, you could open it in Draw and paste from there into Writer at the original 15kb or thereabouts and keep the vectors. The only issue is if resizing it smaller, the text boxes will start wrapping the text or overlapping, this can be ameliorated by extending the text boxes in Draw before copying

I live on windows and have the same PDF resolution problem, but for impress. I tried set PDFIMPORT_RESOLUTION_DPI=900 /soffice.exe in the folder where LO is installed, but the PDFs are still blurry if i import them. My current workaround is to literally use MS snipping tool to get higher res variants of the PDFs.

Have you tried export as PDF of the file with your “blurry pdf” embedded? I’ve noticed sometimes, even if the image looks blurry, the exported PDF file looks fine.

yes in an export it doesn’t look blurry.
This doesn’t help me though, because I want to use impress for presentation and in presentation mode it’s blurry as well.

If possible, using svg instead of pdf might be an easy fix. I’ve had a lot of trouble with using pdf as the image format since I got out of macOS.

Have you tried the suggestion by @EarnestAl above to import via Draw?
.
And you might consider to file a bug-report at bugzilla, as the “blurry” preview should not be used in presentation mode then, if you compare to the behaviour described for Writer:

Well, importing via draw kinda works, but if i copy paste it it pastes single objects for every object in the PDF which makes resizing in Impress nigh impossible.
Edit: Maybe i’m also just too incompetent to correctly copy paste it

In that case you should group the items before copying and pasting.
Drag select around the objects or Shift-click individual items then click Shape > Group > Group (Ctrl+Shift+G), copy and then paste into Impress.

Or if you forgot then in Impress select the objects and click Format > Group >Group (Ctrl+Shift+G) to group them

1 Like