Tiff to PDF with separator sheets
Tiff to PDF with separator sheets
using gdpicture-activex-code-samples/scan-mul ... -t480.html , I’m able to create PDFs files, but they save in PDF/A mode which is an issue. I’m trying to take a multipage tiff and create multiple PDF files using separator sheets. I have tried to mimic TwainPDFStart/Stop by using PDFNewPdf,PdfAddImageFromGdPictureImage, and PDFSavePdf methods, but I get a “invalid parameter” at the “Add” stage. Any suggestions?
Re: Tiff to PDF with separator sheets
Hi,
Please write the code you are using.
Kind regards,
Loïc
Please write the code you are using.
Kind regards,
Loïc
Re: Tiff to PDF with separator sheets
This is the simplest way to recreate the problem.
The file is created but an error occurs when you open the file.
"There was an error opening this document. This file cannot be opened because it has no pages."
When the PdfSavePdf is executed the file size jumps to 12K.
Code: Select all
Dim nImageID As Long
nImageID = AxImaging1.TiffCreateMultiPageFromFile("C:\Images\Able Test Dockets.tif")
AxImaging1.PdfNewPdfEx("C:\Images\Test.pdf")
AxImaging1.PdfAddImageFromGdPictureImage(nImageID)
AxImaging1.PdfSavePdf()
AxImaging1.TiffCloseNativeMultiPage()
"There was an error opening this document. This file cannot be opened because it has no pages."
When the PdfSavePdf is executed the file size jumps to 12K.
Re: Tiff to PDF with separator sheets
Hi,
You have to create a page then write your image on it:
You have to create a page then write your image on it:
Code: Select all
Dim nImageID As Long
Dim PdfImageIdx as Long
nImageID = AxImaging1.TiffCreateMultiPageFromFile("C:\Images\Able Test Dockets.tif")
AxImaging1.PdfNewPdfEx("C:\Images\Test.pdf")
PdfImageIdx = AxImaging1.PdfAddImageFromGdPictureImage(nImageID)
AxImaging1.PdfSetPageDimensions(AxImaging1.PdfGetImageWidth(PdfImageId ), AxImaging1.PdfGetImagheight(PdfImageIdx))
AxImaging1.PdfNewPage
AxImaging1.PdfDrawImage(1, 1, 1, AxImaging1.PdfGetImageWidth(PdfImageIdx), AxImaging1.PdfGetImagheight(PdfImageIdx))
AxImaging1.PdfEndPage
AxImaging1.PdfSavePdf()
AxImaging1.TiffCloseNativeMultiPage()
Re: Tiff to PDF with separator sheets
Thank you
Re: Tiff to PDF with separator sheets
Can you please provide an example on how to create multiple documents from a multipage tiff? Each document is separated by a page that contains a barcode. The PDF cannot be a PDF/A. I would like to mimic TwainPDFStart and TwainPDFStop example, but save as a standard PDF.
Re: Tiff to PDF with separator sheets
Here is a better question, will a PDF/A file save as a PDF file?
Re: Tiff to PDF with separator sheets
I found out the answer, it is yes. You have to change the viewing mode in Acrobat > Preferences > Document. Then when you try to save, it will prompt to save as.
Who is online
Users browsing this forum: No registered users and 0 guests