Skip to content

Conversation

@uddhavphatak
Copy link
Contributor

fix for #114

I have also added function documentation as well for this along with following requested additions

  1. using execvp() instead of execv().
  2. log function to be used instead of fprintf() for logging
  3. implemented similar pid() dance for Parent process.
  4. garbage value for rotate is caused due to incorrect conversion specifier(used %d for a double, correct will be %f).

@tillkamppeter
Copy link
Member

Looks all OK for me.

Were you able to reproduce all points of issue #114 with your changes not applied and see that they are all fixed with your changes applied?

Are the page dimensions/pixel counts of the output pages the same as of the gstoraster filter?

@uddhavphatak
Copy link
Contributor Author

@tillkamppeter,
I was able to reporduce all points of issue #114, I fixed it in the following way:

  1. using execvp() instead of execv().
  2. log function to be used instead of fprintf() for logging
  3. implemented similar pid() dance for Parent process.
  4. garbage value for rotate is caused due to incorrect conversion specifier(used %d for a double, correct will be %f).

the cropping/padding is being done in the following way now:
image
I have tested this by using an A4 size PDF, and passing printer function formats as A5, and A3 respectively, thus the A4 paper is cropped to the size of A5 paper, and respective padding is done, A4 padded to fit A3.

I also found a logging nit,
"DEBUG: cfFilterPDFToRaster: cropbox = [ 0.000000 595.000000 0.000000 792.000000 ]; rotate = 0"

the logging was being done as [x1,x2,y1,y2]. this was causing a bit of confusion, as the original QPDF logging was done in the format [x1,y1,x2,y2]. Thus changed this as well for ease of readablity while debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants