gotcha

Author Topic: Beginner with disappearing images  (Read 3443 times)

September 04, 2017, 01:21:46 PM
Read 3443 times

Kullervo

  • Sr. Newbie

  • Offline
  • **

  • 5
Hello,

First of all thank you for the great program! I'm using it to convert downloaded svg to pdf files which it does nicely except on a few dosen images.

The problem is always the images on the svg files. They show up real nice on the Inkscape editor but after I convert the image to pdf (save as pdf) the resulting file is missing the image (or images).

As I'm a total newbie on the svg file format I really don't know what is wrong. I'm currently saving these problem images as png (and converting again to pdf) as those seem to work OK! The problem is of course the lack of vector graphic on the resulting pdf. Also the size of the pdf tends to grow.

Could some one give me instruction on how to fix the svg so the image would show up on the pdf? There is a sample included that has this problem.


Thank you!
  • Inkscape version 0.92.2
  • Windows 10 x64 Home

September 05, 2017, 01:09:30 PM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Select the image (background with pattern) with the node tool or with Select tool while pressing Ctrl. Do Object -> Pattern -> Pattern to Object.

This is just a workaround - it should be working right without doing this, too.
Can you make a bug report at https://bugs.launchpad.net/inkscape, where you attach the svg and pdf file, and mention your Inkscape version and operating system?

September 05, 2017, 03:21:26 PM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

I can't figure out what's wrong either.  From where did you download the file?  Do you have any info about who made the SVG file, or how?

In case it's your first time reporting a bug, here are some guidelines:  https://inkscape.org/en/contribute/report-bugs/.  It's not quite as simple as just reporting it.  As a bug reporter you do have a responsibility to answer, if any developers ask you for additional information.  If you don't want to get involved in reporting a bug, I'll be glad to do it for you.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 05, 2017, 07:00:29 PM
Reply #3

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
I think in a case like this, beyond the actual files, operating system and Inkscape version, developers won't need a lot more info to be able to find a way how to fix. It's only when it's difficult to reproduce, or when a new feature is requested, that there's a lot to ask back and forth.

September 06, 2017, 07:08:49 AM
Reply #4

Kullervo

  • Sr. Newbie

  • Offline
  • **

  • 5
Welcome to the forum!

I can't figure out what's wrong either.  From where did you download the file?  Do you have any info about who made the SVG file, or how?

In case it's your first time reporting a bug, here are some guidelines:  https://inkscape.org/en/contribute/report-bugs/.  It's not quite as simple as just reporting it.  As a bug reporter you do have a responsibility to answer, if any developers ask you for additional information.  If you don't want to get involved in reporting a bug, I'll be glad to do it for you.

Hi,

The source is a Finnish digi producer Sanoma and their digi service SanomaPro. There are also pdf documents which I believe are created from these svg files. Pdf reader says the pdf creator is Adobe InDesign CC 2017 (Macintosh), Adobe PDF library 15.0. Those pdf books 'seem to be' ok.

I will make the bug report right now...
  • Inkscape version 0.92.2
  • Windows 10 x64 Home

September 06, 2017, 08:19:15 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 07, 2017, 08:20:40 AM
Reply #6

Kullervo

  • Sr. Newbie

  • Offline
  • **

  • 5
Select the image (background with pattern) with the node tool or with Select tool while pressing Ctrl. Do Object -> Pattern -> Pattern to Object.

This is just a workaround - it should be working right without doing this, too.
Can you make a bug report at https://bugs.launchpad.net/inkscape, where you attach the svg and pdf file, and mention your Inkscape version and operating system?

You wouldn't have any way of doing this by script / programmatically? Because I have dozens or hundreds of these kind of images, I really cannot do it manually. Second question: is there a way of checking this problem from svg file? Or is there a way I could do 'some' procedure to all of the svg files (bad and good ones) by a script so they would all show up ok at pdf?

An other problematic svg attached. This time the green sidebar and images vanish when saving to pdf...
  • Inkscape version 0.92.2
  • Windows 10 x64 Home

September 07, 2017, 08:09:57 PM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Fyi, the bug report for anyone wanting to follow it:  https://bugs.launchpad.net/inkscape/+bug/1715408

This 2nd file looks like a slightly different situation.  It might be helpful to include it in the bug report too.  Also, if you could include the PDF files too?  You could wrap them up in a zip file.

But it's basically the same -- a clone without parent, masked and clipped.  It's just there are 2 (the green strip and the photos).

The green strip is created with 2 (page size) rectangles, each with orphaned clones converted to patterns, clipped and/or masked.  The weird thing with the green strip is that the patterns and clipping would not really be needed.  The green rectangle which is the original object for one of the patterns is essentially the same thing as the end result, after clipping.

I guess some of that could be a result of other file conversions, before you found it.  It's really hard to say, but at this point, it seems like a lot of unnecessary work.  So rather than think the original creator performed unnecessary work, it's more likely that a file conversion somewhere, changed what kind of objects are involved.  So that it only appears there was extra work, when really there wasn't.  (I'm thinking maybe the patterns were created somewhere along the way....maybe clones, but I'm just guessing.)

I'm afraid I can't be much help regarding "procedures".  Inkscape can use the command line, but I don't know exactly what's possible.  Here's the reference:  https://inkscape.org/en/doc/inkscape-man.html 

And I know I've heard where people use scripts to work on batches of SVG files.  But I don't know how to write any kind of scripts myself. 
Moini might be able to give you more detailed info about the possibility of using a script.

This is a long shot.  There's a graphics viewer/editor called Irfanview, which is known for its ability to handle a wide variety of formats, as well as work on batches of files.  It's around 10 years ago I heard that, so that's why I say a long shot.  However, it seems to be still available and supported.  And it does have SVG support, via plugin iirc.  Perhaps it does not suffer the same bug as Inkscape appears to have?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 07, 2017, 08:26:38 PM
Reply #8

Kullervo

  • Sr. Newbie

  • Offline
  • **

  • 5
Morning from Finland,

I'll try to make the bug report better with a bunch of svg and pdf files in a zip.

Yesterday evening I think I figured a way out of this. It seems Windows Internet Explorer prints svg files really nice to pdfs on both Adobe Acrobat and Foxit Pdf Creator. So the magic must be in the Windows Internet Explorer. I then tried right button over svg file --> Print and the result was exactly the same. Then it was a light bulb moment. I, as a .Net programmer, could do a Windows program to print those svg files to pdf printer throuh Windows own API. It might even work after I check each page size and adjust printer according to it.  :@@:

If this is a no go, I'll check the IrfanView... Thanks!
  • Inkscape version 0.92.2
  • Windows 10 x64 Home

September 07, 2017, 09:03:53 PM
Reply #9

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 08, 2017, 08:53:54 AM
Reply #10

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
For scripting this with Inkscape, you'd at least need to know the affected object's ids or to take a deeper look into the guts of SVG to be able to select the correct objects. It's probably possible to automate, but it might take some time and some XML foo.

September 09, 2017, 10:20:42 AM
Reply #11

Kullervo

  • Sr. Newbie

  • Offline
  • **

  • 5
Hi,

It seems IE, Adobe Acrobat is now working and printing through .Net interface is a success. Or, well, at least I can print the svg files to pdf with all the images included. There seems to be some issues thought. Like pages with some 'special' graphics seem to transform the whole page to traditional graphics (no vector graphics on the entire page although the text should be such). But this seems to be the best solution so far until the Inkscape bug is fixed.
  • Inkscape version 0.92.2
  • Windows 10 x64 Home