* * *

Author Topic: muPDF  (Read 13936 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2960
  • I like bugs.
Re: muPDF
« Reply #15 on: March 19, 2013, 07:12:32 pm »
I cannot talk about bgrabitmap ... i used it in my example just to simplify the rendering and avoid huge memory copiing by using the default memory buffer of bgra bitmap ...
you can use standart bitmap and copy scanlines from mupdf pixmap to rgb bitmat and discard the alpha component ...

I guess I could do that but I won't. I would have to learn your code for it, and I don't have time for it now.
I just wanted to quickly test your code and it failed. I will try some other time again. I am sure the problems will be solved.

Thanks for publishing your code.

Juha

Blestan

  • Sr. Member
  • ****
  • Posts: 377
Re: muPDF
« Reply #16 on: March 20, 2013, 08:50:34 am »
The Code did not failed :) you just not been able to use it on your machine ...
but  i'ts just a proof of concept so it's not optimised for the diferent targets of lazarus/fpc
Speak postscript or die!
Translate to pdf and live!

bastek75

  • Newbie
  • Posts: 2
Re: muPDF
« Reply #17 on: April 03, 2015, 12:17:32 pm »
Hello
question to Blestan :)
I try open lazmupdf project /test/test.lpr but I can't beacuse Lazarus not find BGRAview library (scrennshot). I looking everywhere but i cant find it. Did You have library bgraview.pas?

best regards
Sebastian

eny

  • Hero Member
  • *****
  • Posts: 1553
Re: muPDF
« Reply #18 on: April 03, 2015, 12:27:42 pm »
Ah yes, the new topic button is broken again
All posts based on: Win10 (Win64); Lazarus 1.4.2 'stable' (#49524 win32) unless specified otherwise...

rstat

  • Newbie
  • Posts: 2
Re: muPDF
« Reply #19 on: July 17, 2015, 04:03:46 pm »
Hello Blestan & Sebastian !
The problem is that in test.lpi the unit in question is referenced like this: <Filename Value="C:\lazarus\components\bgracontrols-2.1.0.1-alpha\bgraview.pas"/>

But in bgracontrols-2.1.0.1-alpha is no such unit included. I tested it 5 minutes ago with an fresh download from sourceforge.

So Blestan is the only one who has this bgracontrols-2.1.0.1-alpha an its up to him, to provide us his Package. I would be very glad if he does so.

Best Regards Frank

bastek75

  • Newbie
  • Posts: 2
Re: muPDF
« Reply #20 on: July 17, 2015, 07:07:32 pm »
thank you Frank for your answer, mayby Blestan give this unit you and me. :)
best regards
seba

Blestan

  • Sr. Member
  • ****
  • Posts: 377
Re: muPDF
« Reply #21 on: July 17, 2015, 07:37:44 pm »
Hi guys :) i' m blestan
This version of the package i more like a proof of concept than an working library. I think that there is a more mature/stable fork on github ... please chceck it . ... as i can even remember 2 years ago i was using bgrabitmaps just to use 32 bit images to be compatibls with mupdf code. I can take a look this weekend ...
Regards
Blestan
Speak postscript or die!
Translate to pdf and live!

six1

  • New member
  • *
  • Posts: 21
Re: muPDF
« Reply #22 on: August 06, 2015, 08:23:07 am »
Hi,
i wanted to use the mupdf component (made by Malcolm Poole inspired by Blestans code) in both worlds... win/linux on i386 system.
The good news: I get it run on Windows system (laz 1.4.2)

This is the very best i did found, to only display pdf very, very fast!

The bad news is, that i've big problems on linux system. (kubuntu i386)
Laz was at 1.2.6, so i decided to update first to 1.4.2 --> works

Downloaded the mupdf 1.2 Sources and fixed the Makefile for getting the libfitz.so.1.0 --> done
copied the libfitz.so.1.0 to /usr/lib
Installed the mupdflaz component into lazarus -> laz compiled the component without error
Laz want's to rebuild and restart --> so far so good

After Restart from laz, there is not one letter to see on Ide window! ... nothing, no font.
Ide works, the PDF Icon from mupdf is unter tab "additional"... but no fonts to see...

this is bad, as i'm not able to work with the ide in "blind mode"  :D

If you want to test it, first make a copy of /home/[USER]/.lazarus
( to fix this problem, delete /home/[USER]/.lazarus/bin/lazarus and rename /home/[USER]/.lazarus/bin/lazarus.old to lazarus)

Download Component and Linux lib (4,7MB)

any idea?

best, michael
« Last Edit: August 12, 2015, 02:23:49 pm by six1 »

CarefulMoose

  • Newbie
  • Posts: 2
  • Video game programmer and connoisseur.
Re: muPDF
« Reply #23 on: July 27, 2016, 07:00:14 pm »
For anyone still looking into this topic (as I have been for the past couple weeks) I finally found a solution, and it's fairly simple. Use the muPDF code except switch out the TBGRAView with the latest BGRAControls' TBGRAVirtualScreen. Comment out any code that doesn't work and use drawpdf; whenever you resize the component. It seems to work generally well.

Have a lovely day  8)
~Nick, the Careful Moose

Hafedh TRIMECHE

  • New member
  • *
  • Posts: 16
Re: muPDF
« Reply #24 on: February 03, 2017, 10:24:30 am »
Hello,

Is there a way to render pdf content to a device context canvas (TPaintBox) instead of a bitmap so objects would be selectable (specially text) providing copy/paste possibility ?

fz_new_list_device and fz_run_display_list may be used.

Thanks.

dgaspary

  • Jr. Member
  • **
  • Posts: 55
Re: muPDF
« Reply #25 on: July 15, 2017, 10:02:08 pm »
Long time, but maybe it's worth a try  :)

Downloaded the mupdf 1.2 Sources and fixed the Makefile for getting the libfitz.so.1.0 --> done

Can you (or someone else) publish the modified Makefile?

The link is not working And would be better to have the Makefile instead of getting directly an outdated .so .

Thank You.

six1

  • New member
  • *
  • Posts: 21
Re: muPDF
« Reply #26 on: July 16, 2017, 10:47:02 am »

dgaspary

  • Jr. Member
  • **
  • Posts: 55
Re: muPDF
« Reply #27 on: July 16, 2017, 03:37:15 pm »
I need the Makefile you used, so I can complile myself.

But thank you for the reply

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus