Hi Hans, Two bugs in figure export: 1. If one uses images without extension, then the generated \jobname-images.css file does not contain any extensions; so no figures are shown in the output. One possible fix is to change \dotagfigure in back-ini.mkiv to \appendtoks % we can have differently scaled images \def\dotagfigure{\taggedctxcommand{settagfigure(,"\figurefullname","\figurefilepage",\number\dimexpr\figurewidth,\number\dimexpr\figureheight)}}% \to \everyenableelements % \figurefullname instead of \figurefileoriginal 2. What is the best way to handle multipage pdf images? I frequently create a big pdf with many images and then use \externalfigure[...][page=2] I don't know if svg has support for multiple pages or not. Aditya~
On 26-8-2011 08:16, Aditya Mahajan wrote:
Hi Hans,
Two bugs in figure export:
1. If one uses images without extension, then the generated \jobname-images.css file does not contain any extensions; so no figures are shown in the output. One possible fix is to change \dotagfigure in back-ini.mkiv to
\appendtoks % we can have differently scaled images
\def\dotagfigure{\taggedctxcommand{settagfigure(,"\figurefullname","\figurefilepage",\number\dimexpr\figurewidth,\number\dimexpr\figureheight)}}%
\to \everyenableelements % \figurefullname instead of \figurefileoriginal
tricky ... \figurefullname can be the converted image (say that we wa ask for an svg .. .it gets converted to pdf then) .. needs a bit of thinking
2. What is the best way to handle multipage pdf images? I frequently create a big pdf with many images and then use
\externalfigure[...][page=2]
I don't know if svg has support for multiple pages or not.
The 'converter' program can filter the pages ... so we need to pass the page number. So we have 2 todo's Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Sat, 27 Aug 2011, Hans Hagen wrote:
On 26-8-2011 08:16, Aditya Mahajan wrote:
2. What is the best way to handle multipage pdf images? I frequently create a big pdf with many images and then use
\externalfigure[...][page=2]
I don't know if svg has support for multiple pages or not.
The 'converter' program can filter the pages ... so we need to pass the page number.
Page number is already passed. The filename conversion should make use of it. I think that the best solution is to allow the user to configure (using a directive) the function that sets the new name for a pdf file, rather than hardcoding an extension. Also, can you add background-repeat: no-repeat; to imagetemplate. local imagetemplate = [[ %s[id="%s"] { display : block ; background-image : url(%s) ; background-size : 100%% auto ; background-repeat:no-repeat; width : %s ; height : %s ; }]] Normally, this should not matter, but sometimes part of the image is repeated due to rounding differences. Aditya
On 28-8-2011 05:41, Aditya Mahajan wrote:
Also, can you add background-repeat: no-repeat; to imagetemplate.
local imagetemplate = [[ %s[id="%s"] { display : block ; background-image : url(%s) ; background-size : 100%% auto ; background-repeat:no-repeat; width : %s ; height : %s ; }]]
ok
Normally, this should not matter, but sometimes part of the image is repeated due to rounding differences.
what magic flag deals with a specific page in pdf in inkscape? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Normally, this should not matter, but sometimes part of the image is repeated due to rounding differences.
what magic flag deals with a specific page in pdf in inkscape?
I used svg2pdf which converts all pages of a pdf to split svg files. But, in the end, decided not to use svg images because most browsers do no support svg inserted through css background-image. Instead, I am not simply using png images and using imagemagics convert to convert pdf to png. Aditya
participants (2)
-
Aditya Mahajan
-
Hans Hagen