BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi. Trying to get image of specified size
private Bitmap Convert(SizeF size)
{
//Load the input PDF file
var lDoc = new PdfLoadedDocument("exportAsImageTest.pdf");
var dpi = 300;
//Export first page as image
Bitmap result;
if (size.IsEmpty)
{
result = lDoc.ExportAsImage(0, dpi, dpi);
}
else
{
result = lDoc.ExportAsImage(0, size, dpi, dpi, true);
}
lDoc.Close(true);
return result;
}
If I don't specify size, I get {Width = 2480 Height = 3507}
If I specify size in pixels, Width=1000, Height=1000, I get {Width = 2209 Height = 3125}
If I specify same size in points, Width=240, Height=240, I get {Width = 530 Height = 750}
How to correctly specify size to get image of desired siz
We have checked the reported issue on our end. It is a PDF behavior. we can only able to export the pages of the PDF document as per the PDF Page size and not in any predefined size. However, Using the dpi overload we can able to achieve the image in different resolutions. So, we cannot proceed further with your requirement.
Thank you for the answer so method ExportAsImage is pretty useless and doesn't work as specified
Binary data into pdf file
First, install database activities from the manage package.
Get the table from the database using database activity.
Use for each activity to loop the data table.
Get the binary data and convert to byte.
Use invoke code activity and pass the converted byte and file name as arguments.
Regards,
Diana
Thanks for the information.