Re: lowriter fails to launch pdf file from cli

2022-09-08 Thread Curt
On 2022-09-08, David Wright  wrote:
>
> With bullseye, using a variety of guesses for --infilter
> (basically permutating words like in the example here):
>
> $ lowriter --infilter="Writer Office Open PDF" /tmp/version10.pdf

Ineffective here.

> the document does indeed always open in Draw. It shows a
> poor rendering of the text in sans serif (the original is
> serif). Sporadic interword spaces are turned into overlaps
> to make the lines shorter, though they still run over the
> Draw margins, and even the edge of the paper. Even some
> short lines have unnecesary overlaps.
>
> The document is a mixture of text and music: the drawn
> items (staves, barlines, notestems, slurs etc) are rendered
> correctly, but noteheads, rests, clefs, etc., which are in
> the Emmentaler font, are omitted.
>
> I write all this only because I don't know what LO is meant
> to do under the circumstances, either in its Draw or its
> Writer manifestation.
>
> I've never seen anything I'd describe as "raw pdf", as in:
>
>   %PDF-1.5
>   %
>   3 0 obj
>   …
>

I see in lowriter what I see if I open a pdf file in vim :

%PDF-1.3
%âãÏÓ
1 0 obj
<<
/Type /Catalog
/Metadata 2 0 R
/MarkInfo << /Marked true >>
/StructTreeRoot 8 0 R
/Pages 3 0 R
>>
endobj

I must be missing some essential element in my Libre Office setup (or 
something).



Re: lowriter fails to launch pdf file from cli

2022-09-08 Thread David Wright
On Wed 07 Sep 2022 at 11:32:11 (-), Curt wrote:
> On 2022-09-07, jindam, vani  wrote:
> >>
> >>What's supposed to happen? 
> >
> > Eyal Rozenberg explanation on lo bugzilla 
> > issue (1): The reason is that when you 
> > open a PDF file in LO, regardless of 
> > which app you opened it with - it gets 
> > opened in LO Draw.
> 
> I'm working with an obsolete version (LibreOffice 5.2.7.2) and
> whatever I do, the pdf opens as a raw pdf in the lowriter app (even if I
> open the pdf file directly in lodraw).
> 
> I guess everybody has her own cross to bear.

With bullseye, using a variety of guesses for --infilter
(basically permutating words like in the example here):

$ lowriter --infilter="Writer Office Open PDF" /tmp/version10.pdf

the document does indeed always open in Draw. It shows a
poor rendering of the text in sans serif (the original is
serif). Sporadic interword spaces are turned into overlaps
to make the lines shorter, though they still run over the
Draw margins, and even the edge of the paper. Even some
short lines have unnecesary overlaps.

The document is a mixture of text and music: the drawn
items (staves, barlines, notestems, slurs etc) are rendered
correctly, but noteheads, rests, clefs, etc., which are in
the Emmentaler font, are omitted.

I write all this only because I don't know what LO is meant
to do under the circumstances, either in its Draw or its
Writer manifestation.

I've never seen anything I'd describe as "raw pdf", as in:

  %PDF-1.5
  %
  3 0 obj
  …

I tried opening lowriter with no file, but Insert→Text from File
produced an error rather than importing anything from the PDF.
Taking the CLI out of the process by File→Open-ing the PDF in Writer,
it just opens it in Draw anyway. I don't see any reference to
Importing, Filtering or Converting in any of the menus in Writer.

BTW I don't think filtering has anything to do with selecting
files from the filesystem (as the OP might have implied): the
nature of a CLI is that you can filter file-types yourself in
a multitude of ways.

> > (1) https://bugs.documentfoundation.org/show_bug.cgi?id=141732
> >
> > The man page says
> >>
> >>   --infilter=""
> >> Force an input filter type if possible.  For example
> >> --infilter="Calc  Office  Open  XML"
> >> only
> >>
> >>I'm afraid I'm uncertain what that means.

>From reading the reference, and the man page, I would surmise that
it tells LO that this particular XML file is a spreadsheet so that
it opens in Calc rather than Writer/Draw/Impress etc. (Obviously
XMLs have plenty of uses other than Calc spreadsheets.)

For a PDF, I would have thought LO would be able to determine that
for itself (see raw text above), but forcing an input filter could be
useful to control the process of conversion to, say, text (like
pdftotext) or extracting any images (like pdfimages), particularly
where it's counter to what would be natural choice (extracting PDF
text into Writer, and images into Draw).

I do see three files called libpdf{filter,import,ium}lo.so on my system,
but I don't know what they're for. (As a LuaTeX/gnumeric/inkscape person,
LO is just a viewer for the Microsoft documents I sometimes get sent.)

Cheers,
David.



Re: lowriter fails to launch pdf file from cli

2022-09-07 Thread Curt
On 2022-09-07, jindam, vani  wrote:
>>
>>What's supposed to happen? 
>
> Eyal Rozenberg explanation on lo bugzilla 
> issue (1): The reason is that when you 
> open a PDF file in LO, regardless of 
> which app you opened it with - it gets 
> opened in LO Draw.

I'm working with an obsolete version (LibreOffice 5.2.7.2) and
whatever I do, the pdf opens as a raw pdf in the lowriter app (even if I
open the pdf file directly in lodraw).

I guess everybody has her own cross to bear.


> (1) https://bugs.documentfoundation.org/show_bug.cgi?id=141732
>
> regards,
> jindam, vani
>
> The man page says
>>
>>   --infilter=""
>> Force an input filter type if possible.  For example
>>   --infilter="Calc  Office  Open  XML"
>>   only
>>
>>I'm afraid I'm uncertain what that means.
>
>






Re: lowriter fails to launch pdf file from cli

2022-09-07 Thread jindam, vani
On 2 September 2022 8:17:17 AM UTC, Curt  wrote:
>On 2022-09-02, David Wright  wrote:
>> On Fri 02 Sep 2022 at 01:02:10 (+), jindam, vani wrote:
>>> i am trying to open pdf file from cli:
>>> $ /usr/bin/lowriter --inputfilter="*.pdf" /home/user/file.pdf
>>
>>   ↑↑↑
>>
>>> the above command fails to open pdf file
>>> 
>>> what am i doing wrong?
>>
>> Try removing the characters "put": it's --infilter.
>>
>> Note that I don't know what kinds of string are expected as an
>> argument to infilter, but *.pdf worked for me in your example.

perhaps, you have libreoffice draw. if 
possible can you confirm.

>>
>> Cheers,
>> David.
>>
>>
>
>
>I tried with the --infilter flag. lowriter does nothing different here
>with or without that flag; it opens the raw pdf file.
>
>What's supposed to happen? 

Eyal Rozenberg explanation on lo bugzilla 
issue (1): The reason is that when you 
open a PDF file in LO, regardless of 
which app you opened it with - it gets 
opened in LO Draw.

(1) https://bugs.documentfoundation.org/show_bug.cgi?id=141732

regards,
jindam, vani

The man page says
>
>   --infilter=""
> Force an input filter type if possible.  For example
>--infilter="Calc  Office  Open  XML"
>only
>
>I'm afraid I'm uncertain what that means.



Re: lowriter fails to launch pdf file from cli

2022-09-02 Thread Curt
On 2022-09-02, David Wright  wrote:
> On Fri 02 Sep 2022 at 01:02:10 (+), jindam, vani wrote:
>> i am trying to open pdf file from cli:
>> $ /usr/bin/lowriter --inputfilter="*.pdf" /home/user/file.pdf
>
>   ↑↑↑
>
>> the above command fails to open pdf file
>> 
>> what am i doing wrong?
>
> Try removing the characters "put": it's --infilter.
>
> Note that I don't know what kinds of string are expected as an
> argument to infilter, but *.pdf worked for me in your example.
>
> Cheers,
> David.
>
>


I tried with the --infilter flag. lowriter does nothing different here
with or without that flag; it opens the raw pdf file.

What's supposed to happen? The man page says

   --infilter=""
 Force an input filter type if possible.  For example
 --infilter="Calc  Office  Open  XML"
 only

I'm afraid I'm uncertain what that means.



Re: lowriter fails to launch pdf file from cli

2022-09-01 Thread jindam, vani



On 2 September 2022 3:09:43 AM UTC, David Wright  
wrote:
>On Fri 02 Sep 2022 at 01:02:10 (+), jindam, vani wrote:
>> i am trying to open pdf file from cli:
>> $ /usr/bin/lowriter --inputfilter="*.pdf" /home/user/file.pdf
>
>  ↑↑↑
>
>> the above command fails to open pdf file
>> 
>> what am i doing wrong?
>
>Try removing the characters "put": it's --infilter.
>
>Note that I don't know what kinds of string are expected as an
>argument to infilter, but *.pdf worked for me in your example.

its not working for pdf, but working for docx files. is it perhaps i have 
installed lowriter w/o recommends in apt.conf? there is a recent enhancement 
issue on bugzilla about opening pdf files, i will check later

>
>Cheers,
>David.
>



Re: lowriter fails to launch pdf file from cli

2022-09-01 Thread David Wright
On Fri 02 Sep 2022 at 01:02:10 (+), jindam, vani wrote:
> i am trying to open pdf file from cli:
> $ /usr/bin/lowriter --inputfilter="*.pdf" /home/user/file.pdf

  ↑↑↑

> the above command fails to open pdf file
> 
> what am i doing wrong?

Try removing the characters "put": it's --infilter.

Note that I don't know what kinds of string are expected as an
argument to infilter, but *.pdf worked for me in your example.

Cheers,
David.