[oXygen-user] Image and table width in Author mode

Oxygen XML Editor Support (Radu Coravu) support at oxygenxml.com
Tue Feb 14 00:03:11 CST 2023


Hi Frank,


So:


> The DITA attribute "scale" would do the trick. [But strangely enough 
> only if set to about "80" %, and not "61" % , which would be the 
> equivalent to "92/150" dpi). However, I do not want to scale images in 
> the published output, only in the editor.
>
In my opinion adding the @scale attribute in the XML document just to 
make things look in a certain way in the editor is not a good way to 
proceed.
>
> The good thing is: MiramoPDF ignores the "scale" attribute and leaves 
> the images as they are in the PDF.
>
Looks like a bug in Miramo.
>
> The bad thing: oXygen applies this scaling in the CHM files (as 
> expected, of course).
>
Works as expected.
>
>
> Isn't there any trick to make the oXygen editor believe the "scale" 
> attribute was set to "80", but without actually applying this 
> attribute to the dita data? Couldn't this be implemented somehow?
>
Not yet. Maybe with a Java based plugin a listener could be added to 
automatically add a default @scale attribute to each image element, such 
default attributes not being serialized in the final XML content but 
being taken into account... but this would need to be pursued further...

For our CSS-based PDF processor we have this "image-resolution" CSS 
property:

https://www.oxygenxml.com/doc/versions/25.0/ug-editor/topics/dcpp_images.html

I added an internal issue based on your feedback to consider taking it 
into account in the editor as well:


     EXM-52435 Take into account image-resolution property when 
displaying images


Regards,

Radu

Radu Coravu
Oxygen XML Editor

On 2/13/23 14:55, Frank Dissinger wrote:
>
> Hi Radu, Kris, Stefan and Tony,
>
>
> Thank you for your replies.
>
>
> I do not use FrameMaker anymore, neither for editing nor for 
> publishing to PDF. I use MiramoPDF for publishing to PDF and oXygen 
> for publishing to CHM. Shifting back to FM is definitely not an option 
> for me.
>
>
> The only thing I currently do is compare how DITA files look like in 
> FM and oXygen to make sure they are presented in a similar way. I must 
> be sure that the files are OK. If I see them completely differently, I 
> get confused and start worrying that something has gone wrong...
>
>
> The DITA attribute "scale" would do the trick. [But strangely enough 
> only if set to about "80" %, and not "61" % , which would be the 
> equivalent to "92/150" dpi). However, I do not want to scale images in 
> the published output, only in the editor. The good thing is: MiramoPDF 
> ignores the "scale" attribute and leaves the images as they are in the 
> PDF. The bad thing: oXygen applies this scaling in the CHM files (as 
> expected, of course).
>
>
> Isn't there any trick to make the oXygen editor believe the "scale" 
> attribute was set to "80", but without actually applying this 
> attribute to the dita data? Couldn't this be implemented somehow?
>
>
> The use case is: In the editor window I would like to have a good 
> estimate of how wide images are to see if they exceed the borders of 
> an A4-sized page. This is especially important when I place multiple 
> inline images in the same paragraph so that they are shown side by 
> side. It looks ugly if there is a line break just because one of the 
> image is a few pixels too wide. In FrameMaker I could see this exactly 
> and then I would tweak the images a little in Photoshop to cut off a 
> few pixels...
>
>
> It is good to know that there is an option in MiramoPDF (and other PDF 
> rendering engines) that scales images automatically down to make them 
> fit on the page. But this is not applicable to the use case I have 
> just described. Moreover, the images may get blurred. I always sharpen 
> them when I scale them down in Photoshop and make sure that text is 
> still readable.
>
>
> As a workaround, can I display a kind of ruler in the oXygen window? I 
> would like to see a thin vertical line at a user-defined pixel or mm 
> position on the right-hand side of the editor window. This line would 
> mark the end of the text column. I could do this with CSS (fixed 
> width, border right), but the line shifts to the right if an image is 
> wider.
>
>
> Best regards,
>
> Frank
>
> ------------------------------------------------------------------------
> Am 10.02.2023 um 08:42 schrieb Oxygen XML Editor Support (Radu Coravu):
>>
>> Hi Frank,
>>
>>
>> Please see some remarks below:
>>
>>> All my images have PNG format and an "otherprops="fmdpi:xxx" 
>>> attribute where xxx is usually 150, in some cases 140, 160 or 
>>> similar. FrameMaker, my previous XML editor, honors this attribute 
>>> and scales the images appropriately.
>>>
>> Well it honors its own Frame specific custom attributes which are not 
>> defined in the DITA specification.
>>
>> Are you still publishing to PDF using Frame?
>>
>>> I notice that oXygen displays images bigger in its editor compared 
>>> to 150 dpi images in FrameMaker.
>>>
>> Oxygen's default DPI is about 96 which is closer to the Web output.
>>
>> We have some CSS settings to change the DPI when publishing DITA to 
>> PDF using our CSS based engine:
>>
>> https://www.oxygenxml.com/doc/versions/25.0/ug-editor/topics/dcpp_images.html
>>
>> but we do not have settings to change the DPI in the visual editor on 
>> a per-image base.
>>
>>> I would need to reduce all images to about 66% of their size (= by 
>>> factor 1.5). Unfortunately I do not know of any CSS style which 
>>> scales images based on their own pixel size. Percentage values in 
>>> CSS apply to the widht or height of the viewport.
>>>
>> Yes, I also do not see a possible way to do this with CSS. DITA 
>> <image> elements allow setting the width or scale attributes on them. 
>> Like:
>>
>>> <image href="../../images/Iris_sanguinea.jpg" scale="160"/>
>> and Oxygen takes this into account. But we take it into account 
>> because we know it's DITA, not because of a certain CSS rule which 
>> could be modified to cover another attribute.
>>>
>>>
>>> Likewise, I would  like to make sure that table columns are not too 
>>> narrow on the PDF pages.
>>>
>> Most XML editors are not what you see is what you get especially 
>> because XML can be published to multiple formats. The PDF may have a 
>> different font, it splits into pages, it has a certain page width... 
>> best you can do is to try and make things look more like the 
>> published content in the visual editor and check the PDF from time to 
>> time.
>>
>>
>> Regards,
>>
>> Radu
>>
>> Radu Coravu
>> Oxygen XML Editor
>>
>>
>> On 2/9/23 15:08, Frank Dissinger wrote:
>>>
>>> Hi list,
>>>
>>>
>>> I publish DITA content as online help and PDF. In oXygen's Author 
>>> mode I would like to make sure that images do not exceed the width 
>>> of the A4-sized PDF pages. Sometimes I also place two or more inline 
>>> images side by side in a paragraph and want to make sure if all of 
>>> them fit on the line or if there is a line break between them.
>>>
>>>
>>> All my images have PNG format and an "otherprops="fmdpi:xxx" 
>>> attribute where xxx is usually 150, in some cases 140, 160 or 
>>> similar. FrameMaker, my previous XML editor, honors this attribute 
>>> and scales the images appropriately.
>>>
>>>
>>> I notice that oXygen displays images bigger in its editor compared 
>>> to 150 dpi images in FrameMaker. I would need to reduce all images 
>>> to about 66% of their size (= by factor 1.5). Unfortunately I do not 
>>> know of any CSS style which scales images based on their own pixel 
>>> size. Percentage values in CSS apply to the widht or height of the 
>>> viewport.
>>>
>>>
>>> Likewise, I would  like to make sure that table columns are not too 
>>> narrow on the PDF pages.
>>>
>>>
>>> What can I do? Any ideas are welcome.
>>>
>>>
>>> Regards,
>>>
>>> Frank
>>>
>>>
> ------------------------------------------------------------------------
> Am 10.02.2023 um 11:48 schrieb Tony Graham:
>> On 09/02/2023 13:08, Frank Dissinger wrote:
>> ...
>>> All my images have PNG format and an "otherprops="fmdpi:xxx"
>>> attribute where xxx is usually 150, in some cases 140, 160 or
>>> similar. FrameMaker, my previous XML editor, honors this attribute
>>> and scales the images appropriately.
>>
>> FrameMaker honours it because it is FrameMaker-specific.
>>
>>> I notice that oXygen displays images bigger in its editor compared to
>>>  150 dpi images in FrameMaker. I would need to reduce all images to
>>> about 66% of their size (= by factor 1.5). Unfortunately I do not
>>> know of any CSS style which scales images based on their own pixel
>>> size. Percentage values in CSS apply to the widht or height of the
>>> viewport.
>>
>> There was an 'image-resolution' property in a previous CSS GCPM WD [1],
>> but it's not in any current CSS spec.  It let you specify whether to use
>> the DPI in the image, a specified DPI, or 'CSS pixels'.
>>
>> Antenna House Formatter implements it [2] (also as
>> 'axf:image-resolution' in XSL-FO).
>>
>>> Likewise, I would  like to make sure that table columns are not too 
>>> narrow on the PDF pages.
>>
>> You might need to start a new thread for that, because everyone so far
>> has fixated on the image resolution question.
>>
>> Regards,
>>
>>
>> Tony Graham.
> -- 
>
> *Frank Dissinger*
>
> Documentation Manager
>
> ....................................................................
>
> *CGS Publishing Technologies International GmbH*
>
> *Email *frank.dissinger at cgs-oris.com | *Web* www.cgs-oris.com 
> <http://www.cgs-oris.com/>
>
> *Address* Kettelerstr. 24 | D-63512 Hainburg | Germany
>
> *Phone* +49 6182 9626-27 | *Fax* +49 6182 9626-99
>
> *Commercial register* Offenbach, HRB no. 21495
>
> *Managing directors* Bernd Rückert, Christoph Thommessen
>
>
> https://www.cgs-oris.com/Signatur.png <https://www.cgs-oris.com/signatur>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20230214/62f8471d/attachment.htm>


More information about the oXygen-user mailing list