Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Incorrect PDF generated from TIFF


Former Community Member


I'm using the code below to generate PDF from multipage TIFF file. For some reason, for a specific TIFF with 4 pages, generated PDF has only one page. When I substract or add fifth page to input TIFF, PDF generation is successful.The TIFF file, which causes problems, does not seem to be corrupted and can be opened normally. Am I missing some configuration or doing something wrong? The logs show that the job completed successfully.

I would be grateful for any hint how to solve this problem.


Properties connectionProps = new Properties();

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_SOAP_ENDPOINT, "http://localhost:8080");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL, ServiceClientFactoryProperties.DSC_SOAP_PROTOCOL);

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "JBoss");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "username");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");

File tiffFile = new File("tiffFilePath");

File pdfFile = new File("pdfFilePath");

try (FileInputStream fileInputStream = new FileInputStream(tiffFile);) {

  ServiceClientFactory serviceFactory = ServiceClientFactory.createInstance(connectionProps);

  GeneratePdfServiceClient pdfGenClient = new GeneratePdfServiceClient(serviceFactory);

  Document inDoc = new Document(fileInputStream);

  CreatePDFResult pdfResult = pdfGenClient.createPDF2(inDoc, "TIFF", null, "Standard", "No Security", null, null);

  Document createdDocument = pdfResult.getCreatedDocument();


} catch(IOException | PDFGBaseException e) {



0 Replies