Giter Site home page Giter Site logo

jmupdf's People

Contributors

pedrojrivera avatar

Watchers

 avatar

jmupdf's Issues

How to Compile JNI files


I am in need of updating the way of getting links from pdf page in a JNI file. 
We need FZ_LINK_GOTOR type of links which now currently not returned by the JNI 
interface.

So i thought of compiling the files. The make file which is there in the trunk 
does not work for me. 

Can you guide me in making the compilation work?

Thanks and Regards,
Clement

Original issue reported on code.google.com by [email protected] on 14 Feb 2012 at 3:32

JPview is being ported to jMuPDF

Dear Pedro et al.,

First of all thank you for some good code. I have been looking into the sources 
of jMuPDF the past days and I have decided to port the rendering engine of 
JPview, see evt. http://sourceforge.net/projects/jpview/, to use jMuPDF 
instead. The main object of JPview is to optimize on a scrolled canvas for PDF 
viewing on the java platform. Therefore I am very interrested in rendering 
speed. Hence I have created a little comparison of jPodRenderer vs jMuPDF (SWT, 
i have written support for SWT images) to be found here 
http://sourceforge.net/projects/mujp/. In short, the test render into pixels, 
the a SWT image is created and disposed, thats all. Since, SWT images are also 
handled through dll-handles, they are a little faster than BufferedImages and 
does not consume same amounts of memory. I guess we can agree on that. 


As I see it, it is currently not possible to recieve characters with positions 
from jMuPDF as text is extracted as lines with a starting position. Did I 
understand this correctly? Will your library support this in the future or will 
I have to rework and rebuild dll's myself?

Do you plan to include SWT Image support in the library or will I have to 
create a port of my own? It is nothing but 15 lines of code that I can send you 
if interested?

I am very eager about doing a small and FAST pdf viewer for the java platform 
and I have already decided to go the MuPDF/SWT way. Will you join forces? :-)

Please contact me on mail [email protected] if any interest :)

Thanks,

Best regards,

Peter :-)


Original issue reported on code.google.com by [email protected] on 7 May 2014 at 4:29

JMupdf crash on loading some pdfs

1. start jmupdf-viewer.jar
2. open the attached pdf file
3. application crashes

When I try to do the same thing from java code
PdfDocument d = new PdfDocument(path);
The JVM crashes without any error.

Notes: 
1- Same thing happened on windows and ubuntu machines (both 64 bits)
2- When I downloaded the latest mupdf (windows), I could open the pdf without 
any problem.

Thanks

Original issue reported on code.google.com by [email protected] on 3 May 2012 at 12:51

Attachments:

Linux Support for 0.5.0

Hi all, because I missed the linux binaries for 0.5.0 I've compiled them 
myself. If anyone need them, here are the binaries:

https://code.google.com/p/jeboorker/source/browse/trunk/lib/jmupdf/libjmupdf32.s
o
https://code.google.com/p/jeboorker/source/browse/trunk/lib/jmupdf/libjmupdf64.s
o

I hope there will be official ones soon.

Original issue reported on code.google.com by [email protected] on 5 Jul 2014 at 7:10

How to set a fixed width (or height) when converting to an image?

Hi,
does anyone can help?
I see I can only set the zoom value, but what if I need to have a fixed width 
JPG/PNG conversion?

pix = new PagePixels(page);
pix.setZoom(1f);

Can it be done on the drawPage method?

pix.drawPage(null, pix.getX0(), pix.getY0(), pix.getX1(), pix.getY1());

If so can you give an example?

Many thanks!

Original issue reported on code.google.com by [email protected] on 18 Mar 2014 at 4:17

Anti-aliasing level ignored in 0.4.1

Although the anti-aliasing level can be set for the entire document, it is 
ignored while rendering.

In version 0.3.0 the problem didn't occur.

Workaround: Setting anti-aliasing level in PageRenderer.

Original issue reported on code.google.com by schellenberg.net on 13 Jun 2012 at 3:02

printing with different orientation

jmupdf is running really good and very stable. Thanks for fixing the umlaut 
problem :-)

We tried now to print pdf documents with different orientation but it does not 
work. In the print method you have to set the orientation but can not select 
"auto" or "asOrginal". (javax.print.attribute.standard.OrientationRequested)

The Question is, is it possible to print one pdf file in one printjob awith 
different orientation? Maybe also with differnet Page Size (A4 or A3)

I have attached a sample pdf.

This is the source:
int maxMemory = 60;
PdfDocument pdf = new PdfDocument("C:/Users/admin/Desktop/Test.pdf", maxMemory);
PrintServices p = new PrintServices(pdf);
p.setCustomResolution(300);
MediaSizeName m = MediaSizeName.ISO_A4;  -> Can this be set to "auto"?
PrintQuality pq = PrintQuality.NORMAL;
Chromaticity color = Chromaticity.COLOR;
OrientationRequested ot = OrientationRequested.LANDSCAPE; -> Can this be set to 
"auto"?
p.print("TEST", "PCL5", 1, 1, 3, m, pq, color, ot, false);
p.waitForPrintJobDone();

Original issue reported on code.google.com by [email protected] on 23 Feb 2012 at 7:44

Attachments:

Problem with MediaSizeName

I am using your framework for printing pdf files.
We found out that sometimes the output size is wrong.
So we analysed you method to get the width and height.

here is our sample code: 

PdfDocument pdf = new PdfDocument("C:\\test.pdf");
float width = pdf.getPage(1).getWidth();
float heigth = pdf.getPage(1).getHeight();

System.out.println(width + " " + heigth);
System.out.println(MediaSize.findMedia(width, heigth, Size2DSyntax.MM));

It returns:
595.0 841.0
iso-a1

But normally it should be A4.
You can find sample pdf file here:
http://jmupdf.googlecode.com/issues/attachment?aid=50000000&name=Test.pdf&token=
nTKwcVXR1uwOzVWGJD3Fy5PsqTc%3A1333734100145

Did we make something wrong?

Original issue reported on code.google.com by [email protected] on 6 Apr 2012 at 5:43

Example/Convert: PDF to Rasterimage (all) - Image is slightly rotated?

1. used jmupdf-0.4.1 on Win7-64 with jdk7
2. openend a example/convert/png
3. loaded any pdf doc
4. the saved rasterimage is always rotated (about 1°) - why?

PdfDocument pdfDoc = new 
PdfDocument("u:/Literatur/_DesignPatterns/professional_asp.net_design_patterns.p
df", "");
pdfDoc.saveAsPng(1,"c:/temp/_1.png", 4f, ImageType.IMAGE_TYPE_RGB);
pdfDoc.dispose();

When i use the ImageIO (BufferedImage) example, everything is fine?

Original issue reported on code.google.com by [email protected] on 25 Feb 2014 at 10:21

Improving text selection

Hi Pedro,

I have an idea for improving the text selection in jmupdf.

Currently the text selection is based on rectangular selection. A rectangle is 
drawn over the selected text area.

This can be improved to select only the text under the selected area. This 
means, it should be possible to select based on individual letters.
I have prepared a screen shot how it works currently (the figure above) and the 
expectation (the figure below). This would be useful for the readers to select 
the required text across the lines.

Is it possible for you to implement this feature in jmupdf?

Regards,
Manickam.

Original issue reported on code.google.com by [email protected] on 27 Apr 2012 at 1:31

Attachments:

Error in zoom

1. Create a PageRenderer
2. Specify a zoom different than 1f in the constructor
3. call renderer.getImage() will return an unzoomed image

I downloaded the latest source (Revision eeaf8d23217a) and compiled it.

Original issue reported on code.google.com by [email protected] on 7 May 2012 at 8:12

setting devicehints for Image interpolation

would it be possible to set the device parameters on the drawing device?

eg. to disable ImageInterpolation

http://git.ghostscript.com/?p=mupdf.git;a=blob;f=include/mupdf/fitz/device.h

line 188-210


Original issue reported on code.google.com by [email protected] on 16 Jan 2015 at 12:09

please provide this feature, extract text coordinate

hi,
could you please prove me a new feature? it is just a smal update for your 
existing codes.

the current com.examples.pdf.text.Text provide a way to extract the whole texts 
of a pdf. but i want more. i want every a signle text's coordinate.

right now your existing sample code of returning a pdf text, is get text by 
PageText, but it contain a whole line's text. i really want every single 
char/string/word coordinate.

thanks a lot.

Original issue reported on code.google.com by [email protected] on 25 Mar 2013 at 3:36

empty pages on linux

I tested jmupdf-0.4 on win xp (x32) and ubuntu 11.10 (x64). On win xp it's run 
fine and render all documents that's i tested. But on ubuntu i get always empty 
pages !

Original issue reported on code.google.com by [email protected] on 20 Feb 2012 at 7:02

jmupdf is not identified as GPL (or Affero GPL) as required by mupdf

What steps will reproduce the problem?
1. download latest 0.4.1.7 source and 'binaries'
2. binaries do not contain any license statement, nor the COPYING file
3. The COPYING file is present in the sources only in the mupdf and jbig2dec

What is the expected output? What do you see instead?
jmupdf must be clearly identified as GPL (Affero GPL for newer versions of 
mupdf). Also, Artifex requests that the GPL license be communicated by the 
viewer, such as in an "About" menu under "Help" to assure that users understand 
their rights and responsibilties.

This is requested since Artifex is assertive of our copyright, and while we 
release mupdf under AGPL, we pursue those that use the code in ways that are 
not compliant with the GPL and don't want to license the code under a 
commercial license from Artifex.


What version of the product are you using? On what operating system?
0.4.1.7 on win 7 64bit.

Please provide any additional information below.

Thanks for developing this for mupdf. I haven't played with it much, but the 
viewer ran right away after the install. You may be interested in moving to a 
later mupdf since we now have support for some interactive mode PDF actions 
that use JavaScript. So far we've used the "v8" javascript engine.

Original issue reported on code.google.com by [email protected] on 30 Jun 2013 at 7:47

Jmupdf Crash and Forces Application to Quit.

What steps will reproduce the problem?
Render pdf in file.

Code used.
page = doc.getPage(pageNo);
PdfDocument doc = new PdfDocument(file.getAbsolutePath(), 500); 
page = doc.getPage(1);  
int rotate = Page.PAGE_ROTATE_AUTO;
ImageType color = ImageType.IMAGE_TYPE_RGB; 
int antiAliasLevel = 8;
Float scale = 1f;
PageRenderer render = new PageRenderer(page, scale, rotate, color);
render.setAntiAliasLevel(antiAliasLevel);
render.render(true); //<-- Crash here
img = render.getImage();
render.dispose();

What is the expected output? What do you see instead?
Pdf Rendered

What version of the product are you using? On what operating system?
latest

Please provide any additional information below.
Jmupdf crashes and forces the application to quit.
See the crash log for more details in the attached files.



Original issue reported on code.google.com by [email protected] on 11 Feb 2014 at 6:04

Attachments:

Critical slowdown and a lot of log output for certain PDFs

(Using 0.4.1, tested WinXP/7 and Linux)

Trying to render the following PDF: 
http://www3.telus.net/public/aramir/TestCase-Flyer.pdf (sorry for not attaching 
- file size limit of 10Mb), jMuPDF generates _a lot_ of errors in form of:

  error: expected string or endbfchar
  error: syntaxerror in cmap bfchar
  error: cannot parse cmap stream (72 0 R)
  error: cannot load cid font (71 0 R)
  warning: cannot set font
  warning: cannot draw text since font and size not set
  error: expected string or endbfchar
  error: syntaxerror in cmap bfchar

up to 10000-20000 lines (!!) like those in the logs.
the test system seems to come to _extreme_ slowdown during this test, and then 
to a complete stop.

It seems that renderer tries to proceed, even when encountering critical 
errors. Is it possible to make it abort after the first critical error? I'd 
rather have an error message than a DOS-type slowdown. 

Also: is it possible to supress those errors/warnings in the log (or at least 
supress the consecutive ones)?

(We see more and more of this type of PDFs around - I think those are generated 
by the Adobe Photoshop)

Thank you.

Original issue reported on code.google.com by [email protected] on 24 Sep 2012 at 9:05

Problem with inicialize jmupdf

Device RicoMagic 

old System Android
new System rebuild to ubuntu 12.04

Version of jmupdf  2012-02-23-bin-jmupdf-linux-0.4.1.7z  

lib....so file I copy to /usr/lib/jni  folder

Code
PdfDocument myPdf = new PdfDocument(pdfFileName);

Log result
Exception in thread "main" org.eclipse.swt.SWTException: Failed to execute 
runnable (java.lang.UnsatisfiedLinkError: /usr/lib/jni/libjmupdf32.so: 
/usr/lib/jni/libjmupdf32.so: cannot open shared object file: No such file or 
directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform))
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
    at Start._windowStart(Start.java:139)
    at Start.main(Start.java:95)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jni/libjmupdf32.so: 
/usr/lib/jni/libjmupdf32.so: cannot open shared object file: No such file or 
directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
    at java.lang.Runtime.loadLibrary0(Runtime.java:840)
    at java.lang.System.loadLibrary(System.java:1047)
    at com.jmupdf.JmuPdf.loadDll(JmuPdf.java:83)
    at com.jmupdf.JmuPdf.<clinit>(JmuPdf.java:29)
    at MyImages._downloadFile(MyImages.java:219)
    at MyImages._getImageData(MyImages.java:381)
    at MyImages.getImages(MyImages.java:63)
    at Start.publishProgressConnectingClient(Start.java:274)
    at Start$ConnectingRunnable$1$1.run(Start.java:200)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    ... 4 more



Very please for help.

Im from Czech republic - im sorry for my bad english.

Original issue reported on code.google.com by [email protected] on 23 Oct 2013 at 10:14

links from outline

Hi,

Currently the outline provides only text and page no. I also require content in 
the link format. I saw the code and it extract the information from link. Can 
you support also external links?

Regards,
Manickam.


Original issue reported on code.google.com by [email protected] on 21 Feb 2012 at 9:10

Text Encoding

I would like to get the text of a page which is in Hebrew. The output is not 
the expected one. Should I modify the constructed text with encodings for 
Hebrew like ISO-8859-8, WINDOWS-1255 or there is another alternative?

Pavel

Original issue reported on code.google.com by [email protected] on 3 Apr 2013 at 3:31

bundled mupdf is old

Please update mupdf/jni to newer mupdf, preferrably 1.2.

Thanks

Gentoo bug report https://bugs.gentoo.org/show_bug.cgi?id=472832



Original issue reported on code.google.com by [email protected] on 10 Jun 2013 at 8:42

Issue with saveAsxxx() functions.

All the saveAsXXX() functions are rotating the image by -1 degrees. This issue 
is found within the JNI code.

The solution to this will be to add a "rotate" parameter so that the Java code 
can control page rotation before saving image to disk.

This will be available in next minor release as a fix/enhancement.

The workaround is to change the "-1" value to zero.


Original issue reported on code.google.com by [email protected] on 8 Mar 2012 at 9:10

"Copy as Text" is extracting more text than expected

What steps will reproduce the problem?
The "copy as text" functionality in the context menu is not extracting the 
appropriate text. It includes more lines than expected.

What is the expected output? What do you see instead?
Please see the attached screenshot

What version of the product are you using? On what operating system?
2012-02-23-bin-jmupdf-windows-0.4.1



Original issue reported on code.google.com by [email protected] on 16 Mar 2012 at 1:13

Attachments:

Problem with umlaut in filename

What steps will reproduce the problem?
1. try to open a file with umlaut
2.
3.

What is the expected output? What do you see instead?
Error message:
error: cannot open C:\Programme\Test\1329245358432\Test Lösung.pdf

What version of the product are you using? On what operating system?
3.04

Please provide any additional information below.
Windows PC.

Original issue reported on code.google.com by [email protected] on 14 Feb 2012 at 7:27

Memory usage (leakage)

What steps will reproduce the problem?
1. Load PDF 
2. do the Zoom in / out /next page operation frequently
3. Memory growth rapidly (windows java process) and cannot be released 

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
0.4.0

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Aug 2012 at 1:51

64bit dil not rendering image in pdf, 32bit handles it great.

I found a small bug which I know you will solve very quickly. 
An image in the attached pdf does not render in 64bit using the 64bit dll.
I am using the latest windows dll's. 0.4.1

What steps will reproduce the problem?
1. see the attached pdf, the man inside renders using the 32bit dll
2. But when switching to 64bit (I am using java 7.21) the man inside goes on 
vacation (Does not appear). (I hope he's having a nice time!)

What is the expected output? What do you see instead?
expected output is to see the funny man with the Christmas hat!
instead he does not appear (I guess he's helping santa in the north pole).


What version of the product are you using? On what operating system?
latest 0.4.1.

Please provide any additional information below.
See attached pdf.

Thanks.

Original issue reported on code.google.com by [email protected] on 16 May 2013 at 3:15

Attachments:

Build Issues in OSX 10.7

The included makefile has consistently refused to successfully build the JNI 
libraries I need to bring JMuPDF into a Java application being developed on OSX 
10.7. I've gone through the MakeJNI1 and MakeJNI2 makefiles line by line to 
tweak in the hopes of making it work, but I always get stuck at the linking 
step.

I isolated the OSX build process into a separate shell script so I could 
inspect each action item step by step. I've attached that file as build_osx.sh

Not sure what to do at this point. Both the included makefile, and my own 
attempts at linking get stuck at the same place:

mrapczynski:MuPDF mattrapczynski$ ./build_osx.sh
Undefined symbols for architecture i386:
  "__lfind", referenced from:
      _TIFFFindFieldInfoByName in libtifflib.a(tif_dirinfo.o)
      _TIFFFieldWithName in libtifflib.a(tif_dirinfo.o)
  "_jni_write_jpg", referenced from:
      _Java_com_jmupdf_JmuPdf_writeJPeg in jni_java_pixmap.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

I feel like I'm so close to getting a finished library. Any ideas?


Original issue reported on code.google.com by [email protected] on 17 Mar 2012 at 8:31

Attachments:

How to set a fixed width (or height) when converting to an image?

Hi,
does anyone can help?
I see I can only set the zoom value, but what if I need to have a fixed width 
JPG/PNG conversion?

pix = new PagePixels(page);
pix.setZoom(1f);

Can it be done on the drawPage method?

pix.drawPage(null, pix.getX0(), pix.getY0(), pix.getX1(), pix.getY1());

If so can you give an example?

Many thanks!

Original issue reported on code.google.com by [email protected] on 18 Mar 2014 at 4:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.