Trying to load a pdf file ofline "inkscape" does not detect it. The same code, but the png version of the same file works. When I try to load the same files in the user interface they also load without problems.

Bug #1801000 reported by Plamen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Trying to load a pdf file offline, via appropriate svg file, "inkscape" does not detect it. The same code, but the png version of the same file works. When I try to load the same files in the user interface they also load without problems.

Revision history for this message
Plamen (plamen-neytchev-e) wrote :
Revision history for this message
Plamen (plamen-neytchev-e) wrote :
Revision history for this message
Plamen (plamen-neytchev-e) wrote :
Revision history for this message
Plamen (plamen-neytchev-e) wrote :
Revision history for this message
Plamen (plamen-neytchev-e) wrote :

I send a script and two files.
png file is a copy of pdf one which I prepared by the same inkscape in batch mode.

Revision history for this message
Alvin Penner (apenner) wrote :

- not reproduced on Windows 10, Inkscape 0.92.3 (2405546, 2018-03-11)
- using the command line:
inkscape \windows\temp\drawing.svg --export-pdf=\windows\temp\testex1.pdf >pdf.log 2>&1

could you attach the file Example.pdf.svg?

Revision history for this message
Plamen (plamen-neytchev) wrote : Re: [Bug 1801000] Re: Trying to load a pdf file ofline "inkscape" does not detect it. The same code, but the png version of the same file works. When I try to load the same files in the user interface they also load without problems.

Hello,

Please excuse me for the poorly prepared bug report [Bug 1801000]. My
omission can be corrected with the attachments. If this is not the way
to fix it, please instruct me how to get back to my original bug report.

I use the case to to congratulate you for the extremely useful package
that, together with the R packages, have been my main tool in the last
years.

Sincerely,

Plamen Neytchev

On 1.11.2018 г. 12:26, Alvin Penner wrote:
> - not reproduced on Windows 10, Inkscape 0.92.3 (2405546, 2018-03-11)
> - using the command line:
> inkscape \windows\temp\drawing.svg --export-pdf=\windows\temp\testex1.pdf >pdf.log 2>&1
>
> could you attach the file Example.pdf.svg?
>

Revision history for this message
Alvin Penner (apenner) wrote :

thank you for the support files:

well, this is confusing:
1. on the one hand, I can see that there is a difference between Example.png.svg and Example.pdf.svg.
The file Example.png.svg loads correctly into Inkscape, assuming that the file
10150698.png is present.
The file Example.pdf.svg does not load correctly into Inkscape, even if the file
10150698.pdf is present.
So there is a difference between these two files.

2. But, what is the purpose of the shell script? Why are you executing it?
The svg files you have here are essentially empty files. All they contain is a single link to a pdf file or a png file. The shell script, on the other hand, is attempting to convert an svg file to a pdf file or a png file. But these files already exist, so if they already exist what is the purpose of running a shell script to re-create them all over again? Am I missing something here?

Revision history for this message
Plamen (plamen-neytchev-e) wrote :

Tank you for quick answer,

The Example.png.svg and Example.pdf.svg files are just examples that I
want to demonstrate the problem and they are derived from the real ones
I've been working with for years. The main purpose is to prepare real
weather maps in order to change our technology: from a wide-format laser
printer to an interactive table (board) that the synoptic can use in the
forecast. For this we need a standard geographic map as background and a
map of the atmospheric processes as a second layer. This second layer
must be in svg format. Currently I can prepare such files in eps and pdf
format. Affiliation of such a file with a suitable background could be
done with the help of inkscape perfectly. This is my problem at the moment.
I know how to prepare such maps but only manually with Inkskape user
interface  which is inappropriate. It should be done 8 times a day, all
year round in exact time. I am currently considering how to overcome
this problem by combining parts of ready-made svg files and have made
some progress but this is not the right path.

The attached Noth.svg is example of this. It is not perfect, but it
shows what the goal is. I did it with Inkscape.

Sincerely,

Plamen Neytchev

On 2.11.2018 г. 21:08, Alvin Penner wrote:
> thank you for the support files:
>
> well, this is confusing:
> 1. on the one hand, I can see that there is a difference between Example.png.svg and Example.pdf.svg.
> The file Example.png.svg loads correctly into Inkscape, assuming that the file
> 10150698.png is present.
> The file Example.pdf.svg does not load correctly into Inkscape, even if the file
> 10150698.pdf is present.
> So there is a difference between these two files.
>
> 2. But, what is the purpose of the shell script? Why are you executing it?
> The svg files you have here are essentially empty files. All they contain is a single link to a pdf file or a png file. The shell script, on the other hand, is attempting to convert an svg file to a pdf file or a png file. But these files already exist, so if they already exist what is the purpose of running a shell script to re-create them all over again? Am I missing something here?
>

Revision history for this message
Patrick Storz (ede123) wrote :

I'm not sure I fully understand the issue but it seems to break down into the fact you're trying to embed a PDF file into an SVG file?

If so, that's not supported. SVG allows to either embed raster formats (although renderers are only required to support PNG and JPG) or other SVGs.

Therefore, if you need to embed a vector image into another SVG you need to convert the vector image to SVG first (you can obviously use Inkscape for that).

Revision history for this message
Plamen (plamen-neytchev-e) wrote :

Thanks again for the quick answer,

I think there is some misunderstanding again. Now I attach the North.svg
file I made through the inkscape user interface with a png file as
"background" layer and a pdf file as "atmospheric field" layer. Now, It
is easy to produce everything I need.

I can formulate my problem clearly: why can I produce such file through
the user interface but I can not automate it as I did it for many times
but not using pdf file. This is very important for me. (Important to use
vector file)

Plamen

On 3.11.2018 г. 12:32, Patrick Storz wrote:
> I'm not sure I fully understand the issue but it seems to break down
> into the fact you're trying to embed a PDF file into an SVG file?
>
> If so, that's not supported. SVG allows to either embed raster formats
> (although renderers are only required to support PNG and JPG) or other
> SVGs.
>
> Therefore, if you need to embed a vector image into another SVG you need
> to convert the vector image to SVG first (you can obviously use Inkscape
> for that).
>

Revision history for this message
Patrick Storz (ede123) wrote :

I think there's a fundamental misunderstanding on how Inkscape works on your side:
- If you drag&drop a .pdf file into an opened Inkscape instance,
  then the PDF is *imported*, that means converted from PDF to SVG
  on-the-fly and the resulting SVG code is added to the opened document
- There is *no* embedded PDF file in the file "North.svg"
- If you manually create a line like
    <image xlink:href="file.pdf"/>
  in an SVG file it is *invalid* and Inkscape won't be able to open it

Revision history for this message
grey tomorrow (gtomorrow) wrote :

Closing because "works as expected". Request is beyond the scope of the project.

If you feel this issue has been injustly closed, please feel free to open a new issue at http://inkscape.org/report . Thank you.

Closed by: https://gitlab.com/greytomorrow

tags: added: bug-migration
Changed in inkscape:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.