You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/03/24 11:17:04 UTC

[Bug 60914] New: DOC TO PDF

https://bz.apache.org/bugzilla/show_bug.cgi?id=60914

            Bug ID: 60914
           Summary: DOC TO PDF
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HWPF
          Assignee: dev@poi.apache.org
          Reporter: pooja.dhannawat535@gmail.com
  Target Milestone: ---

Is there any way to convert .doc to .pdf.
I tried using fo also but in that case I got issues with images in output pdf.
Images were coming in output .fo file as I have overridden the method as
follows -

public class CustomImageWordToFoConverter extends WordToFoConverter {
    public CustomImageWordToFoConverter(Document document) {
        super(document);
    }
    @Override
    protected void processImageWithoutPicturesManager(Element currentBlock,
                                                      boolean inlined, Picture
picture)
    {
        Element imgNode = currentBlock.getOwnerDocument().createElement("img");
        StringBuilder sb = new StringBuilder();
      
sb.append(Base64.getMimeEncoder().encodeToString(picture.getRawContent()));
        sb.insert(0, "data:"+picture.getMimeType()+";base64,");
        imgNode.setAttribute("src", sb.toString());
        currentBlock.appendChild(imgNode);
    }
} 

Please suggest best way to convert .doc to .pdf with all formatting and images
retained in outout

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 60914] DOC TO PDF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60914

Tim Allison <ta...@mitre.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Tim Allison <ta...@mitre.org> ---
Please ask these types of questions on our users list: user@poi.apache.org. 
The issue tracker is for reporting problems or requesting new features.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 60914] DOC TO PDF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60914

pooja.dhannawat535@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
           Priority|P1                          |P2

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 60914] DOC TO PDF

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60914

pooja.dhannawat535@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
           Severity|normal                      |critical

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org