pdf zuwa tiff

Maida PDF zuwa TIFF ta amfani da .NET REST API.

A cikin yanayin yanayin dijital na yau, ingantaccen sarrafa takardu yana da mahimmanci ga kasuwanci da daidaikun mutane. Wata bukata ta gama gari wacce sau da yawa ke tasowa ita ce musanya fayilolin PDF zuwa TIFF hotuna. Ko don adanawa, bugu, ko dalilai masu dacewa, samun ikon canza takaddun PDF ba tare da ɓata lokaci ba zuwa hotuna masu inganci na TIFF na iya haɓaka ayyukan aiki sosai. A cikin wannan labarin, za ku koyi matakai don daidaita aikin sarrafa daftarin aiki, inganta samun dama, da haɓaka juzu’in bayananku ta hanyar canza PDF zuwa TIFF ta amfani da NET REST API.

Canjin PDF zuwa TIFF ta amfani da REST API

Idan ya zo ga canza fayilolin PDF zuwa hotuna TIFF, Aspose.PDF Cloud SDK don NET yana tsaye a matsayin mafita mai ƙarfi. Wannan ƙwaƙƙwaran SDK yana ba da cikakkiyar tsarin kayan aiki don sarrafa bangarori daban-daban na sarrafa PDF. Ba wai kawai za ku iya jujjuya PDFs zuwa hotuna TIFF ba, amma kuna iya matsawa cikin ɗimbin sauran fasaloli da suka haɗa da hakar rubutu, cire hoto, haɗa PDFs, da ƙari mai yawa.

Mataki na farko na amfani da SDK shine shigarwa akan tsarin gida. Kawai bincika ‘Aspose.PDF-Cloud’ a cikin manajan fakitin NuGet kuma danna maɓallin ‘Ƙara Kunshin’. Bugu da ƙari, da fatan za a ziyarci cloud dashboard kuma sami keɓaɓɓen takaddun shaidar abokin ciniki.

Maida PDF zuwa TIFF a C# .NET

Bari mu bincika ƙarin cikakkun bayanai kan yadda za mu iya canza fayilolin PDF zuwa hotuna TIFF ta hanyar amfani da C# .NET. Kuna samun sassauci don ƙididdige bayanan dpi don hoton sakamako watau PDF zuwa TIFF a 600 dpi, canza PDF zuwa TIFF a 300 dpi da dai sauransu.

// Don cikakkun misalai da fayilolin bayanai, da fatan za a je zuwa 
https://github.com/aspose-pdf-cloud/aspose-pdf-cloud-dotnet

// Samu bayanan abokin ciniki daga https://dashboard.aspose.cloud/
string clientSecret = "4d84d5f6584160cbd91dba1fe145db14";
string clientID = "bb959721-5780-4be6-be35-ff5c3a6aa4a2";

// ƙirƙirar misali na PdfApi
PdfApi pdfApi = new PdfApi(clientSecret, clientID);

// Shigar da sunan fayil na PDF
String inputFile = "Binder1-1.pdf";
// Karanta abubuwan da ke cikin fayil ɗin PDF cikin misalin rafi
var sourceFile = System.IO.File.OpenRead(inputFile);

// saita haske don sakamakon TIFF
int brightness = 100;
// Mahimman ƙididdiga don matsawa na iya zama LZW, CCITT4, CCITT3, RLE, Babu.
var compressionFactor = "None";
// Saita ƙimar zurfin launi. Mahimman ƙima sune Default, Format8bpp, Format4bpp, Format1bpp.
var colorDepthValue = "Default";

// Gefen hagu don sakamakon TIFF
int leftMargin = 10;
// Matsakaicin dama don sakamakon TIFF
int rightMaring = 10;
// Babban gefe don sakamakon TIFF
int topMargin = 10;
// Gefen ƙasa don sakamakon TIFF
int bottomMaring = 10;

// saita daidaitawa don sakamakon TIFF
string Orientation = "Portrait";
// Ko dai don tsallake shafukan da ba komai ba yayin juyawa ko a'a
Boolean skipBlankPages = true;
// saita fihirisar shafi a cikin PDF zuwa zama juyawa
int pageInexForConversion = 2;
// shafuka nawa za'a iya canza su
int numberOfPages = 3;

// sunan sakamakon sakamakon TIFF
string resultantFile = "output.TIFF";
                    
// Kira API don fara canza PDF zuwa TIFF
// sakamakon TIFF za a adana shi a cikin ma'ajin gajimare
pdfApi.PutPdfInRequestToTiff(resultantFile, brightness, compression: compressionFactor, colorDepth: colorDepthValue,
    leftMargin, rightMaring, topMargin, bottomMaring, Orientation,
    skipBlankPages, pageInexForConversion, numberOfPages, file: sourceFile);
pdf zuwa tiff online

Canja wurin TIFF zuwa PDF.

Yanzu, bari mu bincika wasu cikakkun bayanai na snippet code na sama.

PdfApi pdfApi = new PdfApi(clientSecret, clientID);

Da farko, ƙirƙiri misali na ajin PdfApi inda muke ƙaddamar da shaidar abokin ciniki azaman muhawara.

String inputFile = "Binder1-1.pdf";
var sourceFile = System.IO.File.OpenRead(inputFile);

Load da abun ciki na shigar da fayil ɗin PDF don yawo misali.

var compressionFactor = "None";

Ƙayyade ma’aunin matsawa don sakamakon TIFF. Ƙididdiga masu yiwuwa na iya zama LZW, CCITT4, CCITT3, RLE, `Babu’.

var colorDepthValue = "Default";

Ƙayyade bayanan zurfin launi don sakamakon TIFF. Ƙididdiga masu yiwuwa na iya zama ‘Tsoffin’, ‘Format8bpp’, ‘Format4bpp’, ‘Format1bpp’.

pdfApi.PutPdfInRequestToTiff(resultantFile, brightness, compression: compressionFactor, 
    colorDepth: colorDepthValue, leftMargin, rightMaring, 
    topMargin, bottomMaring, Orientation, skipBlankPages, 
    pageInexForConversion, numberOfPages, file: sourceFile);

Kira API don canza PDF zuwa TIFF kuma adana fitarwa a cikin ajiyar girgije.

PDF zuwa TIFF Online ta amfani da Umarnin CURL

Idan kuna neman tsarin da ya dace da layi don canza PDF zuwa TIFF, zaku iya amfani da umarnin cURL tare da Aspose.PDF Cloud. Wannan haɗin yana ba da hanya mai sauƙi don cimma buƙatun jujjuya ku. Ta hanyar ƙirƙirar umarnin cURL, zaku iya hulɗa tare da Aspose.PDF Cloud API kuma fara canza PDF zuwa TIFF ba tare da wata matsala ba. Wannan hanyar tana ba da damar aiki da kai da haɗin kai, yana ba ku damar haɗa tsarin jujjuyawar cikin ayyukan da kuke ciki ko rubutun.

Mataki na farko a wannan hanyar shine samar da alamar samun damar JWT ta aiwatar da umarni mai zuwa.

curl -v "https://api.aspose.cloud/connect/token" \
 -X POST \
 -d "grant_type=client_credentials&client_id=bb959721-5780-4be6-be35-ff5c3a6aa4a2&client_secret=4d84d5f6584160cbd91dba1fe145db14" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Accept: application/json"

Yanzu muna buƙatar aiwatar da umarni mai zuwa don canza shafukan PDF guda 3 waɗanda suka fara daga index 3 kuma adana sakamakon TIFF zuwa tuƙi na gida.

curl -v "https://api.aspose.cloud/v3.0/pdf/{inputPDF}/convert/tiff?brightness=100&compression=None&colorDepth=Default&orientation=Portrait&skipBlankPages=false&pageIndex=3&pageCount=3" \
-X GET \
-H  "accept: multipart/form-data" \
-H  "authorization: Bearer {accessToken}" \
-o "resultantImage.tiff"

Sauya ‘inputPDF’ tare da sunan fayil ɗin PDF da ke cikin ma’ajiyar gajimare, da ‘accessToken’ tare da alamar JWT da aka samar a sama.

Kammalawa

A ƙarshe, duka Aspose.PDF Cloud SDK don NET da tsarin umarni na cURL suna ba da ingantacciyar mafita mai inganci don cire rubutu daga takaddun PDF. Aspose.PDF Cloud SDK don NET yana ba da cikakkiyar API mai haɓakawa da haɓakawa tare da fa’idodi da yawa, yana mai da shi zaɓi mai ƙarfi don haɗawa da cirewar rubutun PDF cikin aikace-aikacen NET. A gefe guda, tsarin umarni na cURL yana ba da hanya mai sauƙi da dandamali mai zaman kanta don yin hulɗa tare da Aspose.PDF Cloud API, yana mai da shi kyakkyawan zaɓi ga masu haɓaka aiki a cikin yanayi daban-daban da harsunan shirye-shirye.

Hanyoyin haɗi masu amfani

Labarai masu alaka

Muna ba da shawarar ziyartar shafukan yanar gizo masu zuwa: