1

While converting HTML (the very basic HTML) to PDF, the output PDF always has 1st page blank. How to solve this? Do I miss any specific properties?

xComponent = InitDocument(aLoader, PathConverter(inputFile), "_blank");           
SaveDocument(xComponent, inputFile, PathConverter(outputFile));

 private static void SaveDocument(XComponent xComponent, string sourceFile, string destinationFile)
        {
            var propertyValues = new PropertyValue[2];
            // Setting the flag for overwriting
            propertyValues[1] = new PropertyValue { Name = "Overwrite", Value = new Any(true) };
            //// Setting the filter name
            propertyValues[0] = new PropertyValue
            {
                Name = "FilterName",
                Value = new Any("writer_pdf_Export")
            };
            ((XStorable)xComponent).storeToURL(destinationFile, propertyValues);
        }

I tried to make workaround by deleting 1st page using PDFsharp, but after deleting, it shows me "The documents page tree has invalid node".

1gn1ter
  • 1,414
  • 2
  • 22
  • 47

0 Answers0