def convert(self, image, output=None):
        """
        Convert an image to a PDF.

        :param image: Image file path
        :param output: Output name, same as image name with .pdf extension by default
        :return: PDF file path
        """
        return self._convert(image, image.replace(Path(image).suffix, '.pdf') if not output else output)
def convert ( self , image , output = None ) : return self . _convert ( image , image . replace ( Path ( image ) . suffix , '.pdf' ) if not output else output )
Convert an image to a PDF.

        :param image: Image file path
        :param output: Output name, same as image name with .pdf extension by default
        :return: PDF file path