Class PdfToHtmlConverter
- java.lang.Object
-
- com.flowable.platform.pdf.converter.PdfToHtmlConverter
-
public class PdfToHtmlConverter extends Object
ExperimentalConverts a PDF to an HTML file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
PdfToHtmlConverter.CustomCssSavingStrategy
protected static class
PdfToHtmlConverter.CustomResourceSavingStrategy
protected static class
PdfToHtmlConverter.CustomStrategyOfCssUrlCreation
-
Field Summary
Fields Modifier and Type Field Description protected PdfToHtmlConverterConfig
configuration
-
Constructor Summary
Constructors Constructor Description PdfToHtmlConverter(PdfToHtmlConverterConfig configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.aspose.pdf.Document
changeLayout(com.aspose.pdf.Document pdfDocument)
protected com.aspose.pdf.Document
cleanupContent(com.aspose.pdf.Document pdfDocument)
protected com.aspose.pdf.HtmlSaveOptions
configureHtmlSaveOptions()
InputStream
convert(InputStream pdfInputStream)
protected List<com.aspose.pdf.Rectangle>
createFullWidthRectangles(Set<com.aspose.pdf.MarkupSection> footersAndHeaders)
protected Set<com.aspose.pdf.MarkupSection>
findFootersAndHeaders(com.aspose.pdf.ParagraphAbsorber paragraphAbsorber)
protected Set<com.aspose.pdf.MarkupSection>
findMatchingSections(com.aspose.pdf.MarkupSection markupSection, List<com.aspose.pdf.PageMarkup> pageMarkups)
protected String
getSectionText(com.aspose.pdf.MarkupSection section)
protected boolean
hasFootersAndPageNumbers(Set<com.aspose.pdf.MarkupSection> footersAndHeaders)
protected boolean
matchesPageNumberRegexp(com.aspose.pdf.MarkupSection markupSection)
protected void
removeLogos(com.aspose.pdf.Document pdfDocument, Set<com.aspose.pdf.MarkupSection> footersAndHeaders)
protected void
removeSections(Set<com.aspose.pdf.MarkupSection> sectionsToRemove)
protected void
removeTopAndBottomMargins(com.aspose.pdf.Page page, boolean needToCropBottom)
-
-
-
Field Detail
-
configuration
protected PdfToHtmlConverterConfig configuration
-
-
Constructor Detail
-
PdfToHtmlConverter
public PdfToHtmlConverter(PdfToHtmlConverterConfig configuration)
-
-
Method Detail
-
convert
public InputStream convert(InputStream pdfInputStream) throws IOException
- Throws:
IOException
-
configureHtmlSaveOptions
protected com.aspose.pdf.HtmlSaveOptions configureHtmlSaveOptions()
-
cleanupContent
protected com.aspose.pdf.Document cleanupContent(com.aspose.pdf.Document pdfDocument) throws IOException
- Throws:
IOException
-
removeLogos
protected void removeLogos(com.aspose.pdf.Document pdfDocument, Set<com.aspose.pdf.MarkupSection> footersAndHeaders)
-
hasFootersAndPageNumbers
protected boolean hasFootersAndPageNumbers(Set<com.aspose.pdf.MarkupSection> footersAndHeaders)
-
createFullWidthRectangles
protected List<com.aspose.pdf.Rectangle> createFullWidthRectangles(Set<com.aspose.pdf.MarkupSection> footersAndHeaders)
-
removeTopAndBottomMargins
protected void removeTopAndBottomMargins(com.aspose.pdf.Page page, boolean needToCropBottom)
-
findFootersAndHeaders
protected Set<com.aspose.pdf.MarkupSection> findFootersAndHeaders(com.aspose.pdf.ParagraphAbsorber paragraphAbsorber)
-
findMatchingSections
protected Set<com.aspose.pdf.MarkupSection> findMatchingSections(com.aspose.pdf.MarkupSection markupSection, List<com.aspose.pdf.PageMarkup> pageMarkups)
-
matchesPageNumberRegexp
protected boolean matchesPageNumberRegexp(com.aspose.pdf.MarkupSection markupSection)
-
getSectionText
protected String getSectionText(com.aspose.pdf.MarkupSection section)
-
changeLayout
protected com.aspose.pdf.Document changeLayout(com.aspose.pdf.Document pdfDocument) throws IOException
- Throws:
IOException
-
removeSections
protected void removeSections(Set<com.aspose.pdf.MarkupSection> sectionsToRemove)
-
-