Thursday, January 26, 2012

How to solve problem with invisible hatching area fill pattern when exporting from LibreOffice Draw/Writer to PDF

Update: 23 Rejab 1433H / 13th June 2012M, Ra.

Thank you to Dmitriy.Trt for the notice about LibreOffice 3.5.

Previously i did not note the LibreOffice version when i encountered the invisible-hatching problem. Just to note before i go running for LibreOffice 3.5:
the invisible-hatching problem persists in Libre Office 3.4.4.

Note to those running LibreOffice 3.4.4 *like me*:
LibreOffice <= 3.4.4 can not be updated to 3.5.x directly; first, it must be updated to 3.4.5 or uninstalled (fdo#45068)

So it's either:
(a) update LibreOffice 3.4.4. to LibreOffice 3.4.5 or
(b) uninstall LibreOffice 3.4.4 then install LibreOffice 3.5.

=======

2 Rabiulawal 1433H.

Assalamualaikum. Here i am trying to export a drawing created in LibreOffice Draw as a PDF. The PDF file will be used later in my LaTeX document to display pictures nicely.

However, the PDF file of the exported document is missing hatchings at the moment. At first, only one of the many polygons has hatching while the rest appear as polygons filled with nothing but the color white. The hatchings are present in Draw (see Pic 1) but absent in the PDF file (see Pic 2).

Pic 1 - Screenshot of my LibreOffice Draw document with the 'problematic' polygons.


Pic 2 - Screenshot of PDF document at 100% zoom. Notice that the hatching is missing for the "Planar surface" polygon.


I've also tried copying the drawing in Draw, paste it in Writer, then export the document as PDF. Still the hatchings are present in Writer but absent again in the PDF file.

Alhamdulillah, and then a solution. This post is the result of random tries by changing the hatching line color along with the background color, and inspiration from this bug report:
[Libreoffice-bugs] [Bug 34272] New: Hatching area fill pattern does not export to pdf.

Actually, i don't know if this post is a solution for the vanishing-hatching bug, or just a guide on how things work in LibreOffice. Either way, it works in Draw and Writer.


1. Open the LibreOffice Draw document. Screenshot of my Draw document is shown in Pic 1.


2. Right-click on the 'problematic' polygon.

In the right-click menu, click Area.... See Pic 3.

The Area window as shown in Pic 4 will appear.

Pic 3 - Refer Step 2. Highlighting Area... in the right-click menu of the 'problematic' polygon.


Pic 4 - Refer Step 2. The Area window of the 'problematic' polygon.


3. In the Area window, under the Area tab; put a tick in the box beside the Background color.

Then in the drop-down menu below the box, change the color from the default Blue 9 to White.

Then click the OK button. Refer Pic 5.

Pic 5 - Refer Step 3. Activating and changing the Background color.


4. Export again the Draw document as PDF.


5. Open the PDF file to check and see whether the hatchings appear. Insya-Allah, the hatchings will appear this time.



My final drawing looks as shown in Pic 6. If you haven't notice the difference between Pic 1 and Pic 6, the outline for the "Planar surface" polygon is gone in Pic 6.

A screenshot of the PDF document in Pic 6 is shown in Pic 7.

Pic 6 - Screenshot of my LibreOffice Draw document the way i want it to be.


Pic 7 - Screenshot of PDF document at 100% zoom. The PDF of the Draw document in Pic 6. The PDF file will be used later in LaTeX.

6 comments:

  1. Great howto, worked 100% for me with the same issue in Libreoffice 3.4.5 and invisible hatchings in all pdf readers after export.

    ReplyDelete
  2. Alhamdulillah. Good to know your issue is solved :). Thank you for your feedback :)

    ReplyDelete
  3. Good work, very nice!

    ReplyDelete