Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docx - pdf conversion problem: Line Spacing and Character spacing greater in pdf #246

Open
karbert opened this issue Oct 5, 2017 · 12 comments

Comments

@karbert
Copy link

karbert commented Oct 5, 2017

Conversion with PdfConverter:

import org.apache.poi.xwpf.usermodel.XWPFDocument;
import fr.opensagres.poi.xwpf.converter.pdf.PdfConverter;
import fr.opensagres.poi.xwpf.converter.pdf.PdfOptions;
...
XWPFDocument document = null;
try {
document = new XWPFDocument(is);
final PdfOptions pdfOptions = null;
PdfConverter.getInstance().convert(document, os, pdfOptions);
} catch (final Exception e) {
...
} finally {
document = null;
}

fr.opensagres.xdocreport: last version: 2.0.1
org.apache.poi: last version: 3.17

Conversion success, but Line Spacing and Character spacing greater in pdf.
From 1,5 page long docx convert 2,5 page long pdf.

@angelozerr
Copy link
Member

Any contribution are welcome!

@karbert
Copy link
Author

karbert commented Oct 5, 2017

My small testdata: only 3 lines, with Times New Roman 10

input docx file:
small.docx

perfect pdf created with Acrobat/Create pdf command in MS Word:
small_with_acrobat.pdf

POI converted file:
small_with_POI.pdf

view lines in Adobe Acrobat Pro in Edit mode:
small_with_acrobat_lines
small_with_poi_lines

In this 3 lines can see difference.

@ballgithub
Copy link

@imajic
may I know where could I get your fix

@SMesser
Copy link

SMesser commented May 2, 2019

Clicking on the pull request and then on the "Files changed" tab takes you to @imagic 's patch: https://github.com/opensagres/xdocreport/pull/250/files

@SMesser-WhiteHawk
Copy link

SMesser-WhiteHawk commented May 2, 2019

Since @imajic hasn't kept his PR up-to-date and merging was blocked by merge conflicts, I forked base and merged in imajic's changes, resolved the merge conflicts, and opened a new PR here: #365

@Schlonz
Copy link

Schlonz commented Jan 5, 2022

it's 2022. Any chances that this pull request will be merged in the future?

@angelozerr
Copy link
Member

If someone resolve conflict, I'm opened to merge it.

@ase379
Copy link
Contributor

ase379 commented May 14, 2024

@angelozerr There are no conflicts and in every version i am picking this snippet to avoid a formatting mess. Can you approve and merge it ?

@angelozerr
Copy link
Member

@ase379 if you speak about #365 github said me that there is conflicts.

If you want to create a new PR, I will be happy to merge it. Thanks.

@ase379
Copy link
Contributor

ase379 commented May 17, 2024

That is strange, in my pr view it is marked as "no conflicts".

Can you state the Problem ?

@angelozerr
Copy link
Member

I see that in github:

image

I have no time to investigate the problem, please create a new PR.

@ase379
Copy link
Contributor

ase379 commented May 24, 2024

@angelozerr I made a new PR from a private fork.. can you please check it ?
see #674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants